update map when bane set

This commit is contained in:
2024-12-31 14:37:16 -06:00
parent 80812cb402
commit 8f09f16603
+14 -12
View File
@@ -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) {