Browse Source

update map when bane set

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
80812cb402
  1. 19
      src/engine/objects/Bane.java

19
src/engine/objects/Bane.java

@ -304,15 +304,18 @@ public final class Bane {
InterestManager.setObjectDirty(baneCommander); InterestManager.setObjectDirty(baneCommander);
baneCommander.updateLocation(); 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) { public static Bane getBane(int cityUUID) {

Loading…
Cancel
Save