mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user