diff --git a/src/main/java/emu/grasscutter/game/world/World.java b/src/main/java/emu/grasscutter/game/world/World.java index 766cd1ad2..8c7595f33 100644 --- a/src/main/java/emu/grasscutter/game/world/World.java +++ b/src/main/java/emu/grasscutter/game/world/World.java @@ -35,7 +35,8 @@ public class World implements Iterable { private int nextPeerId = 0; private int worldLevel; - @Getter private boolean isMultiplayer, timeLocked = false; + @Getter private boolean isMultiplayer = false; + @Getter private boolean timeLocked; private long lastUpdateTime; @Getter private int tickCount = 0; @@ -56,6 +57,7 @@ public class World implements Iterable { this.entity = new EntityWorld(this); this.worldLevel = player.getWorldLevel(); this.isMultiplayer = isMultiplayer; + this.timeLocked = player.getProperty(PlayerProperty.PROP_IS_GAME_TIME_LOCKED) != 0; this.lastUpdateTime = System.currentTimeMillis(); this.currentWorldTime = host.getPlayerGameTime(); diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerClientLockGameTimeNotify.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerClientLockGameTimeNotify.java index 095ed163c..f61757c36 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerClientLockGameTimeNotify.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerClientLockGameTimeNotify.java @@ -1,5 +1,6 @@ package emu.grasscutter.server.packet.recv; +import emu.grasscutter.Grasscutter; import emu.grasscutter.net.packet.Opcodes; import emu.grasscutter.net.packet.PacketHandler; import emu.grasscutter.net.packet.PacketOpcodes; @@ -11,6 +12,8 @@ public final class HandlerClientLockGameTimeNotify extends PacketHandler { @Override public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { var packet = ClientLockGameTimeNotify.parseFrom(payload); - session.getPlayer().getWorld().lockTime(packet.getIsLock()); + // session.getPlayer().getWorld().lockTime(packet.getIsLock()); + // TODO: figure out what to implement here + if (packet.getIsLock()) Grasscutter.getLogger().warn("Invalid 'ClientLockGameTimeNotify' received; value is true. (please report to development channel)"); } }