Parse dungeon entry info req from payload instead of player scene (#2122)

This commit is contained in:
Moistcrafter 2023-04-16 22:08:08 -07:00 committed by GitHub
parent b302c2b73b
commit abcabc9861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -26,8 +26,8 @@ public class DungeonSystem extends BaseGameSystem {
super(server); super(server);
} }
public void getEntryInfo(Player player, int pointId) { public void getEntryInfo(Player player, int pointId, int sceneId) {
ScenePointEntry entry = GameData.getScenePointEntryById(player.getScene().getId(), pointId); ScenePointEntry entry = GameData.getScenePointEntryById(sceneId, pointId);
if (entry == null) { if (entry == null) {
// Error // Error

View File

@ -13,7 +13,7 @@ public class HandlerDungeonEntryInfoReq extends PacketHandler {
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception { public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
DungeonEntryInfoReq req = DungeonEntryInfoReq.parseFrom(payload); DungeonEntryInfoReq req = DungeonEntryInfoReq.parseFrom(payload);
session.getServer().getDungeonSystem().getEntryInfo(session.getPlayer(), req.getPointId()); session.getServer().getDungeonSystem().getEntryInfo(session.getPlayer(), req.getPointId(), req.getSceneId());
} }
} }