Remove gold manager as a dependanacy to prevent an NPE

This commit is contained in:
Sam 2018-07-31 19:36:32 +01:00 committed by Alexander Meech
parent d41fb0c9b4
commit 52488d95a9
2 changed files with 4 additions and 8 deletions

View File

@ -309,7 +309,7 @@ public class ClansManager extends MiniClientPlugin<ClientClan> implements IRelat
_blacklist = new ClansBlacklist(plugin); _blacklist = new ClansBlacklist(plugin);
_gearManager = gearManager; _gearManager = gearManager;
_lootManager = new LootManager(gearManager, _goldManager); _lootManager = new LootManager(gearManager);
_disguiseManager = Managers.get(DisguiseManager.class); _disguiseManager = Managers.get(DisguiseManager.class);
_npcManager = new NpcManager(plugin, Managers.get(Creature.class)); _npcManager = new NpcManager(plugin, Managers.get(Creature.class));
_condition = new SkillConditionManager(plugin); _condition = new SkillConditionManager(plugin);

View File

@ -10,13 +10,11 @@ import org.bukkit.inventory.ItemStack;
import mineplex.core.common.weight.WeightSet; import mineplex.core.common.weight.WeightSet;
import mineplex.game.clans.clans.mounts.Mount.MountType; import mineplex.game.clans.clans.mounts.Mount.MountType;
import mineplex.game.clans.economy.GoldManager;
import mineplex.game.clans.items.GearManager; import mineplex.game.clans.items.GearManager;
public class LootManager public class LootManager
{ {
private final GearManager _gearManager; private final GearManager _gearManager;
private final GoldManager _goldManager;
private WeightSet<ILoot> _commonSet; private WeightSet<ILoot> _commonSet;
private WeightSet<ILoot> _rareSet; private WeightSet<ILoot> _rareSet;
@ -25,10 +23,9 @@ public class LootManager
private WeightSet<ILoot> _raidSet; private WeightSet<ILoot> _raidSet;
private WeightSet<ILoot> _capturePointSet; private WeightSet<ILoot> _capturePointSet;
public LootManager(GearManager gearManager, GoldManager goldManager) public LootManager(GearManager gearManager)
{ {
_gearManager = gearManager; _gearManager = gearManager;
_goldManager = goldManager;
_commonSet = new WeightSet<>(); _commonSet = new WeightSet<>();
_rareSet = new WeightSet<>(); _rareSet = new WeightSet<>();
@ -165,7 +162,6 @@ public class LootManager
_undeadCitySet.add(1, new GearLoot(_gearManager)); _undeadCitySet.add(1, new GearLoot(_gearManager));
// Gold // Gold
_undeadCitySet.add(5, new GoldLoot(_goldManager, 100, 1000));
_undeadCitySet.add(1, new GoldTokenLoot(5000, 10000)); _undeadCitySet.add(1, new GoldTokenLoot(5000, 10000));
} }