From b774423eaa0630fbff505584471a474c9bbd8b15 Mon Sep 17 00:00:00 2001 From: jixiaob <1066168689@qq.com> Date: Fri, 22 Jul 2022 11:12:53 +0800 Subject: [PATCH 1/2] fix issue#9 getPlayerUid ==> getReservedPlayerUid --- pom.xml | 2 +- src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index fcb2a16..fbb0020 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ Grasscutter-api 1.0 system - ${basedir}/../Grasscutter/grasscutter-1.1.1-dev.jar + ${basedir}/../Grasscutter/grasscutter-1.2.3-dev-beb6906.jar diff --git a/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java b/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java index cab6961..4821558 100644 --- a/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java +++ b/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java @@ -14,7 +14,7 @@ public class PlayerBornHook extends HandlerSetPlayerBornDataReq { @Override public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { super.handle(session, header, payload); - int playerUid = session.getAccount().getPlayerUid(); + int playerUid = session.getAccount().getReservedPlayerUid(); // 第一次加入 if(playerUid != 0) { From 74450dd6adae8d1489879647b1b65bd203a8d63e Mon Sep 17 00:00:00 2001 From: jixiaob <1066168689@qq.com> Date: Fri, 22 Jul 2022 13:33:43 +0800 Subject: [PATCH 2/2] fix issue#9 getPlayerUid ==> getPlayer().getUid() --- src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java b/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java index 4821558..e4dc1a9 100644 --- a/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java +++ b/src/main/java/io/github/gmw/packetHandler/PlayerBornHook.java @@ -14,7 +14,7 @@ public class PlayerBornHook extends HandlerSetPlayerBornDataReq { @Override public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { super.handle(session, header, payload); - int playerUid = session.getAccount().getReservedPlayerUid(); + int playerUid = session.getPlayer().getUid(); // 第一次加入 if(playerUid != 0) {