Give RewardManager access to StatsManager

This commit is contained in:
AlexTheCoder 2017-02-21 22:38:30 -05:00 committed by cnr
parent a691d58840
commit f2394da7dc
3 changed files with 6 additions and 3 deletions

View File

@ -215,7 +215,7 @@ public class BonusManager extends MiniClientPlugin<BonusClientData> implements I
System.out.print("GM NULL");
}
_rewardManager = new RewardManager(_clientManager, _donationManager, _inventoryManager, petManager, gadgetManager);
_rewardManager = new RewardManager(_clientManager, _donationManager, _inventoryManager, petManager, gadgetManager, statsManager);
_pollManager = pollManager;
_statsManager = statsManager;

View File

@ -159,6 +159,7 @@ import mineplex.core.reward.rewards.RuneAmplifierReward;
import mineplex.core.reward.rewards.SpinTicketReward;
import mineplex.core.reward.rewards.TreasureShardReward;
import mineplex.core.reward.rewards.UnknownPackageReward;
import mineplex.core.stats.StatsManager;
import mineplex.core.treasure.TreasureType;
public class RewardManager
@ -171,6 +172,7 @@ public class RewardManager
private InventoryManager _inventoryManager;
private GadgetManager _gadgetManager;
private PetManager _petManager;
private StatsManager _statsManager;
private final double _gadgetMultiplier = 1;
@ -184,7 +186,7 @@ public class RewardManager
private int _legendaryShards = 5000;
public RewardManager(CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager,
PetManager petManager, GadgetManager gadgetManager)
PetManager petManager, GadgetManager gadgetManager, StatsManager statsManager)
{
_rewardPools = new EnumMap<>(RewardPool.Type.class);
_random = new Random();
@ -199,6 +201,7 @@ public class RewardManager
_inventoryManager = inventoryManager;
_gadgetManager = gadgetManager;
_petManager = petManager;
_statsManager = statsManager;
_commonAmmoMin *= _gadgetMultiplier;
_commonAmmoMax *= _gadgetMultiplier;

View File

@ -133,7 +133,7 @@ public class Hub extends JavaPlugin
preferenceManager, disguiseManager, blockRestore, projectileManager, achievementManager, packetHandler, hologramManager, incognito);
ThankManager thankManager = new ThankManager(this, _clientManager, _donationManager);
BoosterManager boosterManager = new BoosterManager(this, serverConfiguration.getServerGroup().getBoosterGroup(), _clientManager, _donationManager, inventoryManager, thankManager);
RewardManager rewardManager = new RewardManager(_clientManager, _donationManager, inventoryManager, petManager, gadgetManager);
RewardManager rewardManager = new RewardManager(_clientManager, _donationManager, inventoryManager, petManager, gadgetManager, statsManager);
TreasureManager treasureManager = new TreasureManager(this, _clientManager, serverStatusManager, _donationManager, inventoryManager, petManager, gadgetManager, blockRestore, hologramManager, statsManager, rewardManager);
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager,
mountManager, petManager, treasureManager, boosterManager);