Core/AI: Allow creatures to evade
Port From (https://github.com/TrinityCore/TrinityCore/commit/93e66f3f3e8bdcf0138ab67c3edda948d6f97b00)
This commit is contained in:
@@ -285,7 +285,7 @@ namespace Game.AI
|
|||||||
{
|
{
|
||||||
if (!_isEngaged)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
_isEngaged = false;
|
_isEngaged = false;
|
||||||
@@ -295,7 +295,7 @@ namespace Game.AI
|
|||||||
|
|
||||||
public bool _EnterEvadeMode(EvadeReason why = EvadeReason.Other)
|
public bool _EnterEvadeMode(EvadeReason why = EvadeReason.Other)
|
||||||
{
|
{
|
||||||
if (!IsEngaged())
|
if (me.IsInEvadeMode())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (!me.IsAlive())
|
if (!me.IsAlive())
|
||||||
|
|||||||
Reference in New Issue
Block a user