From 94c9e925532cabc9a256b0ec96099aced7f71efc Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 12 Jan 2025 17:09:27 -0600 Subject: [PATCH] mob loot system addressed --- src/engine/gameManager/LootManager.java | 9 +++++---- src/engine/mobileAI/MobAI.java | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/gameManager/LootManager.java b/src/engine/gameManager/LootManager.java index c2d7094e..8b3ff967 100644 --- a/src/engine/gameManager/LootManager.java +++ b/src/engine/gameManager/LootManager.java @@ -76,8 +76,7 @@ public enum LootManager { public static void GenerateMobLoot(Mob mob) { - //no loot for safezones - if(mob == null || mob.getSafeZone()){ + if(mob == null){ return; } @@ -186,14 +185,16 @@ public enum LootManager { // Iterate all entries in this bootySet and process accordingly + Zone zone = ZoneManager.findSmallestZone(mob.loc); for (BootySetEntry bse : entries) { switch (bse.bootyType) { case "GOLD": + if (zone != null && zone.getSafeZone() == (byte)1) + return; // no loot to drop in safezones GenerateGoldDrop(mob, bse, inHotzone); break; case "LOOT": - - if (mob.getSafeZone()) + if (zone != null && zone.getSafeZone() == (byte)1) return; // no loot to drop in safezones dropRate = LootManager.NORMAL_DROP_RATE; diff --git a/src/engine/mobileAI/MobAI.java b/src/engine/mobileAI/MobAI.java index 625be08a..5a829019 100644 --- a/src/engine/mobileAI/MobAI.java +++ b/src/engine/mobileAI/MobAI.java @@ -884,7 +884,6 @@ public class MobAI { return; } } - aiAgent.despawn(); return; }