diff options
| author | megamage <none@none> | 2009-04-06 20:33:52 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-04-06 20:33:52 -0500 |
| commit | ac4edf0e091f0a1e0b49ae39201183613f3453ad (patch) | |
| tree | 8ff4f3be6bc305ae9bef92caee25cd29670c833d /src/game/Unit.cpp | |
| parent | e8866340ce2cb717486c8def489ddc9d3046a0cc (diff) | |
*Update creature formation code.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 973b2a7ea35..d2e7a1b4188 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9537,7 +9537,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); @@ -9554,13 +9561,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)->GetFormation()) - { - ((Creature*)this)->GetFormation()->MemberHasAttacked(*(Creature*)this); - sLog.outDebug("Unit::CombatStart() calls CreatureGroups::MemberHasAttacked(this);"); - } } void Unit::SetInCombatState(bool PvP) |
