From abcabc986135e07a5134285f4949dd3a5eab21fd Mon Sep 17 00:00:00 2001 From: Moistcrafter <63527712+Moistcrafter@users.noreply.github.com> Date: Sun, 16 Apr 2023 22:08:08 -0700 Subject: [PATCH] Parse dungeon entry info req from payload instead of player scene (#2122) --- .../java/emu/grasscutter/game/dungeons/DungeonSystem.java | 4 ++-- .../server/packet/recv/HandlerDungeonEntryInfoReq.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java index 4a74a65ba..d697f2a72 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonSystem.java @@ -26,8 +26,8 @@ public class DungeonSystem extends BaseGameSystem { super(server); } - public void getEntryInfo(Player player, int pointId) { - ScenePointEntry entry = GameData.getScenePointEntryById(player.getScene().getId(), pointId); + public void getEntryInfo(Player player, int pointId, int sceneId) { + ScenePointEntry entry = GameData.getScenePointEntryById(sceneId, pointId); if (entry == null) { // Error diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerDungeonEntryInfoReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerDungeonEntryInfoReq.java index 34ad24be7..93e696aa4 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerDungeonEntryInfoReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerDungeonEntryInfoReq.java @@ -13,7 +13,7 @@ public class HandlerDungeonEntryInfoReq extends PacketHandler { public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { DungeonEntryInfoReq req = DungeonEntryInfoReq.parseFrom(payload); - session.getServer().getDungeonSystem().getEntryInfo(session.getPlayer(), req.getPointId()); + session.getServer().getDungeonSystem().getEntryInfo(session.getPlayer(), req.getPointId(), req.getSceneId()); } }