exiles
This commit is contained in:
@@ -3304,16 +3304,24 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user