fix(Core/SmartAI): Call unit evade mode hook for SmartAI aswell (#23958)

Co-authored-by: sudlud <sudlud@users.noreply.github.com>
This commit is contained in:
silviu20092
2026-06-13 15:13:19 +03:00
committed by GitHub
parent c04698c5c1
commit 8d0a1aaf6f
+4 -1
View File
@@ -24,6 +24,7 @@
#include "ObjectDefines.h" #include "ObjectDefines.h"
#include "ObjectMgr.h" #include "ObjectMgr.h"
#include "ScriptedCreature.h" #include "ScriptedCreature.h"
#include "ScriptMgr.h"
#include "SpellMgr.h" #include "SpellMgr.h"
#include "Vehicle.h" #include "Vehicle.h"
@@ -711,7 +712,7 @@ void SmartAI::JustExitedCombat()
CreatureAI::JustExitedCombat(); CreatureAI::JustExitedCombat();
} }
void SmartAI::EnterEvadeMode(EvadeReason /*why*/) void SmartAI::EnterEvadeMode(EvadeReason why)
{ {
if (mSuppressEvade) if (mSuppressEvade)
return; return;
@@ -763,6 +764,8 @@ void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
if (!me->HasUnitState(UNIT_STATE_EVADE)) if (!me->HasUnitState(UNIT_STATE_EVADE))
GetScript()->OnReset(); GetScript()->OnReset();
} }
sScriptMgr->OnUnitEnterEvadeMode(me, why);
} }
void SmartAI::MoveInLineOfSight(Unit* who) void SmartAI::MoveInLineOfSight(Unit* who)