From 8f09f16603a5223e42c85f21669bc5350a9fcead Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 31 Dec 2024 14:37:16 -0600 Subject: [PATCH] update map when bane set --- src/engine/objects/Bane.java | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index d41df9ee..26875b10 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -279,6 +279,20 @@ public final class Bane { //add bane commander NPC summonBaneCommander(bane); + + try { + //update map for all players online + for (PlayerCharacter playerCharacter : SessionManager.getAllActivePlayerCharacters()) { + CityDataMsg cityDataMsg = new CityDataMsg(SessionManager.getSession(playerCharacter), false); + cityDataMsg.updateMines(true); + cityDataMsg.updateCities(true); + Dispatch dispatch = Dispatch.borrow(playerCharacter, cityDataMsg); + DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); + } + }catch(Exception e){ + + } + return true; } @@ -304,18 +318,6 @@ public final class Bane { InterestManager.setObjectDirty(baneCommander); baneCommander.updateLocation(); -try { - //update map for all players online - for (PlayerCharacter playerCharacter : SessionManager.getAllActivePlayerCharacters()) { - CityDataMsg cityDataMsg = new CityDataMsg(SessionManager.getSession(playerCharacter), false); - cityDataMsg.updateMines(true); - cityDataMsg.updateCities(true); - Dispatch dispatch = Dispatch.borrow(playerCharacter, cityDataMsg); - DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY); - } -}catch(Exception e){ - -} } public static Bane getBane(int cityUUID) {