From 51c98746c48d7befa0e0d02120e72176c6414fcb Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 7 Jul 2024 21:00:32 -0500 Subject: [PATCH] make stronghold mobs aggro --- src/engine/gameManager/LootManager.java | 2 +- src/engine/objects/Mine.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index e5501b21..e31d306c 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -654,7 +654,7 @@ public enum LootManager { } public static void DropPresent(Mob mob){ - int random = ThreadLocalRandom.current().nextInt(ItemBase.AnniverseryGifts.size()); + int random = ThreadLocalRandom.current().nextInt(ItemBase.AnniverseryGifts.size() - 1); int presentID = ItemBase.AnniverseryGifts.get(random); ItemBase presentBase = ItemBase.getItemBase(presentID); if(presentBase != null){ diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 552f2d82..0df16133 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -688,7 +688,7 @@ public class Mine extends AbstractGameObject { guard.healthMax *= 2; guard.setHealth(guard.healthMax); guard.spawnTime = 1000000000; - guard.runAfterLoad(); + guard.BehaviourType = Enum.MobBehaviourType.Aggro; InterestManager.setObjectDirty(guard); this.strongholdMobs.add(guard); LootManager.GenerateStrongholdLoot(guard,false); @@ -701,7 +701,7 @@ public class Mine extends AbstractGameObject { commander.healthMax *= 2; commander.setHealth(commander.healthMax); commander.spawnTime = 1000000000; - commander.runAfterLoad(); + commander.BehaviourType = Enum.MobBehaviourType.Aggro; InterestManager.setObjectDirty(commander); this.strongholdMobs.add(commander); LootManager.GenerateStrongholdLoot(commander,true);