mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user