This commit is contained in:
luis
2026-09-23 10:11:42 -03:00
parent 14ba04a2c0
commit ae1c5f670f
+13 -5
View File
@@ -3304,17 +3304,25 @@ void ScriptMgr::OnQuestAbandon(Player* player, const Quest* quest)
void WowCommunity::PhaseShift(Player* player, std::vector<uint32> phaseIDs, bool add)
{
// Exile's Reach calls this every second. A false condition used to RemovePhase,
// which stripped phases the world database had already applied and hid the quest
// givers for the rest of the island. Only additions run here. A caller that must
// drop a phase uses PhasingHandler::RemovePhase itself.
if (!player || !add)
// Exile's Reach calls this every second with the condition for that stage.
// A true condition adds the phase. A false condition removes only that phase,
// so a later quest stage does not leave the previous NPCs visible.
// Callers that must keep a phase (the general ship and the general shore)
// pass true. Phases this function never names are left untouched.
if (!player)
return;
for (uint32 phaseID : phaseIDs)
{
if (add)
{
if (!player->GetPhaseShift().HasPhase(phaseID))
PhasingHandler::AddPhase(player, phaseID, true);
}
else if (player->GetPhaseShift().HasPhase(phaseID))
PhasingHandler::RemovePhase(player, phaseID, true);
}
}
void ScriptMgr::OnPlayerWorldObjectUpdate(Player* player, uint32 diff)
{