Disabled Gem hunter (bugged?)

Disabled chicken morph letting people fly
This commit is contained in:
Chiss 2014-08-10 18:36:18 +10:00
parent 25b525837f
commit 06bcf5079b
2 changed files with 24 additions and 13 deletions

View File

@ -60,6 +60,9 @@ public class MorphChicken extends MorphGadget
{
this.RemoveArmor(player);
Manager.getDisguiseManager().undisguise(player);
player.setAllowFlight(false);
player.setFlying(false);
}
@EventHandler

View File

@ -32,6 +32,7 @@ public class GameGemManager implements Listener
ArcadeManager Manager;
boolean DoubleGem = false;
boolean GemFinder = false;
public GameGemManager(ArcadeManager manager)
{
@ -165,22 +166,26 @@ public class GameGemManager implements Listener
total += (int)(earned * game.GetGemBoostAmount());
//Gem Finder
int gemFinder = Manager.GetAchievement().get(player.getName(), Achievement.GLOBAL_GEM_HUNTER).getLevel();
if (gemFinder > 0)
if (GemFinder)
{
total += (int)(earned * (gemFinder * 0.25));
int gemFinder = Manager.GetAchievement().get(player.getName(), Achievement.GLOBAL_GEM_HUNTER).getLevel();
if (gemFinder > 0)
{
total += (int)(earned * (gemFinder * 0.25));
}
}
if (DoubleGem)
total += earned;
Manager.GetDonation().RewardGems(null, "Earned " + game.GetName(), player.getName(), total);
//Stats
Manager.GetStatsManager().incrementStat(player, "Global.GemsEarned", total);
Manager.GetStatsManager().incrementStat(player, game.GetName()+".GemsEarned", total);
}
public void AnnounceGems(Game game, Player player, HashMap<String,GemData> gems, boolean give)
{
if (Manager.IsTournamentServer())
@ -196,7 +201,7 @@ public class GameGemManager implements Listener
UtilPlayer.message(player, "§f§lGems Earned");
UtilPlayer.message(player, "");
int earnedGems = 0;
for (String type : gems.keySet())
@ -230,13 +235,16 @@ public class GameGemManager implements Listener
//Gem Finder
int gemFinder = Manager.GetAchievement().get(player.getName(), Achievement.GLOBAL_GEM_HUNTER).getLevel();
if (gemFinder > 0)
if (GemFinder)
{
UtilPlayer.message(player, F.elem(C.cGreen + "+" + ((int)(earnedGems*(gemFinder * 0.25)) + " Gems") + " for " +
F.elem("Gem Hunter " + gemFinder + " (+" + (gemFinder*25) + "%)")));
int gemFinder = Manager.GetAchievement().get(player.getName(), Achievement.GLOBAL_GEM_HUNTER).getLevel();
if (gemFinder > 0)
{
UtilPlayer.message(player, F.elem(C.cGreen + "+" + ((int)(earnedGems*(gemFinder * 0.25)) + " Gems") + " for " +
F.elem("Gem Hunter " + gemFinder + C.cGreen + " +" + (gemFinder*25) + "%")));
totalGems += earnedGems * (gemFinder * 0.25);
totalGems += earnedGems * (gemFinder * 0.25);
}
}
//Double Gem
@ -263,5 +271,5 @@ public class GameGemManager implements Listener
UtilPlayer.message(player, ArcadeFormat.Line);
}
}