*Clear reactives and pet auras on spec changes.

--HG--
branch : trunk
This commit is contained in:
maximius
2009-11-17 23:30:08 -08:00
parent 9eae529293
commit f59106d9c3
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -21993,9 +21993,13 @@ void Player::ActivateSpec(uint8 spec)
UnsummonPetTemporaryIfAny(); UnsummonPetTemporaryIfAny();
ClearComboPointHolders(); ClearComboPointHolders();
ClearAllReactives();
UnsummonAllTotems(); UnsummonAllTotems();
RemoveAllControlled(); RemoveAllControlled();
RemoveAllAurasOnDeath(); RemoveAllAurasOnDeath();
if (GetPet())
GetPet()->RemoveAllAurasOnDeath();
//RemoveAllAuras(this->GetGUID(), NULL, false, true); // removes too many auras //RemoveAllAuras(this->GetGUID(), NULL, false, true); // removes too many auras
//ExitVehicle(); // should be impossible to switch specs from inside a vehicle.. //ExitVehicle(); // should be impossible to switch specs from inside a vehicle..
+3 -3
View File
@@ -4188,7 +4188,7 @@ void Unit::RemoveArenaAuras(bool onleave)
{ {
// in join, remove positive buffs, on end, remove negative // in join, remove positive buffs, on end, remove negative
// used to remove positive visible auras in arenas // used to remove positive visible auras in arenas
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); ) for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
{ {
if ( !(iter->second->GetSpellProto()->AttributesEx4 & (1<<21)) // don't remove stances, shadowform, pally/hunter auras if ( !(iter->second->GetSpellProto()->AttributesEx4 & (1<<21)) // don't remove stances, shadowform, pally/hunter auras
&& !iter->second->IsPassive() // don't remove passive auras && !iter->second->IsPassive() // don't remove passive auras
@@ -4204,7 +4204,7 @@ void Unit::RemoveAllAurasOnDeath()
{ {
// used just after dieing to remove all visible auras // used just after dieing to remove all visible auras
// and disable the mods for the passive ones // and disable the mods for the passive ones
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); ) for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
{ {
if (!iter->second->IsPassive() && !iter->second->IsDeathPersistent()) if (!iter->second->IsPassive() && !iter->second->IsDeathPersistent())
RemoveAura(iter, AURA_REMOVE_BY_DEATH); RemoveAura(iter, AURA_REMOVE_BY_DEATH);
@@ -13184,7 +13184,7 @@ void Unit::ClearAllReactives()
if (HasAuraState(AURA_STATE_DEFENSE)) if (HasAuraState(AURA_STATE_DEFENSE))
ModifyAuraState(AURA_STATE_DEFENSE, false); ModifyAuraState(AURA_STATE_DEFENSE, false);
if (getClass() == CLASS_HUNTER && HasAuraState( AURA_STATE_HUNTER_PARRY)) if (getClass() == CLASS_HUNTER && HasAuraState(AURA_STATE_HUNTER_PARRY))
ModifyAuraState(AURA_STATE_HUNTER_PARRY, false); ModifyAuraState(AURA_STATE_HUNTER_PARRY, false);
if(getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER) if(getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER)
((Player*)this)->ClearComboPoints(); ((Player*)this)->ClearComboPoints();