forked from MagicBane/Server
Use of Instant to track hotzone refresh times.
This commit is contained in:
@@ -12,10 +12,11 @@ import engine.net.client.msg.*;
|
||||
import engine.objects.City;
|
||||
import engine.objects.Mine;
|
||||
import engine.objects.PlayerCharacter;
|
||||
import engine.objects.Zone;
|
||||
import engine.server.world.WorldServer;
|
||||
import engine.session.Session;
|
||||
|
||||
import java.time.ZoneId;
|
||||
|
||||
/*
|
||||
* @Author:
|
||||
* @Summary: Processes application protocol message which displays
|
||||
@@ -35,7 +36,6 @@ public class CityDataHandler extends AbstractClientMsgHandler {
|
||||
boolean updateCity = false;
|
||||
Session playerSession;
|
||||
PlayerCharacter playerCharacter;
|
||||
Zone hotZone;
|
||||
Dispatch dispatch;
|
||||
|
||||
playerCharacter = origin.getPlayerCharacter();
|
||||
@@ -72,7 +72,7 @@ public class CityDataHandler extends AbstractClientMsgHandler {
|
||||
|
||||
// If the hotZone has changed then update the client's map accordingly.
|
||||
|
||||
if (playerCharacter.getTimeStamp("hotzoneupdate") <= WorldServer.getLastHZChange() && ZoneManager.hotZone != null) {
|
||||
if (playerCharacter.getTimeStamp("hotzoneupdate") <= WorldServer.hotZoneLastUpdate.toEpochMilli() && ZoneManager.hotZone != null) {
|
||||
HotzoneChangeMsg hotzoneChangeMsg = new HotzoneChangeMsg(Enum.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID());
|
||||
dispatch = Dispatch.borrow(playerCharacter, hotzoneChangeMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
Reference in New Issue
Block a user