From 5e3acab1167f7fdd01bc1a210388abed3a5a358f Mon Sep 17 00:00:00 2001 From: scooterboo Date: Wed, 10 May 2023 21:49:21 -0700 Subject: [PATCH] Fully fix fairy clock (#2146) * Fix scene transition * fully fix fairy clock --- .../server/packet/recv/HandlerSkipPlayerGameTimeReq.java | 6 +----- .../server/packet/send/PacketPlayerGameTimeNotify.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) 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 786b97dba..2f10eb3ac 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerSkipPlayerGameTimeReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerSkipPlayerGameTimeReq.java @@ -15,11 +15,7 @@ public class HandlerSkipPlayerGameTimeReq extends PacketHandler { var req = SkipPlayerGameTimeReq.parseFrom(payload); var player = session.getPlayer(); - var newTime = - req.getGameTime() * 1000L - + player.getPlayerGameTime() - - (player.getPlayerGameTime() % 1440000); - player.updatePlayerGameTime(newTime); + var newTime = req.getGameTime() * 1000L; player.getScene().broadcastPacket(new PacketPlayerGameTimeNotify(player)); player.sendPacket(new PacketSkipPlayerGameTimeRsp(req)); } diff --git a/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerGameTimeNotify.java b/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerGameTimeNotify.java index 6c0f0ca78..ab3d12498 100644 --- a/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerGameTimeNotify.java +++ b/src/main/java/emu/grasscutter/server/packet/send/PacketPlayerGameTimeNotify.java @@ -12,7 +12,7 @@ public class PacketPlayerGameTimeNotify extends BasePacket { PlayerGameTimeNotify proto = PlayerGameTimeNotify.newBuilder() - .setGameTime(player.getWorld().getGameTime()) + .setGameTime((int)player.getWorld().getTotalGameTimeMinutes()) .setUid(player.getUid()) .build();