Core/Quests: Set quest slot earlier when abandoning a quest (#27584)

* fixes quest objective conditions still being true when quest is abandoned
This commit is contained in:
ModoX
2022-01-13 20:31:51 +01:00
committed by GitHub
parent 1989c68fb6
commit a17944e91e

View File

@@ -487,6 +487,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPackets::Quest::QuestLogRemove
}
_player->SetQuestSlot(packet.Entry, 0);
_player->TakeQuestSourceItem(questId, true); // remove quest src item from player
_player->AbandonQuest(questId); // remove all quest items player received before abandoning quest. Note, this does not remove normal drop items that happen to be quest requirements.
_player->RemoveActiveQuest(questId);
@@ -511,8 +512,6 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPackets::Quest::QuestLogRemove
sScriptMgr->OnQuestStatusChange(_player, quest, oldStatus, QUEST_STATUS_NONE);
}
_player->SetQuestSlot(packet.Entry, 0);
_player->UpdateCriteria(CriteriaType::AbandonAnyQuest, 1);
}
}