update map when bane set

This commit is contained in:
2024-12-31 14:36:36 -06:00
parent 66fbf7aee6
commit 80812cb402
+11 -8
View File
@@ -304,15 +304,18 @@ 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){
//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);
}
}
}
public static Bane getBane(int cityUUID) {