Core/Unit: Fix some phasing change problems with vehicle

This commit is contained in:
Vincent-Michael
2014-08-24 22:08:48 +02:00
parent 7fa49c8d62
commit 72b9b50bc7

View File

@@ -16328,8 +16328,6 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
if (IsInWorld())
{
RemoveNotOwnSingleTargetAuras(newPhaseMask); // we can lost access to caster or target
// modify hostile references for new phasemask, some special cases deal with hostile references themselves
if (GetTypeId() == TYPEID_UNIT || (!ToPlayer()->IsGameMaster() && !ToPlayer()->GetSession()->PlayerLogout()))
{
@@ -16377,6 +16375,8 @@ void Unit::SetPhaseMask(uint32 newPhaseMask, bool update)
if (m_SummonSlot[i])
if (Creature* summon = GetMap()->GetCreature(m_SummonSlot[i]))
summon->SetPhaseMask(newPhaseMask, true);
RemoveNotOwnSingleTargetAuras(newPhaseMask); // we can lost access to caster or target
}
// Update visibility after phasing pets and summons so they wont despawn