diff options
| author | megamage <none@none> | 2008-12-13 10:12:22 -0600 | 
|---|---|---|
| committer | megamage <none@none> | 2008-12-13 10:12:22 -0600 | 
| commit | 98e122b15314c14c2db6dcf495335075f1543506 (patch) | |
| tree | bd9fa649d30c1e3bb4ffab142b7421cdbfe67410 /src/game/Unit.cpp | |
| parent | 328e5a1bdecd31f2411232a6f27adf96c96a716e (diff) | |
*Fix swiftmend healing bonus. By mobel.
*Only remove one HOT but not all HOT when using swiftmend.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 25 | 
1 files changed, 21 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index b7d805a437d..b5b54f063d7 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4522,6 +4522,25 @@ void Unit::RemoveAurasDueToSpell(uint32 spellId, Aura* except)          RemoveAura(spellId,i,except);  } +void Unit::RemoveAurasDueToCasterSpell(uint64 guid, uint32 spellId) +{ +    for (int k=0; k < 3; ++k) +    { +        spellEffectPair spair = spellEffectPair(spellId, k); +        for (AuraMap::iterator iter = m_Auras.lower_bound(spair); iter != m_Auras.upper_bound(spair);) +        { +            if (iter->second->GetCasterGUID() == guid) +            { +                RemoveAura(iter); +                break; +                //iter = m_Auras.upper_bound(spair);          // overwrite by more appropriate +            } +            else +                ++iter; +        } +    } +} +  void Unit::RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId)  {      for (int k=0; k < 3; ++k) @@ -12841,11 +12860,9 @@ void Unit::SetConfused(bool apply)      else      {          RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_CONFUSED); -        GetMotionMaster()->MovementExpired(false); -        if( GetTypeId() != TYPEID_PLAYER && isAlive() ) +        if(isAlive())          { -            // restore appropriate movement generator -            if(getVictim()) +            if( GetTypeId() != TYPEID_PLAYER && getVictim())                  GetMotionMaster()->MoveChase(getVictim());              else                  GetMotionMaster()->Initialize();  | 
