*Cleanup, remove all positive auras (ie: buffs from another spec) on spec change.
--HG-- branch : trunk
This commit is contained in:
1 parent
ad91c3a94b
commit
46f2faf1f3
4 files changed
+43
-50
No files matched your search
+13
-7
@@ -3959,7 +3959,7 @@ void Unit::RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit
|
||||
|
||||
for(AuraMap::iterator iter = m_Auras.lower_bound(spellId); iter != m_Auras.upper_bound(spellId);)
|
||||
{
|
||||
Aura * aur= iter->second;
|
||||
Aura * aur = iter->second;
|
||||
if (casterGUID == aur->GetCasterGUID())
|
||||
{
|
||||
int32 damage[MAX_SPELL_EFFECTS];
|
||||
@@ -4133,6 +4133,18 @@ void Unit::RemoveAllAuras()
|
||||
RemoveAura(iter);
|
||||
}
|
||||
|
||||
void Unit::RemoveAllAuras(uint64 casterGUID, Aura * except /*=NULL*/, bool negative /*=true*/, bool positive /*=true*/)
|
||||
{
|
||||
AuraMap::iterator iter = m_Auras.begin();
|
||||
while (!m_Auras.empty())
|
||||
{
|
||||
Aura * aur = (*iter)->GetParentAura();
|
||||
if (aur != except && (!casterGUID || aur->GetCasterGUID()==casterGUID)
|
||||
&& ((negative && !aur->IsPositive()) || (positive && aur->IsPositive())))
|
||||
RemoveAura(aur);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::RemoveArenaAuras(bool onleave)
|
||||
{
|
||||
// in join, remove positive buffs, on end, remove negative
|
||||
@@ -4179,17 +4191,13 @@ void Unit::DelayAura(uint32 spellId, uint64 caster, int32 delaytime)
|
||||
void Unit::_RemoveAllAuraMods()
|
||||
{
|
||||
for (AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end(); ++i)
|
||||
{
|
||||
(*i).second->ApplyAllModifiers(false);
|
||||
}
|
||||
}
|
||||
|
||||
void Unit::_ApplyAllAuraMods()
|
||||
{
|
||||
for (AuraMap::iterator i = m_Auras.begin(); i != m_Auras.end(); ++i)
|
||||
{
|
||||
(*i).second->ApplyAllModifiers(true);
|
||||
}
|
||||
}
|
||||
|
||||
bool Unit::HasAuraTypeWithMiscvalue(AuraType auratype, uint32 miscvalue) const
|
||||
@@ -12073,9 +12081,7 @@ void Unit::SetPower(Powers power, uint32 val)
|
||||
|
||||
// Update the pet's character sheet with happiness damage bonus
|
||||
if(pet->getPetType() == HUNTER_PET && power == POWER_HAPPINESS)
|
||||
{
|
||||
pet->UpdateDamagePhysical(BASE_ATTACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user