From a7b9fec032c14c0948d0ae64d5667050511d7302 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sun, 16 Mar 2025 14:48:36 -0500 Subject: [PATCH] HZ related stuff --- src/engine/gameManager/HotzoneManager.java | 11 ++++++++++- src/engine/gameManager/SimulationManager.java | 7 +++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/HotzoneManager.java b/src/engine/gameManager/HotzoneManager.java index 45109e98..3a81c52d 100644 --- a/src/engine/gameManager/HotzoneManager.java +++ b/src/engine/gameManager/HotzoneManager.java @@ -58,7 +58,7 @@ public class HotzoneManager { created.teleport(created.bindLoc); created.BehaviourType = Enum.MobBehaviourType.Aggro; hotzoneMob = created; - HellgateManager.SpecialLootHandler(created,true,true); + GenerateHotzoneEpicLoot(created); for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) { HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID()); @@ -153,4 +153,13 @@ public class HotzoneManager { mob.getCharItemManager().addItemToInventory(rune); } } + + public static void ClearHotzone(){ + ZoneManager.hotZone = null; + for(PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) { + HotzoneChangeMsg hcm = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), 0); + Dispatch dispatch = Dispatch.borrow(player, hcm); + DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + } + } } diff --git a/src/engine/gameManager/SimulationManager.java b/src/engine/gameManager/SimulationManager.java index 5ab5abea..40763ef8 100644 --- a/src/engine/gameManager/SimulationManager.java +++ b/src/engine/gameManager/SimulationManager.java @@ -137,6 +137,13 @@ public enum SimulationManager { // Logger.error(e.getMessage()); //} + try{ + if(ZoneManager.hotZone != null && HotzoneManager.hotzoneMob != null && !HotzoneManager.hotzoneMob.isAlive()){ + HotzoneManager.ClearHotzone(); + } + }catch(Exception e){ + + } SimulationManager.executionTime = Duration.between(startTime, Instant.now()); if (executionTime.compareTo(executionMax) > 0)