From f0a11c1b4e22ce687cdeba233201438f62905e8f Mon Sep 17 00:00:00 2001 From: scooterboo Date: Fri, 5 May 2023 15:36:55 -0700 Subject: [PATCH] Partially fix fairy clock (#2143) updatePlayerGameTime() expects time since game start not since day start. --- .../server/packet/recv/HandlerSkipPlayerGameTimeReq.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSkipPlayerGameTimeReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSkipPlayerGameTimeReq.java index c0634a6c7..5cb6fca05 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSkipPlayerGameTimeReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSkipPlayerGameTimeReq.java @@ -16,7 +16,7 @@ public class HandlerSkipPlayerGameTimeReq extends PacketHandler { var req = SkipPlayerGameTimeReq.parseFrom(payload); var player = session.getPlayer(); - var newTime = req.getGameTime() * 1000L; + var newTime = req.getGameTime() * 1000L + player.getPlayerGameTime() - (player.getPlayerGameTime() % 1440000); player.updatePlayerGameTime(newTime); player.getScene().broadcastPacket(new PacketPlayerGameTimeNotify(player)); player.sendPacket(new PacketSkipPlayerGameTimeRsp(req));