mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 18:58:23 +00:00
Fully fix fairy clock (#2146)
* Fix scene transition * fully fix fairy clock
This commit is contained in:
parent
c78f9f2801
commit
5e3acab116
@ -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));
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user