Changed RankReward to have Eternal rank
This commit is contained in:
parent
7f7f3b9954
commit
8131656ae2
@ -2,6 +2,10 @@ package mineplex.core.reward.rewards;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import mineplex.core.account.CoreClientManager;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.reward.RankRewardData;
|
||||
@ -10,10 +14,6 @@ import mineplex.core.reward.RewardData;
|
||||
import mineplex.core.reward.RewardRarity;
|
||||
import mineplex.core.reward.RewardType;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class RankReward extends Reward
|
||||
{
|
||||
private Random _random;
|
||||
@ -35,9 +35,10 @@ public class RankReward extends Reward
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.ULTRA) rank = Rank.HERO;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.HERO) rank = Rank.LEGEND;
|
||||
else if ((rewardType == RewardType.MYTHICAL_CHEST || rewardType == RewardType.TRICK_OR_TREAT_CHEST || rewardType == RewardType.THANKFUL_CHEST) && _clientManager.Get(player).GetRank() == Rank.LEGEND) rank = Rank.TITAN;
|
||||
else if ((rewardType == RewardType.MYTHICAL_CHEST || rewardType == RewardType.TRICK_OR_TREAT_CHEST || rewardType == RewardType.THANKFUL_CHEST) && _clientManager.Get(player).GetRank() == Rank.TITAN) rank = Rank.ETERNAL;
|
||||
|
||||
if (rewardType == RewardType.MYTHICAL_CHEST && _random.nextDouble() < 0.01) // 1 Percent
|
||||
rank = Rank.TITAN;
|
||||
rank = Rank.ETERNAL;
|
||||
|
||||
if (rank == null)
|
||||
return new RewardData(null, getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
|
||||
@ -55,6 +56,7 @@ public class RankReward extends Reward
|
||||
if (_clientManager.Get(player).GetRank() == Rank.ALL) rank = Rank.ULTRA;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.ULTRA) rank = Rank.HERO;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.HERO) rank = Rank.LEGEND;
|
||||
else if (_clientManager.Get(player).GetRank() == Rank.LEGEND) rank = Rank.TITAN;
|
||||
|
||||
if (rank == null)
|
||||
return new RewardData(null, getRarity().getColor() + "Rank Upgrade Error", new ItemStack(Material.PAPER), getRarity());
|
||||
|
Loading…
Reference in New Issue
Block a user