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)
|
void WowCommunity::PhaseShift(Player* player, std::vector<uint32> phaseIDs, bool add)
|
||||||
{
|
{
|
||||||
// Exile's Reach calls this every second. A false condition used to RemovePhase,
|
// Exile's Reach calls this every second with the condition for that stage.
|
||||||
// which stripped phases the world database had already applied and hid the quest
|
// A true condition adds the phase. A false condition removes only that phase,
|
||||||
// givers for the rest of the island. Only additions run here. A caller that must
|
// so a later quest stage does not leave the previous NPCs visible.
|
||||||
// drop a phase uses PhasingHandler::RemovePhase itself.
|
// Callers that must keep a phase (the general ship and the general shore)
|
||||||
if (!player || !add)
|
// pass true. Phases this function never names are left untouched.
|
||||||
|
if (!player)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (uint32 phaseID : phaseIDs)
|
for (uint32 phaseID : phaseIDs)
|
||||||
|
{
|
||||||
|
if (add)
|
||||||
|
{
|
||||||
if (!player->GetPhaseShift().HasPhase(phaseID))
|
if (!player->GetPhaseShift().HasPhase(phaseID))
|
||||||
PhasingHandler::AddPhase(player, phaseID, true);
|
PhasingHandler::AddPhase(player, phaseID, true);
|
||||||
|
}
|
||||||
|
else if (player->GetPhaseShift().HasPhase(phaseID))
|
||||||
|
PhasingHandler::RemovePhase(player, phaseID, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScriptMgr::OnPlayerWorldObjectUpdate(Player* player, uint32 diff)
|
void ScriptMgr::OnPlayerWorldObjectUpdate(Player* player, uint32 diff)
|
||||||
|
|||||||
Reference in New Issue
Block a user