From 7cbfcf994993ca5658afe1c762b3307b1472975d Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 23 Jun 2021 15:14:51 -0400 Subject: [PATCH] Combat/Threat: Now set engaged state for all units on offline reference registration (vanished/invis'd units). For non-PASSIVE units, this will immediately cause an evade. Port From (https://github.com/TrinityCore/TrinityCore/commit/fdc1c5b6c952262f98f15f35dcf19fe293c65d5b) --- Source/Game/Combat/ThreatManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Game/Combat/ThreatManager.cs b/Source/Game/Combat/ThreatManager.cs index 20aa87a65..81c17f392 100644 --- a/Source/Game/Combat/ThreatManager.cs +++ b/Source/Game/Combat/ThreatManager.cs @@ -303,12 +303,12 @@ namespace Game.Combat PutThreatListRef(target.GetGUID(), newRefe); target.GetThreatManager().PutThreatenedByMeRef(_owner.GetGUID(), newRefe); - Creature cOwner = _owner.ToCreature(); - Cypher.Assert(cOwner != null); // if we got here the owner can have a threat list, and must be a creature! - if (!_ownerEngaged && (cOwner.HasReactState(ReactStates.Passive) || !newRefe.IsOffline())) + if (!_ownerEngaged) { _ownerEngaged = true; + Creature cOwner = _owner.ToCreature(); + Cypher.Assert(cOwner != null); // if we got here the owner can have a threat list, and must be a creature! SaveCreatureHomePositionIfNeed(cOwner); if (cOwner.IsAIEnabled) cOwner.GetAI().JustEngagedWith(target);