Merge remote-tracking branch 'origin/Bonus' into Bonus

This commit is contained in:
Shaun Bennett 2015-08-11 00:35:44 -06:00
commit d2983b831e
5 changed files with 19 additions and 8 deletions

View File

@ -66,8 +66,8 @@ public class RewardManager
public void addGame(DonationManager donationManager, InventoryManager inventoryManager, PetManager petManager, StatsManager statsManager)
{
addReward(new GemReward(donationManager, 100, 500, 100, RewardRarity.GAME));
addReward(new ExperienceReward(statsManager, 100, 5000, 100, RewardRarity.GAME));
addReward(new GemReward(donationManager, 100, 500, 100, RewardRarity.CARL_EXTRA));
addReward(new ExperienceReward(statsManager, 100, 5000, 100, RewardRarity.CARL_EXTRA));
}
public void addCommon(DonationManager donationManager, InventoryManager inventoryManager, PetManager petManager, double minValue, double maxValue)

View File

@ -20,7 +20,7 @@ public enum RewardRarity
OTHER("Other", cWhite, Material.STAINED_GLASS_PANE, (byte) 0),
COMMON("Common", cWhite, Material.STAINED_GLASS_PANE, (byte) 0),
GAME("Game", cYellow, Material.STAINED_GLASS_PANE, (byte) 4),
CARL_EXTRA("Game", cYellow, Material.STAINED_GLASS_PANE, (byte) 4),
UNCOMMON("Uncommon", cAqua, Material.STAINED_GLASS_PANE, (byte) 3),
RARE("Rare", cPurple, Material.STAINED_GLASS_PANE, (byte) 10),
LEGENDARY("Legendary", cGreen, Material.STAINED_GLASS_PANE, (byte) 5),

View File

@ -3,7 +3,7 @@ package mineplex.core.reward;
public enum RewardType
{
//% Chances Mythic Legend Rare Uncommon
GameLoot( 0.000001, 0.00001, 0.0001, 3, 10),
GameLoot( 0.000001, 0.00001, 0.0001, 3, 0),
OldChest( 0, 0.05, 0.4, 5, 0),
AncientChest( 0, 1, 4, 25, 0),
@ -37,7 +37,7 @@ public enum RewardType
else if (rand <= _legendaryChance) rarity = RewardRarity.LEGENDARY;
else if (rand <= _rareChance) rarity = RewardRarity.RARE;
else if (rand <= _uncommonChance || requiresUncommon) rarity = RewardRarity.UNCOMMON;
else if (rand <= _gameChance) rarity = RewardRarity.GAME;
else if (rand <= _gameChance) rarity = RewardRarity.CARL_EXTRA;
return rarity;
}

View File

@ -35,13 +35,13 @@ public class ExperienceReward extends Reward
_statsManager.incrementStat(player, "Global.ExpEarned", experience);
return new RewardData(getRarity().getColor() + experience + " Experience", new ItemStack(Material.EXP_BOTTLE), RewardRarity.GAME);
return new RewardData(getRarity().getColor() + experience + " Experience", new ItemStack(Material.EXP_BOTTLE), RewardRarity.CARL_EXTRA);
}
@Override
public RewardData getFakeRewardData(Player player)
{
return new RewardData(getRarity().getColor() + "Experience", new ItemStack(Material.EXP_BOTTLE), RewardRarity.GAME);
return new RewardData(getRarity().getColor() + "Experience", new ItemStack(Material.EXP_BOTTLE), RewardRarity.CARL_EXTRA);
}
@Override

View File

@ -3,6 +3,7 @@ package nautilus.game.arcade.managers;
import java.util.ArrayList;
import java.util.Iterator;
import mineplex.core.bonuses.event.CarlSpinnerEvent;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilFirework;
@ -130,7 +131,17 @@ public class GameManager implements Listener
UtilTextBottom.displayProgress("Game Start", percentage,
UtilTime.MakeStr(Math.max(0, game.PrepareTime - (System.currentTimeMillis() - game.GetStateTime()))), player);
}
@EventHandler
public void cancelCarlSpinner(CarlSpinnerEvent event)
{
Game game = Manager.GetGame();
if (game == null) return;
if (game.GetCountdown() <= 0)
event.setCancelled(true);
}
@EventHandler
public void StateUpdate(UpdateEvent event)
{