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 "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)
|
||||||
|
|||||||
Reference in New Issue
Block a user