Core/Quests: Update phases on quest status and objective progress changes

This commit is contained in:
luis
2026-11-05 20:41:29 -03:00
parent 198cd1b56f
commit 71f79ff68d
@@ -16797,6 +16797,13 @@ void Player::SetQuestStatus(uint32 questId, QuestStatus status, bool update /*=
if (!quest->IsTurnIn())
m_QuestStatusSave[questId] = QUEST_DEFAULT_SAVE_TYPE;
//WowCommunity
// Phases before the hooks, anything a script summons inherits them. Visibility waits for the next notify, this can run inside the objective loop
if (IsInWorld() && oldStatus != status && quest->HasFlag(QUEST_FLAGS_UPDATE_PHASESHIFT))
if (PhasingHandler::OnConditionChange(this, false))
UpdateObjectVisibility(false);
//WowCommunity
sScriptMgr->OnQuestStatusChange(this, questId);
sScriptMgr->OnQuestStatusChange(this, quest, oldStatus, status);
}
@@ -17801,6 +17808,12 @@ void Player::UpdateQuestObjectiveProgress(QuestObjectiveType objectiveType, int3
if (objectiveWasComplete != objectiveIsNowComplete)
anyObjectiveChangedCompletionState = true;
//WowCommunity
// Any progress, phase conditions can ask for a partial count
if (IsInWorld() && quest->HasFlag(QUEST_FLAGS_UPDATE_PHASESHIFT))
updatePhaseShift = true;
//WowCommunity
if (objectiveIsNowComplete && objective->CompletionEffect)
{
if (objective->CompletionEffect->GameEventId)