mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-04 22:07:52 +00:00
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:
@@ -24,6 +24,7 @@
|
||||
#include "ObjectDefines.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
@@ -711,7 +712,7 @@ void SmartAI::JustExitedCombat()
|
||||
CreatureAI::JustExitedCombat();
|
||||
}
|
||||
|
||||
void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||
void SmartAI::EnterEvadeMode(EvadeReason why)
|
||||
{
|
||||
if (mSuppressEvade)
|
||||
return;
|
||||
@@ -763,6 +764,8 @@ void SmartAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||
if (!me->HasUnitState(UNIT_STATE_EVADE))
|
||||
GetScript()->OnReset();
|
||||
}
|
||||
|
||||
sScriptMgr->OnUnitEnterEvadeMode(me, why);
|
||||
}
|
||||
|
||||
void SmartAI::MoveInLineOfSight(Unit* who)
|
||||
|
||||
Reference in New Issue
Block a user