Adding SpinnerFiller and SpinnerRewards.
This commit is contained in:
parent
2253a63e96
commit
ed7b8949bb
@ -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<Integer> _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
|
||||
|
Loading…
Reference in New Issue
Block a user