aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 756a1ac7d43..d4503c0f55c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -503,6 +503,17 @@ void Unit::GetRandomContactPoint( const Unit* obj, float &x, float &y, float &z,
, GetAngle(obj) + (attacker_number ? (M_PI/2 - M_PI * rand_norm()) * (float)attacker_number / combat_reach / 3 : 0));
}
+void Unit::RemoveMovementImpairingAuras()
+{
+ for(AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end();)
+ {
+ if(spellmgr.GetSpellCustomAttr(iter->second->GetId()) & SPELL_ATTR_CU_MOVEMENT_IMPAIR)
+ RemoveAura(iter);
+ else
+ ++iter;
+ }
+}
+
void Unit::RemoveSpellsCausingAura(AuraType auraType)
{
if (auraType >= TOTAL_AURAS) return;