diff options
author | megamage <none@none> | 2009-05-01 15:36:32 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-01 15:36:32 -0500 |
commit | 5a667740082b8afa6af30d0f1e7082e8a3321fd3 (patch) | |
tree | ae98a2abb25b95a45cae47c98dfcd8c83782fd0b /src/game/Unit.cpp | |
parent | 4fb815a9b85087e6dbc1983780b33e9611ea14dd (diff) |
*Fix the bug that shapeshift can remove blind.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 11 |
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; |