mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 17:49:10 +00:00
feat(Core/SmartScripts): SMART_ACTION_DISABLE_EVADE (#9772)
* Update SmartScriptMgr.h * Update SmartScript.cpp * Update SmartAI.h * Update SmartAI.cpp
This commit is contained in:
committed by
GitHub
parent
7a612f3dd9
commit
f7ff583b7e
@@ -46,6 +46,7 @@ SmartAI::SmartAI(Creature* c) : CreatureAI(c)
|
||||
// spawn in run mode
|
||||
// Xinef: spawn in run mode and set mRun to run... this overrides SetWalk EVERYWHERE
|
||||
mRun = true;
|
||||
mEvadeDisabled = false;
|
||||
|
||||
mCanAutoAttack = true;
|
||||
mCanCombatMove = true;
|
||||
@@ -623,6 +624,12 @@ void SmartAI::EnterEvadeMode()
|
||||
if (!me->IsAlive() || me->IsInEvadeMode())
|
||||
return;
|
||||
|
||||
if (mEvadeDisabled)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_EVADE);
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->GetCharmerGUID().IsPlayer() || me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_POSSESSED))
|
||||
{
|
||||
me->AttackStop();
|
||||
@@ -935,6 +942,11 @@ void SmartAI::SetSwim(bool swim)
|
||||
me->SetSwim(swim);
|
||||
}
|
||||
|
||||
void SmartAI::SetEvadeDisabled(bool disable)
|
||||
{
|
||||
mEvadeDisabled = disable;
|
||||
}
|
||||
|
||||
void SmartAI::sGossipHello(Player* player)
|
||||
{
|
||||
GetScript()->ProcessEventsFor(SMART_EVENT_GOSSIP_HELLO, player);
|
||||
|
||||
Reference in New Issue
Block a user