mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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 revert163f44c1b0(cherry picked from commit817ae5bca6)
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user