aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-27 17:32:56 +0200
committerQAston <none@none>2009-07-27 17:32:56 +0200
commite8f8b66636cbcd5d9995ce8b3bb64afb5a835851 (patch)
tree1409cf41ef5e567aa1b41d5623054d4f4a087f27 /src/game/Unit.cpp
parente3ef5da919bc88e851cb7fc878f118f127270954 (diff)
*Implement immunity removal part for Shattering Throw ability - by thenecromancer.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 69f42896dbd..2b4c320fbeb 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -553,6 +553,22 @@ void Unit::RemoveAurasWithFamily(uint32 family, uint32 familyFlag1, uint32 famil
}
}
+void Unit::RemoveAurasWithMechanic(uint32 mechanic_mask, uint32 except)
+{
+ for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ {
+ if (!except || iter->second->GetId() != except)
+ {
+ if(GetAllSpellMechanicMask(iter->second->GetSpellProto()) & mechanic_mask)
+ {
+ RemoveAura(iter, AURA_REMOVE_BY_ENEMY_SPELL);
+ continue;
+ }
+ }
+ ++iter;
+ }
+}
+
void Unit::UpdateInterruptMask()
{
m_interruptMask = 0;