diff options
author | megamage <none@none> | 2009-03-13 18:48:53 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-13 18:48:53 -0600 |
commit | a5882ee84afb8484b23cbeda3c5e4ab130574449 (patch) | |
tree | 8b713507200ffdc21931a9566212041fe256de55 /src/game/Unit.cpp | |
parent | 664fb612b4f87539a43632e31901e3b93f7aa3a0 (diff) | |
parent | 62cdd39279e573f99bc49db45a043bd057372afc (diff) |
*Merge.
*"Fix Glowing Blood" is not merged. Outdated patch?
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index a8275c73b9a..d91a6bf83e6 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -77,7 +77,7 @@ static bool procPrepared = InitTriggerAuraData(); Unit::Unit() : WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostilRefManager(this) -, m_IsInNotifyList(false), m_Notified(false), IsAIEnabled(false) +, m_IsInNotifyList(false), m_Notified(false), IsAIEnabled(false), NeedChangeAI(false) , i_AI(NULL), i_disabledAI(NULL) { m_objectType |= TYPEMASK_UNIT; @@ -479,6 +479,28 @@ void Unit::RemoveSpellsCausingAura(AuraType auraType) } } +void Unit::RemoveAuraTypeByCaster(AuraType auraType, uint64 casterGUID) +{ + if (auraType >= TOTAL_AURAS) return; + AuraList::iterator iter, next; + for(iter = m_modAuras[auraType].begin(); iter != m_modAuras[auraType].end(); ++iter) + { + next = iter; + ++next; + + if (*iter) + { + RemoveAurasByCasterSpell((*iter)->GetId(), casterGUID); + continue; + RemoveAurasDueToSpell((*iter)->GetId()); + if (!m_modAuras[auraType].empty()) + next = m_modAuras[auraType].begin(); + else + return; + } + } +} + void Unit::RemoveSpellsCausingAuraWithDispel(AuraType auraType, Spell * spell) { if (auraType >= TOTAL_AURAS) return; @@ -498,7 +520,7 @@ void Unit::RemoveSpellsCausingAuraWithDispel(AuraType auraType, Spell * spell) else return; } - } + } std::deque <Aura *> dispel_list; @@ -10321,7 +10343,6 @@ void Unit::setDeathState(DeathState s) ClearDiminishings(); GetMotionMaster()->Clear(false); GetMotionMaster()->MoveIdle(); - StopMoving(); //without this when removing IncreaseMaxHealth aura player may stuck with 1 hp //do not why since in IncreaseMaxHealth currenthealth is checked SetHealth(0); @@ -13088,7 +13109,6 @@ void Unit::SetCharmedOrPossessedBy(Unit* charmer, bool possess) if(GetTypeId() == TYPEID_UNIT) { ((Creature*)this)->AI()->OnCharmed(true); - StopMoving(); GetMotionMaster()->Clear(false); GetMotionMaster()->MoveIdle(); } |