From f725d9203d4293b594bfb034ab7c2e9fe12b0024 Mon Sep 17 00:00:00 2001 From: Nazrin Date: Fri, 14 Jul 2023 16:37:29 -0700 Subject: [PATCH] Fix QUEST_CONTENT_LEAVE_SCENE (#2262) --- .../emu/grasscutter/game/quest/content/ContentLeaveScene.java | 2 +- .../server/packet/recv/HandlerPostEnterSceneReq.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/game/quest/content/ContentLeaveScene.java b/src/main/java/emu/grasscutter/game/quest/content/ContentLeaveScene.java index 24f2ec921..45f2d6bf4 100644 --- a/src/main/java/emu/grasscutter/game/quest/content/ContentLeaveScene.java +++ b/src/main/java/emu/grasscutter/game/quest/content/ContentLeaveScene.java @@ -12,6 +12,6 @@ public class ContentLeaveScene extends BaseContent { @Override public boolean execute( GameQuest quest, QuestData.QuestContentCondition condition, String paramStr, int... params) { - return quest.getOwner().getScene().getPrevScene() == params[0]; + return condition.getParam()[0] == params[0]; } } diff --git a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPostEnterSceneReq.java b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPostEnterSceneReq.java index 6339003cc..96559a622 100644 --- a/src/main/java/emu/grasscutter/server/packet/recv/HandlerPostEnterSceneReq.java +++ b/src/main/java/emu/grasscutter/server/packet/recv/HandlerPostEnterSceneReq.java @@ -28,6 +28,7 @@ public class HandlerPostEnterSceneReq extends PacketHandler { if (dungeonManager != null) dungeonManager.startDungeon(); } } + questManager.queueEvent(QuestContent.QUEST_CONTENT_LEAVE_SCENE, scene.getPrevScene()); session.send(new PacketPostEnterSceneRsp(session.getPlayer())); }