From 5a667740082b8afa6af30d0f1e7082e8a3321fd3 Mon Sep 17 00:00:00 2001 From: megamage Date: Fri, 1 May 2009 15:36:32 -0500 Subject: *Fix the bug that shapeshift can remove blind. --HG-- branch : trunk --- src/game/Unit.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/game/Unit.cpp') 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; -- cgit v1.2.3