From 9b58105120dc770ea267e8f9826105234634930f Mon Sep 17 00:00:00 2001 From: Nazrin Date: Mon, 29 May 2023 23:39:34 -0700 Subject: [PATCH] Fully fix fairy clock for real this time (#2167) * Fully fix fairy clock For real this time * Make it so relogging keeps the time lock state. * Refactor out questLockTime * Per Hartie, the client packet needs to be changed too * Update src/main/java/emu/grasscutter/game/world/World.java Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com> * Update src/main/java/emu/grasscutter/server/packet/recv/HandlerClientLockGameTimeNotify.java * Remove all code not needed to get clock working --------- Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com> --- src/main/java/emu/grasscutter/game/player/Player.java | 1 - src/main/java/emu/grasscutter/game/world/World.java | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/player/Player.java b/src/main/java/emu/grasscutter/game/player/Player.java index a0a6eddd1..77329b223 100644 --- a/src/main/java/emu/grasscutter/game/player/Player.java +++ b/src/main/java/emu/grasscutter/game/player/Player.java @@ -339,7 +339,6 @@ public class Player implements PlayerHook, FieldFetch { * @param gameTime The new game time. */ public void updatePlayerGameTime(long gameTime) { - if (this.getWorld().isTimeLocked()) return; if (this.playerGameTime == gameTime) return; // Update the game time. diff --git a/src/main/java/emu/grasscutter/game/world/World.java b/src/main/java/emu/grasscutter/game/world/World.java index ffc388cec..18ca8c0a6 100644 --- a/src/main/java/emu/grasscutter/game/world/World.java +++ b/src/main/java/emu/grasscutter/game/world/World.java @@ -483,8 +483,6 @@ public final class World implements Iterable { // Update the world time. this.getWorldTime(); this.updateTime(); - // Lock the world time. - this.lockTime(paused); // If the world is being un-paused, update the last update time. if (this.isPaused != paused && !paused) {