diff --git a/Source/Game/AI/CoreAI/CreatureAI.cs b/Source/Game/AI/CoreAI/CreatureAI.cs index 1c2a900c9..191d69eec 100644 --- a/Source/Game/AI/CoreAI/CreatureAI.cs +++ b/Source/Game/AI/CoreAI/CreatureAI.cs @@ -294,7 +294,10 @@ namespace Game.AI // sometimes bosses stuck in combat? me.CombatStop(true); - me.SetTappedBy(null); + + if (!me.IsTapListNotClearedOnEvade()) + me.SetTappedBy(null); + me.ResetPlayerDamageReq(); me.SetLastDamagedTime(0); me.SetCannotReachTarget(false); diff --git a/Source/Game/AI/ScriptedAI/ScriptedAI.cs b/Source/Game/AI/ScriptedAI/ScriptedAI.cs index f763d06cd..94c113d66 100644 --- a/Source/Game/AI/ScriptedAI/ScriptedAI.cs +++ b/Source/Game/AI/ScriptedAI/ScriptedAI.cs @@ -197,7 +197,10 @@ namespace Game.AI if (reset) { who.LoadCreaturesAddon(); - who.SetTappedBy(null); + + if (!me.IsTapListNotClearedOnEvade()) + who.SetTappedBy(null); + who.ResetPlayerDamageReq(); who.SetLastDamagedTime(0); who.SetCannotReachTarget(false); diff --git a/Source/Game/AI/ScriptedAI/ScriptedEscortAI.cs b/Source/Game/AI/ScriptedAI/ScriptedEscortAI.cs index c710cfa89..8b0ed12e2 100644 --- a/Source/Game/AI/ScriptedAI/ScriptedEscortAI.cs +++ b/Source/Game/AI/ScriptedAI/ScriptedEscortAI.cs @@ -121,7 +121,9 @@ namespace Game.AI { me.RemoveAllAuras(); me.CombatStop(true); - me.SetTappedBy(null); + + if (!me.IsTapListNotClearedOnEvade()) + me.SetTappedBy(null); EngagementOver(); diff --git a/Source/Game/Entities/Creature/Creature.Fields.cs b/Source/Game/Entities/Creature/Creature.Fields.cs index 904d7f65f..a0ed50c0d 100644 --- a/Source/Game/Entities/Creature/Creature.Fields.cs +++ b/Source/Game/Entities/Creature/Creature.Fields.cs @@ -87,6 +87,7 @@ namespace Game.Entities internal Dictionary m_personalLoot = new(); public Loot _loot; HashSet m_tapList = new(); + bool m_dontClearTapListOnEvade; } public enum ObjectCellMoveState diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index 017a2a86a..5cb025fc4 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -1205,6 +1205,15 @@ namespace Game.Entities { _lootId = lootId; } + + public void SetDontClearTapListOnEvade(bool dontClear) + { + // only temporary summons are allowed to not clear their tap list + if (m_spawnId == 0) + m_dontClearTapListOnEvade = dontClear; + } + + public bool IsTapListNotClearedOnEvade() { return m_dontClearTapListOnEvade; } public void SetTappedBy(Unit unit, bool withGroup = true) {