From 37e9160e88b4e9298309833add0bdd0ec7786c72 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Wed, 22 Nov 2017 13:21:59 +0000 Subject: [PATCH] Fixed npc/object spawn by command when GetPhaseByAuras is used. --- src/game/Entities/Player/Player.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game/Entities/Player/Player.cpp b/src/game/Entities/Player/Player.cpp index bbe5a0c46..ba915a39a 100644 --- a/src/game/Entities/Player/Player.cpp +++ b/src/game/Entities/Player/Player.cpp @@ -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;