Fully fix fairy clock (#2146)

* Fix scene transition

* fully fix fairy clock
This commit is contained in:
scooterboo 2023-05-10 21:49:21 -07:00 committed by GitHub
parent c78f9f2801
commit 5e3acab116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 6 deletions

View File

@ -15,11 +15,7 @@ public class HandlerSkipPlayerGameTimeReq extends PacketHandler {
var req = SkipPlayerGameTimeReq.parseFrom(payload); var req = SkipPlayerGameTimeReq.parseFrom(payload);
var player = session.getPlayer(); var player = session.getPlayer();
var newTime = var newTime = req.getGameTime() * 1000L;
req.getGameTime() * 1000L
+ player.getPlayerGameTime()
- (player.getPlayerGameTime() % 1440000);
player.updatePlayerGameTime(newTime);
player.getScene().broadcastPacket(new PacketPlayerGameTimeNotify(player)); player.getScene().broadcastPacket(new PacketPlayerGameTimeNotify(player));
player.sendPacket(new PacketSkipPlayerGameTimeRsp(req)); player.sendPacket(new PacketSkipPlayerGameTimeRsp(req));
} }

View File

@ -12,7 +12,7 @@ public class PacketPlayerGameTimeNotify extends BasePacket {
PlayerGameTimeNotify proto = PlayerGameTimeNotify proto =
PlayerGameTimeNotify.newBuilder() PlayerGameTimeNotify.newBuilder()
.setGameTime(player.getWorld().getGameTime()) .setGameTime((int)player.getWorld().getTotalGameTimeMinutes())
.setUid(player.getUid()) .setUid(player.getUid())
.build(); .build();