diff options
author | QAston <none@none> | 2009-03-01 18:50:33 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-01 18:50:33 +0100 |
commit | 281f4ce49a614fecab071836b82f98f524f85ef2 (patch) | |
tree | 37736178fb906ad75d881b30d3d1be049cf0e11c /src/game/Unit.cpp | |
parent | 44de012148eda14fd3286b04a933ad9f9e286105 (diff) |
*Fix dispel chance mod calculation.
*Fix Escape artist-by Lightguard.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bbb7ffb9fb4..d0bd170b931 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -476,6 +476,28 @@ void Unit::RemoveSpellsCausingAura(AuraType auraType) } } +void Unit::RemoveSpellsCausingAuraWithDispel(AuraType auraType, Spell * spell) +{ + if (auraType >= TOTAL_AURAS) return; + AuraList::iterator iter, next; + for (iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); iter = next) + { + next = iter; + ++next; + + if (*iter) + { + if (!(*iter)->GetDispelChance(spell)) + continue; + RemoveAurasDueToSpell((*iter)->GetId()); + if (!m_modAuras[auraType].empty()) + next = m_modAuras[auraType].begin(); + else + return; + } + } +} + void Unit::RemoveAurasWithInterruptFlags(uint32 flag, uint32 except) { if(!(m_interruptMask & flag)) |