Core/Spells: Phaseshift auras can now be stacked

--HG--
branch : trunk
This commit is contained in:
Shauren
2010-11-24 16:58:57 +01:00
parent ce989d701a
commit 3fa97ad538
2 changed files with 35 additions and 21 deletions
+8 -4
View File
@@ -2496,18 +2496,22 @@ void Player::SetGameMaster(bool on)
getHostileRefManager().setOnlineOfflineState(false);
CombatStopWithPets();
SetPhaseMask(PHASEMASK_ANYWHERE,false); // see and visible in all phases
SetPhaseMask(PHASEMASK_ANYWHERE, false); // see and visible in all phases
m_serverSideVisibilityDetect.SetValue(SERVERSIDE_VISIBILITY_GM, GetSession()->GetSecurity());
}
else
{
// restore phase
uint32 newPhase = 0;
AuraEffectList const& phases = GetAuraEffectsByType(SPELL_AURA_PHASE);
if (!phases.empty())
SetPhaseMask(phases.front()->GetMiscValue(), false);
else
SetPhaseMask(PHASEMASK_NORMAL, false);
for (AuraEffectList::const_iterator itr = phases.begin(); itr != phases.end(); ++itr)
newPhase |= (*itr)->GetMiscValue();
if (!newPhase)
newPhase = PHASEMASK_NORMAL;
SetPhaseMask(newPhase, false);
m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON;
setFactionForRace(getRace());