From af2eed7a4597cb13700882c9afd4cef9c994b6a6 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 13 Feb 2023 19:16:41 -0800 Subject: [PATCH] Fixed ClsArc000 repeated event notice bug Kept sending event notice on bNpcKill even when goal was met --- src/scripts/quest/classquest/ARC/ClsArc000.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/scripts/quest/classquest/ARC/ClsArc000.cpp b/src/scripts/quest/classquest/ARC/ClsArc000.cpp index 2ec1372c..e28ae346 100644 --- a/src/scripts/quest/classquest/ARC/ClsArc000.cpp +++ b/src/scripts/quest/classquest/ARC/ClsArc000.cpp @@ -145,18 +145,18 @@ public: private: void checkQuestCompletion( World::Quest& quest, Entity::Player& player, uint32_t varIdx ) { - if( varIdx == 1 ) - eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 ); - else if( varIdx == 2 ) - eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 ); - else - eventMgr().sendEventNotice( player, getId(), 3, 0, 0, 0 ); - auto QUEST_ONKILL_37 = quest.getUI8AL(); auto QUEST_ONKILL_49 = quest.getUI8BH(); auto QUEST_ONKILL_47 = quest.getUI8BL(); - if( QUEST_ONKILL_37 >= 3 && QUEST_ONKILL_49 >= 3 && QUEST_ONKILL_47 >= 3 ) + if( varIdx == 1 && QUEST_ONKILL_37 <= 3 ) + eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 ); + else if( varIdx == 2 && QUEST_ONKILL_49 <= 3 ) + eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 ); + else if( varIdx == 3 && QUEST_ONKILL_47 <= 3 ) + eventMgr().sendEventNotice( player, getId(), 3, 0, 0, 0 ); + + if( QUEST_ONKILL_37 + 1 >= 3 && QUEST_ONKILL_49 + 1 >= 3 && QUEST_ONKILL_47 + 1 >= 3 ) { quest.setSeq( SeqFinish ); }