Browse Source

Code cleanup; reworked conditional.

master
MagicBot 2 years ago
parent
commit
6ac1911770
  1. 8
      src/engine/net/client/handlers/CityDataHandler.java

8
src/engine/net/client/handlers/CityDataHandler.java

@ -36,6 +36,7 @@ public class CityDataHandler extends AbstractClientMsgHandler { @@ -36,6 +36,7 @@ public class CityDataHandler extends AbstractClientMsgHandler {
Session playerSession;
PlayerCharacter playerCharacter;
Zone hotZone;
Dispatch dispatch;
playerCharacter = origin.getPlayerCharacter();
@ -70,17 +71,16 @@ public class CityDataHandler extends AbstractClientMsgHandler { @@ -70,17 +71,16 @@ public class CityDataHandler extends AbstractClientMsgHandler {
cityDataMsg.updateMines(updateMine);
cityDataMsg.updateCities(updateCity);
Dispatch dispatch = Dispatch.borrow(playerCharacter, cityDataMsg);
dispatch = Dispatch.borrow(playerCharacter, cityDataMsg);
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
if (playerCharacter.getTimeStamp("hotzoneupdate") <= WorldServer.getLastHZChange()) {
// If the hotZone has changed then update the client's map accordingly.
if (hotZone != null) {
if (playerCharacter.getTimeStamp("hotzoneupdate") <= WorldServer.getLastHZChange() && hotZone != null) {
HotzoneChangeMsg hotzoneChangeMsg = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), hotZone.getObjectUUID());
dispatch = Dispatch.borrow(playerCharacter, hotzoneChangeMsg);
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
playerCharacter.setTimeStamp("hotzoneupdate", System.currentTimeMillis() - 100);
}
}
// Serialize the realms for this map

Loading…
Cancel
Save