Core/AI: Allow creatures to evade (#24221)

* Core/AI: Allow creatures to evade

Revert changes that didn't allow creatures to evade anymore no matter how hard a script would try

* PArtially revert 163f44c1b0

(cherry picked from commit 817ae5bca6)
This commit is contained in:
Giacomo Pozzoni
2020-03-02 20:17:47 +01:00
committed by Shauren
parent ce9c7b477c
commit 93e66f3f3e

View File

@@ -288,7 +288,7 @@ void CreatureAI::EngagementOver()
{
if (!_isEngaged)
{
TC_LOG_ERROR("scripts.ai", "CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n%s", me->GetDebugInfo().c_str());
TC_LOG_DEBUG("scripts.ai", "CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n%s", me->GetDebugInfo().c_str());
return;
}
_isEngaged = false;
@@ -298,7 +298,7 @@ void CreatureAI::EngagementOver()
bool CreatureAI::_EnterEvadeMode(EvadeReason /*why*/)
{
if (!IsEngaged())
if (me->IsInEvadeMode())
return false;
if (!me->IsAlive())