mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-03 17:27:47 +00:00
Fixed ClsArc000 repeated event notice bug
Kept sending event notice on bNpcKill even when goal was met
This commit is contained in:
parent
6bdaa2ef6d
commit
af2eed7a45
1 changed files with 8 additions and 8 deletions
|
@ -145,18 +145,18 @@ public:
|
||||||
private:
|
private:
|
||||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player, uint32_t varIdx )
|
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_37 = quest.getUI8AL();
|
||||||
auto QUEST_ONKILL_49 = quest.getUI8BH();
|
auto QUEST_ONKILL_49 = quest.getUI8BH();
|
||||||
auto QUEST_ONKILL_47 = quest.getUI8BL();
|
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 );
|
quest.setSeq( SeqFinish );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue