diff options
author | megamage <none@none> | 2009-04-06 20:40:18 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-06 20:40:18 -0500 |
commit | 8c97e8b78718ba4fa5573fa07af496a388299227 (patch) | |
tree | 859a80c6827034c9d4d04d26fac4787d0e425017 /src/game/Unit.cpp | |
parent | 9b908e4014de8d4ef428c74f94c480405160cfa7 (diff) | |
parent | ac4edf0e091f0a1e0b49ae39201183613f3453ad (diff) |
*Merge.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 06b4313dcbf..10694d1de2b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9541,7 +9541,14 @@ void Unit::CombatStart(Unit* target) if(!target->isInCombat() && target->GetTypeId() != TYPEID_PLAYER && !((Creature*)target)->HasReactState(REACT_PASSIVE) && ((Creature*)target)->IsAIEnabled) + { ((Creature*)target)->AI()->AttackStart(this); + if(((Creature*)target)->GetFormation()) + { + ((Creature*)target)->GetFormation()->MemberAttackStart((Creature*)target, this); + sLog.outDebug("Unit::CombatStart() calls CreatureGroups::MemberHasAttacked(this);"); + } + } SetInCombatWith(target); target->SetInCombatWith(this); @@ -9558,14 +9565,6 @@ void Unit::CombatStart(Unit* target) me->UpdatePvP(true); me->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT); } - - //Call creature group update - if(GetTypeId()==TYPEID_UNIT && ((Creature*)this)->GetFormationID()) - { - CreatureGroupHolderType::iterator itr = CreatureGroupHolder.find(((Creature*)this)->GetFormationID()); - if(itr != CreatureGroupHolder.end()) - itr->second->MemberHasAttacked(((Creature*)this)); - } } void Unit::SetInCombatState(bool PvP) |