Core/Entities: Fixed an issue where creatures would not properly assist formation members in certain scenarios.

Port From (https://github.com/TrinityCore/TrinityCore/commit/00b9c23e28dc19a3a9f45d1d5b86d203f55b2a7e)
This commit is contained in:
hondacrx
2021-11-02 14:16:25 -04:00
parent 78a466e5b6
commit 5e29a231c9
2 changed files with 4 additions and 8 deletions
+4
View File
@@ -306,6 +306,10 @@ namespace Game.Combat
CreatureAI ownerAI = cOwner.GetAI();
if (ownerAI != null)
ownerAI.JustEngagedWith(target);
CreatureGroup formation = cOwner.GetFormation();
if (formation != null)
formation.MemberEngagingTarget(cOwner, target);
}
}
-8
View File
@@ -108,14 +108,6 @@ namespace Game.Entities
m_threatManager.AddThreat(enemy, 0.0f, null, true, true);
else
SetInCombatWith(enemy);
Creature creature = ToCreature();
if (creature != null)
{
CreatureGroup formation = creature.GetFormation();
if (formation != null)
formation.MemberEngagingTarget(creature, enemy);
}
}
public void ClearInCombat() { m_combatManager.EndAllCombat(); }