diff options
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 6e7a2302c9f..468859726e1 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9496,7 +9496,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); @@ -9514,13 +9521,6 @@ void Unit::CombatStart(Unit* target) 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) |