Fixed npc/object spawn by command when GetPhaseByAuras is used.

This commit is contained in:
Yehonal
2017-11-22 13:21:59 +00:00
parent 0f42b51143
commit 37e9160e88

View File

@@ -25246,8 +25246,13 @@ uint32 Player::GetPhaseMaskForSpawn() const
{
uint32 phase = IsGameMaster() ? GetPhaseByAuras() : GetPhaseMask();
if (!phase)
phase = PHASEMASK_NORMAL;
// some aura phases include 1 normal map in addition to phase itself
if (uint32 n_phase = phase & ~PHASEMASK_NORMAL)
uint32 n_phase = phase & ~PHASEMASK_NORMAL;
if (n_phase > 0)
return n_phase;
return phase;