add shards depending on rank
This commit is contained in:
parent
aa1ea63337
commit
231b55d018
@ -3,8 +3,19 @@ package nautilus.game.arcade.managers;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
|
||||
import mineplex.core.account.event.GetClientEvent;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftHumanEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import mineplex.core.achievement.Achievement;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
@ -20,22 +31,11 @@ import nautilus.game.arcade.events.FirstBloodEvent;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.events.PlayerStateChangeEvent;
|
||||
import nautilus.game.arcade.game.Game;
|
||||
import nautilus.game.arcade.game.GemData;
|
||||
import nautilus.game.arcade.game.Game.GameState;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.GemData;
|
||||
import net.minecraft.server.v1_8_R3.EntityHuman;
|
||||
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftHumanEntity;
|
||||
import org.bukkit.craftbukkit.v1_8_R3.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.player.PlayerQuitEvent;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
public class GameGemManager implements Listener
|
||||
{
|
||||
ArcadeManager Manager;
|
||||
@ -213,6 +213,17 @@ public class GameGemManager implements Listener
|
||||
if (DoubleGem && game.GemDoubleEnabled)
|
||||
total += earned;
|
||||
|
||||
Rank rank = Manager.GetClients().Get(player).GetRank();
|
||||
|
||||
if (rank == rank.ULTRA)
|
||||
shards *= 1.5;
|
||||
else if (rank == rank.HERO)
|
||||
shards *= 2;
|
||||
else if (rank == rank.LEGEND)
|
||||
shards *= 2.5;
|
||||
else if (rank.has(Rank.TITAN))
|
||||
shards *= 3;
|
||||
|
||||
Manager.GetDonation().RewardGems(null, "Earned " + game.GetName(), player.getName(), player.getUniqueId(), total);
|
||||
Manager.GetDonation().RewardCoins(null, "Earned", player.getName(), Manager.GetClients().getAccountId(player), shards);
|
||||
|
||||
@ -350,8 +361,23 @@ public class GameGemManager implements Listener
|
||||
totalGems += earnedGems;
|
||||
}
|
||||
|
||||
int earnedShards = shards;
|
||||
|
||||
Rank rank = Manager.GetClients().Get(player).GetRank();
|
||||
|
||||
if (rank == rank.ULTRA)
|
||||
shards *= 1.5;
|
||||
else if (rank == rank.HERO)
|
||||
shards *= 2;
|
||||
else if (rank == rank.LEGEND)
|
||||
shards *= 2.5;
|
||||
else if (rank.has(Rank.TITAN))
|
||||
shards *= 3;
|
||||
|
||||
UtilPlayer.message(player, "");
|
||||
UtilPlayer.message(player, F.elem(C.cAqua + "+" + shards + " Treasure Shards") + " for " + F.elem("Earning " + shards + " Gems"));
|
||||
UtilPlayer.message(player, F.elem(C.cAqua + "+" + earnedShards + " Treasure Shards") + " for " + F.elem("Earning " + earnedShards + " Gems"));
|
||||
if (rank.has(Rank.ULTRA))
|
||||
UtilPlayer.message(player, F.elem(C.cAqua + "+" + (shards - earnedShards) + " Treasure Shards") + " for " + F.elem(rank.getTag(true, true)) + " Rank");
|
||||
|
||||
//Inform
|
||||
UtilPlayer.message(player, "");
|
||||
|
Loading…
Reference in New Issue
Block a user