From ed7b8949bb0376762bace087f63fbfd2b6cb3dbf Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 10 Aug 2015 17:04:47 +0200 Subject: [PATCH] Adding SpinnerFiller and SpinnerRewards. --- .../src/mineplex/core/bonuses/gui/SpinGui.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java index 80268a046..e9d7221bb 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/bonuses/gui/SpinGui.java @@ -46,6 +46,7 @@ public class SpinGui extends SimpleGui private int _ticksPerSwap; private int _swapCount; private Reward[] _rewards; + private Reward[] _fakeRewards; private boolean _stopped; private boolean _rewarded; private ArrayList _ticks; @@ -65,13 +66,18 @@ public class SpinGui extends SimpleGui //setItem(CARL_SLOT, new DisplayItem(carlItem)); _rewards = new Reward[REWARDS_TO_GENERATE]; + _fakeRewards = new Reward[REWARDS_TO_GENERATE]; _ticks = new ArrayList<>(); _frame = 0; _pitch = 1; for (int i = 0; i < REWARDS_TO_GENERATE; i++) { - _rewards[i] = rewardManager.nextReward(player, null, false, RewardType.MythicalChest, true); + _fakeRewards[i] = rewardManager.nextReward(player, null, false, RewardType.SpinnerFiller, true); + } + for (int i = 0; i < REWARDS_TO_GENERATE; i++) + { + _rewards[i] = rewardManager.nextReward(player, null, false, RewardType.SpinnerReal, true); } _ticksPerSwap = 1; @@ -98,7 +104,8 @@ public class SpinGui extends SimpleGui _stopSpinnerAt = _ticks.size(); - _reward = _rewards[_stopSpinnerAt % REWARDS_TO_GENERATE + 3]; + _fakeRewards[_stopSpinnerAt % REWARDS_TO_GENERATE + 3] = _rewards[_stopSpinnerAt % REWARDS_TO_GENERATE + 3]; + _reward = _fakeRewards[_stopSpinnerAt % REWARDS_TO_GENERATE + 3]; _rewardData = _reward.giveReward("Carls Spinner", getPlayer()); } @@ -147,7 +154,7 @@ public class SpinGui extends SimpleGui index = index % REWARDS_TO_GENERATE; int slot = 9 + i; - RewardData data = _rewards[index].getFakeRewardData(getPlayer()); + RewardData data = _fakeRewards[index].getFakeRewardData(getPlayer()); setItem(slot, new RewardButton(data)); // Glass Panes