From 5d92c1c86da20224c4b1cbdd0431511ae6d83847 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 31 Dec 2024 14:09:11 -0600 Subject: [PATCH] bane system work --- src/engine/objects/Bane.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index 376f905a..86d80d0a 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -487,6 +487,16 @@ public final class Bane { return false; } + //Remove bane commander NPC + if(!baneStone.getHirelings().isEmpty()) { + NPC npc = (NPC)baneStone.getHirelings().keySet().stream().findFirst().orElse(null); + if(npc != null) { + DbManager.NPCQueries.DELETE_NPC(npc); + DbManager.removeFromCache(npc); + WorldGrid.RemoveWorldObject(npc); + WorldGrid.removeObject(npc); + } + } // Remove object from simulation baneStone.removeFromCache();