Core/AI: Allow creatures to evade

Port From (https://github.com/TrinityCore/TrinityCore/commit/93e66f3f3e8bdcf0138ab67c3edda948d6f97b00)
This commit is contained in:
hondacrx
2022-01-07 11:18:14 -05:00
parent ddbfe81071
commit 04a3bf7d8f
+2 -2
View File
@@ -285,7 +285,7 @@ namespace Game.AI
{
if (!_isEngaged)
{
Log.outError(LogFilter.ScriptsAi, $"CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n{me.GetDebugInfo()}");
Log.outDebug(LogFilter.ScriptsAi, $"CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n{me.GetDebugInfo()}");
return;
}
_isEngaged = false;
@@ -295,7 +295,7 @@ namespace Game.AI
public bool _EnterEvadeMode(EvadeReason why = EvadeReason.Other)
{
if (!IsEngaged())
if (me.IsInEvadeMode())
return false;
if (!me.IsAlive())