TrinityCore
CreatureAI Class Reference

#include <CreatureAI.h>

Public Types

enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_NO_PATH, EVADE_REASON_SEQUENCE_BREAK,
  EVADE_REASON_OTHER
}
 

Public Member Functions

 CreatureAI (Creature *creature, uint32 scriptId={})
 
virtual ~CreatureAI ()
 
uint32 GetId () const
 
bool IsEngaged () const
 
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
void JustEnteredCombat (Unit *) override
 
virtual void JustStartedThreateningMe (Unit *who)
 
virtual void JustEngagedWith (Unit *)
 
virtual void JustDied (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void JustSummonedGameobject (GameObject *)
 
virtual void SummonedGameobjectDespawn (GameObject *)
 
virtual void JustRegisteredDynObject (DynamicObject *)
 
virtual void JustUnregisteredDynObject (DynamicObject *)
 
virtual void JustRegisteredAreaTrigger (AreaTrigger *)
 
virtual void JustUnregisteredAreaTrigger (AreaTrigger *)
 
virtual void SpellHit (WorldObject *, SpellInfo const *)
 
virtual void SpellHitTarget (WorldObject *, SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual bool IsEscorted () const
 
virtual void JustAppeared ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool isNew) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual Optional< QuestGiverStatusGetDialogStatus (Player *player)
 == Gossip system ================================ More...
 
virtual bool OnGossipHello (Player *)
 
virtual bool OnGossipSelect (Player *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void OnQuestAccept (Player *, Quest const *)
 
virtual void OnQuestReward (Player *, Quest const *, LootItemType, uint32)
 
virtual void WaypointStarted (uint32, uint32)
 == Waypoints system ============================= More...
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual PlayerAIGetAIForCharmedPlayer (Player *)
 
int32 VisualizeBoundary (Seconds duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void AttackStart (Unit *)
 
virtual void UpdateAI (uint32 diff)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit *> &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit *> &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
virtual void JustExitedCombat ()
 
virtual void LeavingWorld ()
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellInfo const *)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastSelf (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastVictim (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastAOE (uint32 spellId, CastSpellExtraArgs const &args={})
 
virtual bool ShouldSparWith (Unit const *) const
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void OnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Static Public Member Functions

static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 

Protected Member Functions

bool UpdateVictim ()
 
CreatureDoSummon (uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 

Protected Attributes

Creature *const me
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Private Member Functions

void OnOwnerCombatInteraction (Unit *target)
 

Private Attributes

uint32 const _scriptId
 
bool _isEngaged
 
bool _moveInLOSLocked
 

Additional Inherited Members

- Static Public Attributes inherited from UnitAI
static std::unordered_map< std::pair< uint32, Difficulty >, AISpellInfoTypeAISpellInfo
 

Member Enumeration Documentation

◆ EvadeReason

Enumerator
EVADE_REASON_NO_HOSTILES 
EVADE_REASON_BOUNDARY 
EVADE_REASON_NO_PATH 
EVADE_REASON_SEQUENCE_BREAK 
EVADE_REASON_OTHER 
72  {
73  EVADE_REASON_NO_HOSTILES, // the creature's threat list is empty
74  EVADE_REASON_BOUNDARY, // the creature has moved outside its evade boundary
75  EVADE_REASON_NO_PATH, // the creature was unable to reach its target for over 5 seconds
76  EVADE_REASON_SEQUENCE_BREAK, // this is a boss and the pre-requisite encounters for engaging it are not defeated yet
77  EVADE_REASON_OTHER, // anything else
78  };
Definition: CreatureAI.h:76
Definition: CreatureAI.h:74
Definition: CreatureAI.h:77
Definition: CreatureAI.h:73
Definition: CreatureAI.h:75

Constructor & Destructor Documentation

◆ CreatureAI()

CreatureAI::CreatureAI ( Creature creature,
uint32  scriptId = {} 
)
explicit
44  : UnitAI(creature), me(creature), _boundary(nullptr),
45  _negateBoundary(false), _scriptId(scriptId ? scriptId : creature->GetScriptId()), _isEngaged(false), _moveInLOSLocked(false)
46 {
47  ASSERT(_scriptId, "A CreatureAI was initialized with an invalid scriptId!");
48 }
uint32 const _scriptId
Definition: CreatureAI.h:261
bool _negateBoundary
Definition: CreatureAI.h:256
bool _moveInLOSLocked
Definition: CreatureAI.h:263
UnitAI(Unit *unit)
Definition: UnitAI.h:138
Creature *const me
Definition: CreatureAI.h:61
uint32 GetScriptId() const
Definition: Creature.cpp:3003
CreatureBoundary const * _boundary
Definition: CreatureAI.h:255
bool _isEngaged
Definition: CreatureAI.h:262
#define ASSERT
Definition: Errors.h:68

◆ ~CreatureAI()

CreatureAI::~CreatureAI ( )
virtual
51 {
52 }

Member Function Documentation

◆ _EnterEvadeMode()

bool CreatureAI::_EnterEvadeMode ( EvadeReason  why = EVADE_REASON_OTHER)
protected
301 {
302  if (me->IsInEvadeMode())
303  return false;
304 
305  if (!me->IsAlive())
306  {
307  EngagementOver();
308  return false;
309  }
310 
312 
313  me->CombatStop(true);
314  me->SetLootRecipient(nullptr);
317  me->SetCannotReachTarget(false);
321  EngagementOver();
322 
323  return true;
324 }
void ResetPlayerDamageReq()
Definition: Creature.h:340
bool IsInEvadeMode() const
Definition: Creature.h:170
static ObjectGuid const Empty
Definition: ObjectGuid.h:265
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition: Unit.cpp:5670
void SetLastDamagedTime(time_t val)
Definition: Creature.h:367
void ResetAllCooldowns()
Definition: SpellHistory.cpp:648
Creature *const me
Definition: CreatureAI.h:61
SpellHistory * GetSpellHistory()
Definition: Unit.h:1538
bool IsAlive() const
Definition: Unit.h:1251
void EngagementOver()
Definition: CreatureAI.cpp:288
void SetCannotReachTarget(bool cannotReach)
Definition: Creature.cpp:3126
void RemoveAurasOnEvade()
Definition: Unit.cpp:4159
void SetLootRecipient(Unit *unit, bool withGroup=true)
Definition: Creature.cpp:1330
void SetTarget(ObjectGuid const &guid) override
Definition: Creature.cpp:3234
void DoNotReacquireSpellFocusTarget()
Definition: Creature.cpp:3360
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CanSeeAlways()

virtual bool CreatureAI::CanSeeAlways ( WorldObject const *  )
inlinevirtual

Reimplemented in boss_veras_darkshadow, and GuardAI.

230 { return false; }
+ Here is the caller graph for this function:

◆ CheckInRoom()

bool CreatureAI::CheckInRoom ( )
virtual

Reimplemented in boss_galvangar, and boss_drekthar.

437 {
438  if (IsInBoundary())
439  return true;
440  else
441  {
443  return false;
444  }
445 }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:220
bool IsInBoundary(Position const *who=nullptr) const
Definition: CreatureAI.cpp:409
Definition: CreatureAI.h:74
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CorpseRemoved()

virtual void CreatureAI::CorpseRemoved ( uint32 )
inlinevirtual

== Triggered Actions Requested ==================

== State checks =================================

Reimplemented in SmartAI.

193 { }
+ Here is the caller graph for this function:

◆ DoSummon() [1/2]

Creature * CreatureAI::DoSummon ( uint32  entry,
Position const &  pos,
Milliseconds  despawnTime = 30s,
TempSummonType  summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN 
)
protected
448 {
449  return me->SummonCreature(entry, pos, summonType, despawnTime);
450 }
Creature *const me
Definition: CreatureAI.h:61
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:1927
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoSummon() [2/2]

Creature * CreatureAI::DoSummon ( uint32  entry,
WorldObject obj,
float  radius = 5.0f,
Milliseconds  despawnTime = 30s,
TempSummonType  summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN 
)
protected
453 {
454  Position pos = obj->GetRandomNearPosition(radius);
455  return me->SummonCreature(entry, pos, summonType, despawnTime);
456 }
Creature *const me
Definition: CreatureAI.h:61
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:1927
Position GetRandomNearPosition(float radius)
Definition: Object.cpp:3282
Definition: Position.h:27
+ Here is the call graph for this function:

◆ DoSummonFlyer()

Creature * CreatureAI::DoSummonFlyer ( uint32  entry,
WorldObject obj,
float  flightZ,
float  radius = 5.0f,
Milliseconds  despawnTime = 30s,
TempSummonType  summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN 
)
protected
459 {
460  Position pos = obj->GetRandomNearPosition(radius);
461  pos.m_positionZ += flightZ;
462  return me->SummonCreature(entry, pos, summonType, despawnTime);
463 }
Creature *const me
Definition: CreatureAI.h:61
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:1927
Position GetRandomNearPosition(float radius)
Definition: Object.cpp:3282
float m_positionZ
Definition: Position.h:55
Definition: Position.h:27
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoZoneInCombat()

void CreatureAI::DoZoneInCombat ( Creature creature = nullptr)
80 {
81  if (!creature)
82  creature = me;
83 
84  Map* map = creature->GetMap();
85  if (!map->IsDungeon()) // use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
86  {
87  TC_LOG_ERROR("scripts.ai", "CreatureAI::DoZoneInCombat: call for map that isn't an instance (%s)", creature->GetGUID().ToString().c_str());
88  return;
89  }
90 
91  if (!map->HavePlayers())
92  return;
93 
94  for (MapReference const& ref : map->GetPlayers())
95  {
96  if (Player* player = ref.GetSource())
97  {
98  if (!player->IsAlive() || !CombatManager::CanBeginCombat(creature, player))
99  continue;
100 
101  creature->EngageWithTarget(player);
102 
103  for (Unit* pet : player->m_Controlled)
104  creature->EngageWithTarget(pet);
105 
106  if (Unit* vehicle = player->GetVehicleBase())
107  creature->EngageWithTarget(vehicle);
108  }
109  }
110 }
static bool CanBeginCombat(Unit const *a, Unit const *b)
Definition: CombatManager.cpp:23
std::string ToString() const
Definition: ObjectGuid.cpp:531
Unit * GetVehicleBase() const
Definition: Unit.cpp:11437
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:156
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:185
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:7818
bool IsDungeon() const
Definition: Map.cpp:4420
Map * GetMap() const
Definition: Object.h:555
Creature *const me
Definition: CreatureAI.h:61
PlayerList const & GetPlayers() const
Definition: Map.h:438
bool HavePlayers() const
Definition: Map.h:428
Definition: Map.h:264
ControlList m_Controlled
Definition: Unit.h:1296
Definition: Unit.h:746
Definition: Player.h:1131
Definition: MapReference.h:26
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EngagementOver()

void CreatureAI::EngagementOver ( )
protected
289 {
290  if (!_isEngaged)
291  {
292  TC_LOG_DEBUG("scripts.ai", "CreatureAI::EngagementOver called even though creature is not currently engaged. Creature debug info:\n%s", me->GetDebugInfo().c_str());
293  return;
294  }
295  _isEngaged = false;
296 
297  me->AtDisengage();
298 }
Creature *const me
Definition: CreatureAI.h:61
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:176
bool _isEngaged
Definition: CreatureAI.h:262
void AtDisengage() override
Definition: Creature.cpp:3475
std::string GetDebugInfo() const override
Definition: Creature.cpp:3498
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EngagementStart()

void CreatureAI::EngagementStart ( Unit who)
protected
277 {
278  if (_isEngaged)
279  {
280  TC_LOG_ERROR("scripts.ai", "CreatureAI::EngagementStart called even though creature is already engaged. Creature debug info:\n%s", me->GetDebugInfo().c_str());
281  return;
282  }
283  _isEngaged = true;
284 
285  me->AtEngage(who);
286 }
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:185
Creature *const me
Definition: CreatureAI.h:61
void AtEngage(Unit *target) override
Definition: Creature.cpp:3437
bool _isEngaged
Definition: CreatureAI.h:262
std::string GetDebugInfo() const override
Definition: Creature.cpp:3498
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnterEvadeMode()

void CreatureAI::EnterEvadeMode ( EvadeReason  why = EVADE_REASON_OTHER)
virtual

Reimplemented in npc_broken_frostmourne, npc_terenas_menethil, npc_phantom_hallucination::npc_phantom_hallucinationAI, npc_gunship_mage, npc_phantom_mage::npc_phantom_mageAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_razorscale_devouring_flame, npc_gauntlet_trash, npc_scion_of_eternity, npc_the_lich_king_escape_hor::npc_the_lich_king_escape_horAI, npc_thorim_arena_phase::npc_thorim_arena_phaseAI, npc_nexus_lord, npc_caster_hover_disk, boss_aerial_command_unit::boss_aerial_command_unitAI, npc_meteor_strike_flame::npc_meteor_strike_flameAI, npc_muradin_bronzebeard_igb, npc_akama_illidan, npc_meteor_strike_initial::npc_meteor_strike_initialAI, boss_vx_001::boss_vx_001AI, npc_ashtongue_spiritbinder, npc_tesla, npc_vampiric_fiend, npc_ashtongue_elementalist, npc_high_overlord_saurfang_igb, npc_argent_captainAI, npc_ashtongue_rogue, npc_black_hole, DarkFallenAI, npc_gothik_trigger, npc_kelthuzad_guardian, npc_feugen, npc_ashtongue_sorcerer, npc_reliquary_combat_trigger, npc_hadronox_foeAI, boss_kiljaeden::boss_kiljaedenAI, npc_kelthuzad_minionAI, npc_gothik_minion_baseAI, gunship_npc_AI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, boss_malygos, boss_the_lich_king, boss_illidan_stormrage, npc_tirion_toc, boss_razorscale, boss_thorim::boss_thorimAI, npc_ember_of_alar, boss_massive_jormungar, npc_stalagg, boss_sathrovarr, boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI, boss_algalon_the_observer, boss_fjola, boss_twilight_halion::boss_twilight_halionAI, npc_anubarak_pet_template, npc_hadronox_crusherPackAI, boss_gothik, boss_lady_deathwhisper, npc_akama_shade, npc_gatewatcher_petAI, boss_midnight::boss_midnightAI, PalehoofMinionsBossAI, npc_hellfire_channeler, boss_drakkari_elemental, boss_deathbringer_saurfang, npc_alpha_beam::npc_alpha_beamAI, boss_four_horsemen_baseAI, boss_sindragosa, npc_omega_stance::npc_omega_stanceAI, boss_northrend_beastsAI, IllidariCouncilBossAI, npc_blazing_monstrosity::npc_blazing_monstrosityAI, boss_palehoof, boss_hadronox, boss_blood_council_controller, boss_blood_queen_lana_thel, npc_baltharus_the_warborn_clone, boss_reliquary_of_souls, boss_muru, boss_halion::boss_halionAI, boss_kelthuzad, boss_shade_of_akama, boss_garothi_worldbreaker, npc_mrfloppy, boss_auriaya, boss_baleroc, npc_firelands_molten_flamefather, boss_krik_thir, boss_viscidus::boss_viscidusAI, npc_tournament_training_dummy, npc_eyestalk::npc_eyestalkAI, npc_icefang, npc_onyx_flamecaller, boss_ahune, boss_jedoga_shadowseeker, npc_raging_flames, boss_doomrel::boss_doomrelAI, boss_thaddius, boss_ossirian::boss_ossirianAI, boss_bjarngrim, boss_entropius, npc_pet_mage_mirror_image, boss_xt002, boss_tyrannus, boss_skadi, boss_sjonnir, boss_illidari_council, boss_felblood_kaelthas, boss_baltharus_the_warborn, npc_fallout_slime, boss_anub_arak, boss_rotface, boss_kalecgos, boss_coren_direbrew, boss_festergut, boss_jaraxxus, boss_magtheridon, boss_brutallus::boss_brutallusAI, boss_gurtogg_bloodboil, boss_nightbane::boss_nightbaneAI, npc_firelands_flame_archon, boss_ayamiss::boss_ayamissAI, boss_mother_shahraz, npc_ruul_snowhoof::npc_ruul_snowhoofAI, boss_saviana_ragefire, hyjalAI, firelands_bossAI, boss_apothecary_hummel, boss_infinite_corruptor::boss_infinite_corruptorAI, boss_teron_gorefiend, boss_alizabal::boss_alizabalAI, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, boss_grandmaster_vorpil, boss_urom, boss_general_zarithrian, boss_gal_darah, boss_amanitar, SmartAI, boss_moorabi, boss_attumen::boss_attumenAI, npc_blackfathom_deeps_event, boss_noth, boss_skeram::boss_skeramAI, boss_nethermancer_sepethrea, boss_occuthar::boss_occutharAI, boss_supremus, boss_najentus, CritterAI, boss_buru::boss_buruAI, boss_hungarfen, npc_daegarn, NullCreatureAI, boss_pit_lord_argaloth::boss_pit_lord_argalothAI, PetAI, npc_pet_gen_pandaren_monk, PossessedAI, EscortAI, npc_pet_pri_lightwell, GuardAI, and ScheduledChangeAI.

221 {
222  if (!_EnterEvadeMode(why))
223  return;
224 
225  TC_LOG_DEBUG("scripts.ai", "CreatureAI::EnterEvadeMode: entering evade mode (why: %u) (%s)", why, me->GetGUID().ToString().c_str());
226 
227  if (!me->GetVehicle()) // otherwise me will be in evade mode forever
228  {
229  if (Unit* owner = me->GetCharmerOrOwner())
230  {
231  me->GetMotionMaster()->Clear();
233  }
234  else
235  {
236  // Required to prevent attacking creatures that are evading and cause them to reenter combat
237  // Does not apply to MoveFollow
240  }
241  }
242 
243  Reset();
244 }
std::string ToString() const
Definition: ObjectGuid.cpp:531
void AddUnitState(uint32 f)
Definition: Unit.h:849
void MoveFollow(Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
Definition: MotionMaster.cpp:608
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:156
MotionMaster * GetMotionMaster()
Definition: Unit.h:1736
void MoveTargetedHome()
Definition: MotionMaster.cpp:575
Definition: Unit.h:264
Vehicle * GetVehicle() const
Definition: Unit.h:1801
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:300
Creature *const me
Definition: CreatureAI.h:61
Unit * GetCharmerOrOwner() const
Definition: Unit.h:1285
virtual float GetFollowAngle() const
Definition: Unit.h:1835
void Clear()
Definition: MotionMaster.cpp:433
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:176
#define PET_FOLLOW_DIST
Definition: PetDefines.h:91
virtual void Reset()
Definition: UnitAI.h:147
Definition: Unit.h:746
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAIForCharmedPlayer()

virtual PlayerAI* CreatureAI::GetAIForCharmedPlayer ( Player )
inlinevirtual

Reimplemented in boss_kelthuzad, and boss_blackheart_the_inciter_mc_dummy.

235 { return nullptr; }

◆ GetBoundary()

CreatureBoundary const* CreatureAI::GetBoundary ( ) const
inline
242 { return _boundary; }
CreatureBoundary const * _boundary
Definition: CreatureAI.h:255

◆ GetDialogStatus()

Optional< QuestGiverStatus > CreatureAI::GetDialogStatus ( Player player)
virtual

== Gossip system ================================

327 {
328  return {};
329 }

◆ GetId()

uint32 CreatureAI::GetId ( ) const
inline
85 { return _scriptId; }
uint32 const _scriptId
Definition: CreatureAI.h:261
+ Here is the caller graph for this function:

◆ IsEngaged()

bool CreatureAI::IsEngaged ( ) const
inline
87 { return _isEngaged; }
bool _isEngaged
Definition: CreatureAI.h:262
+ Here is the caller graph for this function:

◆ IsEscorted()

virtual bool CreatureAI::IsEscorted ( ) const
inlinevirtual

Reimplemented in EscortAI, and FollowerAI.

155 { return false; }

◆ IsInBoundary()

bool CreatureAI::IsInBoundary ( Position const *  who = nullptr) const
410 {
411  if (!_boundary)
412  return true;
413 
414  if (!who)
415  who = me;
416 
418 }
bool _negateBoundary
Definition: CreatureAI.h:256
static bool IsInBounds(CreatureBoundary const &boundary, Position const *who)
Definition: CreatureAI.cpp:420
Creature *const me
Definition: CreatureAI.h:61
CreatureBoundary const * _boundary
Definition: CreatureAI.h:255
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsInBounds()

bool CreatureAI::IsInBounds ( CreatureBoundary const &  boundary,
Position const *  who 
)
static
421 {
422  for (AreaBoundary const* areaBoundary : boundary)
423  if (!areaBoundary->IsWithinBoundary(pos))
424  return false;
425 
426  return true;
427 }
Definition: AreaBoundary.h:23
+ Here is the caller graph for this function:

◆ IsSummonedBy()

virtual void CreatureAI::IsSummonedBy ( WorldObject )
inlinevirtual

Reimplemented in npc_risen_witch_doctor::npc_risen_witch_doctorAI, npc_raging_ghoul::npc_raging_ghoulAI, npc_escape_event_trash, npc_broken_frostmourne, npc_imp_in_a_ball::npc_imp_in_a_ballAI, npc_spirit_bomb, npc_terenas_menethil, npc_yogg_saron_illusions::npc_yogg_saron_illusionsAI, npc_yogg_saron_keeper::npc_yogg_saron_keeperAI, npc_strangulate_vehicle, npc_static_field, npc_valkyr_shadowguard, npc_wyrmrest_skytalon, npc_arcane_overload, npc_raging_spirit, npc_constrictor_tentacle::npc_constrictor_tentacleAI, npc_living_ember::npc_living_emberAI, npc_scion_of_eternity, npc_living_inferno::npc_living_infernoAI, npc_combustion_consumption::npc_combustion_consumptionAI, npc_guardian_of_yogg_saron::npc_guardian_of_yogg_saronAI, npc_meteor_strike_flame::npc_meteor_strike_flameAI, npc_meteor_strike::npc_meteor_strikeAI, npc_meteor_strike_initial::npc_meteor_strike_initialAI, npc_oscillating_frequency_scanner_master_bunny::npc_oscillating_frequency_scanner_master_bunnyAI, npc_suppresser, npc_chains_of_woe::npc_chains_of_woeAI, npc_frostbrood_skytalon, npc_raz_the_crazed::npc_raz_the_crazedAI, npc_skadi_trashAI, npc_bone_spike, npc_spirit_shade::npc_spirit_shadeAI, npc_void_sentinel, npc_felblood_kaelthas_phoenix, npc_dark_fiend, npc_molten_barrage::npc_molten_barrageAI, npc_coldflame, npc_direbrew_minion, npc_devout_follower::npc_devout_followerAI, npc_alpha_beam::npc_alpha_beamAI, npc_big_ooze, npc_omega_stance::npc_omega_stanceAI, npc_ice_block::npc_ice_blockAI, npc_shard_of_torment, npc_rock_borer::npc_rock_borerAI, npc_ruby_emerald_amber_drake, npc_little_ooze, npc_flash_freeze::npc_flash_freezeAI, npc_iron_roots::npc_iron_rootsAI, npc_firelands_magmakin, npc_corrupted_soul_fragment, npc_demon_chain::npc_demon_chainAI, npc_pit_of_saron_icicle, npc_image_belgaristrasz, npc_stolen_soul, npc_crystal_spike_trigger, npc_onyx_flamecaller, boss_rend_blackhand, boss_blackheart_the_inciter_mc_dummy, npc_eyestalk::npc_eyestalkAI, boss_attumen::boss_attumenAI, npc_fallout_slime, npc_void_sentry, npc_infernal_attacker::npc_infernal_attackerAI, npc_tiger_matriarch, SmartAI, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, npc_frozen_orb, npc_danica_the_reclaimer, npc_blackfathom_deeps_event, boss_nazan::boss_nazanAI, boss_darkmaster_gandling::boss_darkmaster_gandlingAI, TriggerAI, npc_frost_tomb, npc_pet_pri_shadowfiend, and boss_gizrul_the_slavener.

119 { }
+ Here is the caller graph for this function:

◆ JustAppeared()

void CreatureAI::JustAppeared ( )
virtual

Reimplemented in npc_gen_void_zone, npc_maiev, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_kael_flamestrike, npc_scarlet_ghoul, npc_sindragosa_trash, npc_kelthuzad_shadow_fissure, npc_rimefang_icc, npc_storm_cloud, npc_greyheart_spellbinder::npc_greyheart_spellbinderAI, npc_dark_rider_of_acherus, npc_martha_goslin::npc_martha_goslinAI, npc_spinestalker, npc_xt_void_zone, npc_ahune_ice_spear_bunny, npc_halion_controller::npc_halion_controllerAI, BloodPrincesBossAI, npc_chromie_middle::npc_chromie_middleAI, npc_sapphiron_wing_buffet, npc_iron_sludge, boss_headless_horseman, npc_blackhand_incarcerator, boss_hadronox, npc_malformed_ooze, boss_garothi_worldbreaker, npc_void_traveler, boss_thaddius, boss_twin_baseAI, npc_headless_horseman_head, boss_felmyst::boss_felmystAI, npc_voidwalker_summoner, SmartAI, npc_raging_flames, npc_pet_lich, boss_krik_thir, npc_grobbulus_poison_cloud, npc_pet_gen_soul_trader, npc_av_marshal_or_warmaster, boss_doomlord_kazzak, boss_drekthar, npc_brunnhildar_prisoner, NullCreatureAI, PetAI, npc_pet_hunter_snake_trap, and ScheduledChangeAI.

196 {
197  if (!IsEngaged())
198  {
199  if (TempSummon* summon = me->ToTempSummon())
200  {
201  // Only apply this to specific types of summons
202  if (!summon->GetVehicle() && ShouldFollowOnSpawn(summon->m_Properties) && summon->CanFollowOwner())
203  {
204  if (Unit* owner = summon->GetCharmerOrOwner())
205  {
206  summon->GetMotionMaster()->Clear();
207  summon->GetMotionMaster()->MoveFollow(owner, PET_FOLLOW_DIST, summon->GetFollowAngle());
208  }
209  }
210  }
211  }
212 }
Definition: TemporarySummon.h:43
static bool ShouldFollowOnSpawn(SummonPropertiesEntry const *properties)
Definition: CreatureAI.cpp:164
TempSummon * ToTempSummon()
Definition: Unit.h:1847
Creature *const me
Definition: CreatureAI.h:61
Unit * GetCharmerOrOwner() const
Definition: Unit.h:1285
bool IsEngaged() const
Definition: CreatureAI.h:87
#define PET_FOLLOW_DIST
Definition: PetDefines.h:91
Definition: Unit.h:746
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ JustDied()

virtual void CreatureAI::JustDied ( Unit )
inlinevirtual

Reimplemented in npc_quel_delar_sword::npc_quel_delar_swordAI, npc_spiritual_reflection::npc_spiritual_reflectionAI, npc_frostsworn_general::npc_frostsworn_generalAI, npc_wg_give_promotion_credit::npc_wg_give_promotion_creditAI, npc_toc_enh_shaman, npc_spirit_warden, npc_the_lich_king_tirion_dawn::npc_the_lich_king_tirion_dawnAI, npc_phantom_hallucination::npc_phantom_hallucinationAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_flame_of_azzinoth, npc_ancient_rune_giant::npc_ancient_rune_giantAI, alliance_rifleman::alliance_riflemanAI, npc_enraged_spirit::npc_enraged_spiritAI, npc_influence_tentacle::npc_influence_tentacleAI, npc_runic_colossus::npc_runic_colossusAI, npc_raging_spirit, npc_scion_of_eternity, npc_living_ember::npc_living_emberAI, npc_gargoyle::npc_gargoyleAI, boss_romulo::boss_romuloAI, npc_living_inferno::npc_living_infernoAI, npc_nexus_lord, npc_giant_flesh_tentacle::flesh_tentacleAI, npc_phoenix_tk, npc_snaplasher::npc_snaplasherAI, npc_giant_eye_tentacle::giant_eye_tentacleAI, npc_frost_wyrm::npc_frost_wyrmAI, npc_frostwing_ymirjar_vrykul, npc_storm_lasher::npc_storm_lasherAI, npc_guardian_of_yogg_saron::npc_guardian_of_yogg_saronAI, boss_master_engineer_telonicus, boss_julianne::boss_julianneAI, npc_thorim_pre_phase::npc_thorim_pre_phaseAI, npc_ancient_water_spirit::npc_ancient_water_spiritAI, npc_giant_claw_tentacle::giant_claw_tentacleAI, npc_illidari_spawn::npc_illidari_spawnAI, npc_power_spark, boss_grand_astromancer_capernian, boss_rouge_toc5::boss_rouge_toc5AI, boss_lord_sanguinar, npc_claw_tentacle::claw_tentacleAI, npc_ashtongue_spiritbinder, boss_malygos, npc_hand_of_the_deceiver::npc_hand_of_the_deceiverAI, boss_yogg_saron::boss_yogg_saronAI, npc_colossus::npc_colossusAI, boss_elder_ironbranch::boss_elder_ironbranchAI, npc_hodir_mage::npc_hodir_mageAI, npc_ros_dark_rider::npc_ros_dark_riderAI, npc_eye_tentacle::eye_tentacleAI, boss_thaladred_the_darkener, npc_ashtongue_elementalist, boss_bigbadwolf::boss_bigbadwolfAI, boss_hunter_toc5::boss_hunter_toc5AI, npc_torloth_the_magnificent::npc_torloth_the_magnificentAI, npc_gluttonous_abomination, npc_blistering_zombie, npc_mechanolift::npc_mechanoliftAI, npc_hodir_druid::npc_hodir_druidAI, npc_ashtongue_rogue, npc_darnavan, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, advisorbase_ai, boss_cthun::cthunAI, npc_counselor_talbot::npc_counselor_talbotAI, boss_elder_stonebark::boss_elder_stonebarkAI, npc_argent_captainAI, npc_greyheart_spellbinder::npc_greyheart_spellbinderAI, npc_rimefang_icc, boss_flame_leviathan_safety_container::boss_flame_leviathan_safety_containerAI, npc_gatewatcher_web_wrap, npc_skittering_infector, npc_hodir_shaman::npc_hodir_shamanAI, npc_ashtongue_defender, npc_twisted_visage, npc_kelthuzad_abomination, boss_shaman_toc5::boss_shaman_toc5AI, boss_elder_brightleaf::boss_elder_brightleafAI, npc_hodir_priest::npc_hodir_priestAI, boss_crone::boss_croneAI, npc_gunship::npc_gunshipAI, npc_qiraj_war_spawn::npc_qiraj_war_spawnAI, npc_ashtongue_sorcerer, boss_jormungarAI, npc_spinestalker, npc_tainted_elemental::npc_tainted_elementalAI, npc_acolyte_of_vesperon, boss_illidan_stormrage, boss_leotheras_the_blind_demonform::boss_leotheras_the_blind_demonformAI, boss_kiljaeden::boss_kiljaedenAI, boss_faction_championsAI, npc_thassarian::npc_thassarianAI, npc_acolyte_of_shadron, boss_roar::boss_roarAI, boss_fathomguard_caribdis::boss_fathomguard_caribdisAI, npc_ice_tomb, npc_argent_soldier::npc_argent_soldierAI, npc_halion_controller::npc_halion_controllerAI, boss_freya::boss_freyaAI, gunship_npc_AI, boss_mage_toc5::boss_mage_toc5AI, npc_ymirjar_harpooner, boss_kaelthas, npc_gothik_minion_baseAI, npc_watcher_silthik, boss_grubbis::boss_grubbisAI, npc_anub_ar_crusher, boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI, boss_the_lich_king, boss_stormcaller_brundir::boss_stormcaller_brundirAI, boss_razorscale, npc_akama_shade, boss_krosh_firehand::boss_krosh_firehandAI, boss_essence_of_anger, boss_sathrovarr, boss_tinhead::boss_tinheadAI, npc_hellfire_sentry::npc_hellfire_sentryAI, npc_memory::npc_memoryAI, boss_fathomguard_tidalvess::boss_fathomguard_tidalvessAI, npc_watcher_narjil, npc_swarm_scarab, BloodPrincesBossAI, npc_feral_defender, npc_rotting_frost_giant, boss_archimonde::boss_archimondeAI, boss_twilight_halion::boss_twilight_halionAI, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, boss_mimiron::boss_mimironAI, boss_blindeye_the_seer::boss_blindeye_the_seerAI, boss_headless_horseman, npc_void_sentinel, boss_warrior_toc5::boss_warrior_toc5AI, boss_alythess::boss_alythessAI, npc_snobold_vassal, npc_bone_spike, npc_xt002_heart, boss_nefarian, npc_anubarak_pet_template, npc_mistress_of_pain, npc_egg_pile::npc_egg_pileAI, npc_blessed_banner, npc_watcher_gashra, boss_priestess_lackey_commonAI, boss_leotheras_the_blind::boss_leotheras_the_blindAI, boss_strawman::boss_strawmanAI, npc_chained_spirit, npc_stonekeepers::npc_stonekeepersAI, WorldBossAI, npc_iron_sludge, boss_kalecgos_human, npc_precious_icc, boss_volazj, npc_ahune_bunny, boss_fathomguard_sharkkis::boss_fathomguard_sharkkisAI, boss_gothik, boss_kiggler_the_crazed::boss_kiggler_the_crazedAI, boss_runemaster_molgeim::boss_runemaster_molgeimAI, npc_omen, boss_lady_deathwhisper, PalehoofMinionsBossAI, npc_stinky_icc, boss_saronite_animus::boss_saronite_animusAI, npc_fel_orc_convert::npc_fel_orc_convertAI, BossAI, npc_grauf, npc_stolen_soul, npc_hellfire_channeler, npc_tomb_creature::npc_tomb_creatureAI, boss_flame_leviathan::boss_flame_leviathanAI, npc_apothecary_baxter, dummy_dragonAI, boss_sister_svalna, npc_barada::npc_baradaAI, boss_four_horsemen_baseAI, boss_blood_council_controller, npc_son_of_flame, boss_deathbringer_saurfang, npc_shadowmoon_channeler::npc_shadowmoon_channelerAI, npc_apothecary_frye, npc_weegli_blastfuse::npc_weegli_blastfuseAI, npc_big_ooze, npc_sanctum_sentry, boss_northrend_beastsAI, boss_professor_putricide, npc_frozen_core, boss_black_knight::boss_black_knightAI, npc_kurenai_captive::npc_kurenai_captiveAI, boss_anub_arak, npc_headless_horseman_head, boss_urom, npc_glob_of_viscidus::npc_glob_of_viscidusAI, npc_blazing_monstrosity::npc_blazing_monstrosityAI, boss_ymiron, boss_netherspite::boss_netherspiteAI, npc_tito::npc_titoAI, boss_shade_of_akama, npc_fel_crystal::npc_fel_crystalAI, IllidariCouncilBossAI, boss_halion::boss_halionAI, boss_olm_the_summoner::boss_olm_the_summonerAI, boss_yauj::boss_yaujAI, boss_sindragosa, boss_kelthuzad, boss_malchezaar::boss_malchezaarAI, npc_baltharus_the_warborn_clone, boss_warbringer_omrogg::boss_warbringer_omroggAI, npc_little_ooze, boss_reliquary_of_souls, npc_spectral_ghostly_citizen::npc_spectral_ghostly_citizenAI, boss_palehoof, npc_amanitar_mushrooms, boss_drakkari_elemental, npc_anubisath_sentinel::aqsentinelAI, npc_drakkari_scytheclaw, npc_iron_roots::npc_iron_rootsAI, boss_vazruden::boss_vazrudenAI, boss_garothi_worldbreaker, boss_eregos, boss_lady_vashj::boss_lady_vashjAI, boss_priestess_delrissa::boss_priestess_delrissaAI, boss_prince_taldaram, boss_twin_baseAI, npc_lesser_doomguard::npc_lesser_doomguardAI, boss_general_vezax::boss_general_vezaxAI, boss_anubarak_trial, npc_buru_egg::npc_buru_eggAI, npc_muglash::npc_muglashAI, npc_towering_infernal::npc_towering_infernalAI, npc_webwrap, npc_demon_chain::npc_demon_chainAI, npc_faerlina_add, boss_svala, boss_archaedas::boss_archaedasAI, boss_skadi, boss_thaddius, boss_bjarngrim, boss_xt002, boss_hydross_the_unstable::boss_hydross_the_unstableAI, boss_coren_direbrew, npc_pure_energy::npc_pure_energyAI, boss_auriaya, boss_fathomlord_karathress::boss_fathomlord_karathressAI, boss_viscidus::boss_viscidusAI, boss_sapphiron, boss_attumen::boss_attumenAI, npc_drakkari_gutripper, npc_icefang, boss_magtheridon, boss_baleroc, boss_steelbreaker::boss_steelbreakerAI, boss_jedoga_shadowseeker, npc_nesingwary_trapper, npc_firelands_molten_flamefather, npc_arugal_voidwalker::npc_arugal_voidwalkerAI, boss_ahune, boss_felmyst::boss_felmystAI, boss_blood_queen_lana_thel, boss_rend_blackhand, npc_sironas::npc_sironasAI, npc_medivh_bm, boss_doomrel::boss_doomrelAI, boss_devourer_of_souls, npc_tempest_minion, boss_entropius, boss_ossirian::boss_ossirianAI, boss_tyrannus, boss_shade_of_aran::boss_aranAI, boss_earthrager_ptah::boss_earthrager_ptahAI, boss_temple_guardian_anhuur::boss_temple_guardian_anhuurAI, boss_jaraxxus, boss_illidari_council, boss_sartharion, npc_void_sentry, boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, npc_kilrek::npc_kilrekAI, boss_sjonnir, boss_dorothee::boss_dorotheeAI, boss_vem::boss_vemAI, boss_ick, boss_slad_ran, boss_moroes::boss_moroesAI, boss_ingvar_the_plunderer, npc_restless_soul::npc_restless_soulAI, boss_anraphet::boss_anraphetAI, boss_krik_thir, boss_gurtogg_bloodboil, boss_apothecary_hummel, boss_lord_marrowgar, boss_selin_fireheart::boss_selin_fireheartAI, boss_ichoron, boss_high_priestess_azil::boss_high_priestess_azilAI, boss_the_lurker_below::boss_the_lurker_belowAI, npc_infernal_attacker::npc_infernal_attackerAI, boss_felblood_kaelthas, boss_trollgore, boss_noth, boss_warlord_kalithresh::boss_warlord_kalithreshAI, boss_gal_darah, boss_lieutenant_drake::boss_lieutenant_drakeAI, boss_ignis::boss_ignis_AI, boss_morogrim_tidewalker::boss_morogrim_tidewalkerAI, boss_slabhide::boss_slabhideAI, boss_varos, boss_high_astromancer_solarian, boss_sacrolash::boss_sacrolashAI, boss_mandokir, npc_twilight_flame_caller::npc_twilight_flame_callerAI, boss_keleseth, boss_nightbane::boss_nightbaneAI, boss_kologarn::boss_kologarnAI, boss_exarch_maladaar, boss_rotface, boss_anubrekhan, boss_magus_telestra, npc_disciple_of_naralex::npc_disciple_of_naralexAI, boss_volkhan, boss_epoch::boss_epochAI, boss_teron_gorefiend, npc_flamewaker_priest, boss_talon_king_ikiss, boss_nexusprince_shaffar, boss_brutallus::boss_brutallusAI, hyjalAI, boss_festergut, boss_novos, boss_drakos, npc_firelands_flame_archon, boss_twinemperorsAI, npc_millhouse_manastorm, npc_willix::npc_willixAI, boss_skeram::boss_skeramAI, boss_ionar, boss_mother_shahraz, npc_belnistrasz::npc_belnistraszAI, boss_salramm::boss_salrammAI, firelands_bossAI, boss_ambassador_hellmaw, boss_ozruk::boss_ozrukAI, npc_inner_demon::npc_inner_demonAI, boss_drakkari_colossus, boss_krystallus, boss_gruul::boss_gruulAI, boss_high_king_maulgar::boss_high_king_maulgarAI, boss_dathrohan_balnazzar::boss_dathrohan_balnazzarAI, boss_warchief_kargath_bladefist::boss_warchief_kargath_bladefistAI, generic_boss_controllerAI, boss_grandmaster_vorpil, boss_cannon_master_willey::boss_cannon_master_willeyAI, boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, boss_baltharus_the_warborn, boss_garfrost, boss_moorabi, boss_faerlina, boss_azgalor::boss_azgalorAI, boss_elder_nadox, boss_pyroguard_emberseer, boss_xevozz, boss_omor_the_unscarred::boss_omor_the_unscarredAI, boss_anetheron::boss_anetheronAI, boss_amanitar, boss_watchkeeper_gargolmar::boss_watchkeeper_gargolmarAI, boss_harbinger_skyriss, boss_silver_hand_bosses::boss_silver_hand_bossesAI, boss_kazrogal::boss_kazrogalAI, boss_anomalus, boss_loken, boss_shattered_executioner::boss_shattered_executionerAI, boss_terestian_illhoof::boss_terestianAI, boss_the_black_stalker::boss_the_black_stalkerAI, npc_blackfathom_deeps_event, boss_rage_winterchill::boss_rage_winterchillAI, boss_ormorok, boss_captain_skarloc::boss_captain_skarlocAI, boss_darkweaver_syth, SmartAI, boss_alizabal::boss_alizabalAI, boss_general_zarithrian, boss_tharon_ja, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, boss_sartura::boss_sarturaAI, boss_zuramat, boss_blackheart_the_inciter, boss_king_dred, boss_bronjahm, boss_doomlord_kazzak, npc_maghar_captive::npc_maghar_captiveAI, boss_balinda, boss_magmus::boss_magmusAI, boss_falric::boss_falricAI, boss_heigan, boss_mekgineer_steamrigger::boss_mekgineer_steamriggerAI, boss_razuvious, boss_keristrasza, boss_meathook::boss_meathookAI, boss_wrath_scryer_soccothrates, boss_epoch_hunter::boss_epoch_hunterAI, npc_frost_tomb, boss_mechano_lord_capacitus, boss_saviana_ragefire, boss_nethermancer_sepethrea, boss_magistrate_barthilas::boss_magistrate_barthilasAI, boss_randolph_moloch, boss_chrono_lord_deja, boss_erekem, npc_engineer_helice, boss_baron_rivendare, boss_anzu, boss_najentus, boss_pathaleon_the_calculator, boss_thorngrin_the_tender::boss_thorngrin_the_tenderAI, boss_razorgore, boss_occuthar::boss_occutharAI, boss_gyth, boss_infinite_corruptor::boss_infinite_corruptorAI, boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI, boss_kri::boss_kriAI, boss_aeonus, boss_kurinnaxx::boss_kurinnaxxAI, boss_maiden_of_grief, boss_commander_sarannis, boss_herod, boss_zum_rah::boss_zum_rahAI, boss_nexus_commanders, boss_doomwalker, boss_patchwerk, npc_wrathbone_flayer, boss_nerubenkan::boss_nerubenkanAI, boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI, boss_hungarfen, boss_hogger, boss_pit_lord_argaloth::boss_pit_lord_argalothAI, boss_corla::boss_corlaAI, boss_emperor_dagran_thaurissan::boss_draganthaurissanAI, boss_warp_splinter, boss_overlord_wyrmthalak, boss_marwyn::boss_marwynAI, boss_temporus, boss_princess_theradras::boss_ptheradrasAI, boss_high_botanist_freywinn, boss_gatewatcher_iron_hand, boss_broodlord, boss_curator::boss_curatorAI, boss_interrogator_vishas, boss_void_reaver, boss_ascendant_lord_obsidius::boss_ascendant_lord_obsidiusAI, boss_karsh_steelbender::boss_karsh_steelbenderAI, boss_darkmaster_gandling::boss_darkmaster_gandlingAI, boss_dalliah_the_doomsayer, celebras_the_cursed::celebras_the_cursedAI, boss_the_maker::boss_the_makerAI, boss_maleki_the_pallid::boss_maleki_the_pallidAI, boss_jindo_the_godbreaker::boss_jindo_the_godbreakerAI, boss_mordresh_fire_eye::boss_mordresh_fire_eyeAI, boss_beauty::boss_beautyAI, boss_lord_valthalak, boss_baroness_anastari, boss_daakara::boss_daakaraAI, boss_jandice_barov::boss_jandicebarovAI, boss_nalorakk::boss_nalorakkAI, boss_kelris, boss_glutton::boss_gluttonAI, boss_halycon, boss_hexlord_malacrass::boss_hex_lord_malacrassAI, boss_gizrul_the_slavener, boss_romogg_bonecrusher::boss_romogg_bonecrusherAI, boss_the_beast::boss_thebeastAI, boss_zanzil::boss_zanzilAI, boss_mennu_the_betrayer, npc_pet_dk_ebon_gargoyle, boss_warmaster_voone, boss_maiden_of_virtue::boss_maiden_of_virtueAI, boss_janalai::boss_janalaiAI, boss_cyanigosa, boss_rokmar_the_crackler, boss_halazzi::boss_halazziAI, boss_tuten_kash::boss_tuten_kashAI, boss_urok_doomhowl, boss_lord_overheat, boss_hydromancer_thespia::boss_thespiaAI, boss_pandemonius, boss_gatewatcher_gyrokill, boss_drakkisath, boss_kilnara, boss_shadow_hunter_voshgajin, npc_dragonflayer_forge_master, boss_quagmirran, boss_akilzon::boss_akilzonAI, boss_zereketh_the_unbound, quartermaster_zigris, boss_mother_smolderweb, boss_venoxis, boss_highlord_omokk, PossessedAI, CombatAI, EscortAI, boss_grilek, boss_hazzarah, boss_renataki, FollowerAI, GuardAI, and hyjal_trashAI.

112 { }
+ Here is the caller graph for this function:

◆ JustEngagedWith()

virtual void CreatureAI::JustEngagedWith ( Unit )
inlinevirtual

Reimplemented in npc_quel_delar_sword::npc_quel_delar_swordAI, npc_spiritual_reflection::npc_spiritual_reflectionAI, npc_toc_retro_paladin, npc_frostsworn_general::npc_frostsworn_generalAI, npc_spring_rabbit::npc_spring_rabbitAI, npc_tortured_rifleman::npc_tortured_riflemanAI, npc_spectral_footman::npc_spectral_footmanAI, npc_shadowy_mercenary::npc_shadowy_mercenaryAI, npc_maiev, npc_phantom_mage::npc_phantom_mageAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_gunship_boarding_leader, npc_ancient_rune_giant::npc_ancient_rune_giantAI, npc_ghostly_priest::npc_ghostly_priestAI, alliance_rifleman::alliance_riflemanAI, npc_runic_colossus::npc_runic_colossusAI, npc_darkrune_sentinel, npc_enraged_spirit::npc_enraged_spiritAI, npc_toc_hunter, npc_darkrune_guardian, npc_scion_of_eternity, npc_mimiron_assault_bot::npc_mimiron_assault_botAI, npc_ancient_conservator::npc_ancient_conservatorAI, boss_romulo::boss_romuloAI, npc_darkrune_watcher, npc_thorim_arena_phase::npc_thorim_arena_phaseAI, npc_giant_eye_tentacle::giant_eye_tentacleAI, npc_frostwing_ymirjar_vrykul, npc_frost_wyrm::npc_frost_wyrmAI, npc_toc_warlock, boss_master_engineer_telonicus, npc_steam_tonk::npc_steam_tonkAI, npc_muradin_bronzebeard_igb, npc_giant_claw_tentacle::giant_claw_tentacleAI, npc_fel_stalker::npc_fel_stalkerAI, boss_julianne::boss_julianneAI, npc_guardian::npc_guardianAI, npc_illidari_spawn::npc_illidari_spawnAI, boss_grand_astromancer_capernian, npc_dark_nucleus, npc_icc_nerubar_broodkeeper, npc_crypt_fiend::npc_crypt_fiendAI, npc_beryl_sorcerer, npc_garments_of_quests::npc_garments_of_questsAI, npc_claw_tentacle::claw_tentacleAI, boss_lord_sanguinar, npc_ashtongue_spiritbinder, npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI, npc_hand_of_the_deceiver::npc_hand_of_the_deceiverAI, boss_elder_ironbranch::boss_elder_ironbranchAI, npc_tesla, npc_eye_tentacle::eye_tentacleAI, boss_warlord_salaris::boss_warlord_salarisAI, npc_banshee::npc_bansheeAI, npc_ashtongue_elementalist, npc_vampiric_fiend, npc_ros_dark_rider::npc_ros_dark_riderAI, violet_hold_trashAI, boss_thaladred_the_darkener, boss_bigbadwolf::boss_bigbadwolfAI, npc_darnavan, npc_high_overlord_saurfang_igb, npc_ashtongue_rogue, npc_rimefang_icc, npc_argent_captainAI, npc_anub_ar_necromancer, boss_elder_stonebark::boss_elder_stonebarkAI, npc_necromancer::npc_necromancerAI, npc_anub_ar_crypt_fiend, DarkFallenAI, npc_injured_patient::npc_injured_patientAI, npc_gothik_trigger, npc_ashtongue_defender, npc_torloth_the_magnificent::npc_torloth_the_magnificentAI, npc_feugen, npc_anub_ar_champion, npc_cyclone::npc_cycloneAI, boss_sara::boss_saraAI, boss_elder_brightleaf::boss_elder_brightleafAI, npc_greyheart_spellbinder::npc_greyheart_spellbinderAI, npc_doctor::npc_doctorAI, boss_crone::boss_croneAI, npc_ashtongue_sorcerer, npc_qiraj_war_spawn::npc_qiraj_war_spawnAI, npc_ghoul::npc_ghoulAI, npc_shadow_image::npc_shadow_imageAI, npc_tainted_elemental::npc_tainted_elementalAI, npc_anubarak_spike, npc_violet_hold_teleportation_portal_commonAI, boss_kiljaeden::boss_kiljaedenAI, boss_leotheras_the_blind_demonform::boss_leotheras_the_blind_demonformAI, boss_shaman_toc5::boss_shaman_toc5AI, npc_nagrand_banner::npc_warmaul_shamanAI, boss_faction_championsAI, boss_ellris_duskhallow::boss_ellris_duskhallowAI, npc_life_spark, boss_fathomguard_caribdis::boss_fathomguard_caribdisAI, npc_halion_controller::npc_halion_controllerAI, npc_nagrand_banner::npc_giselda_the_croneAI, npc_raz_the_crazed::npc_raz_the_crazedAI, boss_taerar::boss_taerarAI, boss_roar::boss_roarAI, npc_enchanted_elemental::npc_enchanted_elementalAI, npc_kelthuzad_minionAI, npc_abomination::npc_abominationAI, npc_earthmender_wilda::npc_earthmender_wildaAI, boss_thorim::boss_thorimAI, npc_taretha::npc_tarethaAI, npc_aran_elemental::water_elementalAI, npc_nagrand_banner::npc_kil_sorrow_deathswornAI, npc_felmyst_trail::npc_felmyst_trailAI, npc_anubarak_anub_ar_venomancer, npc_the_lich_king_controller, npc_nagrand_banner::npc_kil_sorrow_cultistAI, boss_malygos, npc_stalagg, npc_flame_patch_alar, boss_the_lich_king, npc_vesperon, npc_felmyst_vapor::npc_felmyst_vaporAI, npc_anubarak_anub_ar_guardian, npc_crazed_mage::npc_crazed_mageAI, boss_krosh_firehand::boss_krosh_firehandAI, boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI, boss_emeriss::boss_emerissAI, boss_essence_of_anger, npc_geezle::npc_geezleAI, npc_venture_co_straggler, npc_hellfire_sentry::npc_hellfire_sentryAI, boss_fathomguard_tidalvess::boss_fathomguard_tidalvessAI, npc_ember_of_alar, npc_nagrand_banner::npc_kil_sorrow_spellbinderAI, boss_illidan_stormrage, boss_stormcaller_brundir::boss_stormcaller_brundirAI, npc_anubarak_anub_ar_assassin, npc_shadron, npc_image_of_medivh::npc_image_of_medivhAI, boss_tinhead::boss_tinheadAI, boss_sathrovarr, npc_skadi_trashAI, npc_mad_prisoner::npc_mad_prisonerAI, BloodPrincesBossAI, npc_giant_infernal::npc_giant_infernalAI, boss_fjola, boss_blindeye_the_seer::boss_blindeye_the_seerAI, npc_hadronox_crusherPackAI, npc_solarium_priest, npc_void_sentinel, boss_twilight_halion::boss_twilight_halionAI, boss_mimiron::boss_mimironAI, npc_tenebron, npc_snobold_vassal, npc_omrogg_heads::npc_omrogg_headsAI, boss_leotheras_the_blind::boss_leotheras_the_blindAI, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, boss_nefarian, npc_mistress_of_pain, npc_blessed_banner, npc_felblood_kaelthas_phoenix, npc_stormforged_lieutenant, npc_phase_hunter::npc_phase_hunterAI, boss_essence_of_desire, boss_alythess::boss_alythessAI, boss_priestess_lackey_commonAI, npc_lesser_shadow_fissure::npc_lesser_shadow_fissureAI, npc_direbrew_antagonist, boss_headless_horseman, WorldBossAI, npc_scarlet_courier::npc_scarlet_courierAI, boss_hodir::boss_hodirAI, boss_lethon::boss_lethonAI, npc_iron_sludge, boss_strawman::boss_strawmanAI, boss_vazruden_the_herald::boss_vazruden_the_heraldAI, npc_twilight_sadist::npc_twilight_sadistAI, boss_algalon_the_observer, npc_stonekeepers::npc_stonekeepersAI, npc_living_mojo, boss_fathomguard_sharkkis::boss_fathomguard_sharkkisAI, npc_magwin::npc_magwinAI, boss_razorscale, boss_kiggler_the_crazed::boss_kiggler_the_crazedAI, boss_sister_svalna, boss_freya::boss_freyaAI, boss_midnight::boss_midnightAI, npc_omen, BossAI, npc_tomb_creature::npc_tomb_creatureAI, boss_essence_of_suffering, npc_water_globule::npc_water_globuleAI, npc_fel_orc_convert::npc_fel_orc_convertAI, PalehoofMinionsBossAI, npc_warden_mellichar, npc_prince_taldaram_flame_sphere, npc_time_rift, npc_gatewatcher_petAI, npc_hellfire_channeler, boss_gothik, npc_annhylde_the_caller, npc_yor, boss_runemaster_molgeim::boss_runemaster_molgeimAI, npc_injured_draenei::npc_injured_draeneiAI, npc_coren_direbrew_sisters, npc_blackhand_incarcerator, npc_stinky_icc, npc_shadowmoon_channeler::npc_shadowmoon_channelerAI, boss_archimonde::boss_archimondeAI, npc_ohgan, npc_highborne_lamenter::npc_highborne_lamenterAI, npc_sanctum_sentry, boss_four_horsemen_baseAI, npc_blazing_monstrosity::npc_blazing_monstrosityAI, npc_kurenai_captive::npc_kurenai_captiveAI, boss_lady_deathwhisper, boss_harbinger_skyriss_illusion, boss_flame_leviathan::boss_flame_leviathanAI, boss_deathbringer_saurfang, boss_ysondre::boss_ysondreAI, boss_malchezaar::boss_malchezaarAI, npc_archaedas_minions::npc_archaedas_minionsAI, boss_sindragosa, npc_tito::npc_titoAI, boss_anubarak_trial, boss_twin_baseAI, boss_high_inquisitor_whitemane, boss_volazj, boss_netherspite::boss_netherspiteAI, npc_slad_ran_viper, npc_twilight_torturer::npc_twilight_torturerAI, boss_muru, boss_blood_council_controller, npc_ethereal_apprentice, boss_archmage_arugal::boss_archmage_arugalAI, npc_erekem_guard, boss_olm_the_summoner::boss_olm_the_summonerAI, npc_wg_queue, IllidariCouncilBossAI, boss_lady_vashj::boss_lady_vashjAI, boss_professor_putricide, boss_northrend_beastsAI, npc_stolen_soul, npc_spectral_ghostly_citizen::npc_spectral_ghostly_citizenAI, npc_sartura_royal_guard::npc_sartura_royal_guardAI, boss_halion::boss_halionAI, npc_baltharus_the_warborn_clone, npc_anubisath_sentinel::aqsentinelAI, npc_chicken_cluck::npc_chicken_cluckAI, boss_dalronn_the_controller, npc_steamrigger_mechanic::npc_steamrigger_mechanicAI, boss_vazruden::boss_vazrudenAI, generic_vehicleAI_toc5::generic_vehicleAI_toc5AI, npc_doomfire_targetting::npc_doomfire_targettingAI, npc_engineer_spark_overgrind::npc_engineer_spark_overgrindAI, boss_eye_of_cthun::eye_of_cthunAI, boss_hadronox, npc_lesser_doomguard::npc_lesser_doomguardAI, npc_slad_ran_constrictor, boss_palehoof, npc_towering_infernal::npc_towering_infernalAI, boss_fathomlord_karathress::boss_fathomlord_karathressAI, boss_garothi_worldbreaker, npc_muglash::npc_muglashAI, boss_kalecgos, npc_buru_egg::npc_buru_eggAI, npc_faerlina_add, npc_mrfloppy, npc_angered_soul_fragment, npc_focus_fire::npc_focus_fireAI, boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, npc_taskmaster_fizzule::npc_taskmaster_fizzuleAI, boss_warbringer_omrogg::boss_warbringer_omroggAI, npc_guard_shattrath_faction, npc_ethereal_beacon, boss_shade_of_aran::boss_aranAI, npc_nesingwary_trapper, boss_chromaggus, boss_bjarngrim, npc_icefang, npc_sironas::npc_sironasAI, dummy_dragonAI, boss_skarvald_the_constructor, boss_nightbane::boss_nightbaneAI, npc_nether_wraith, npc_harbinger_of_flame::npc_harbinger_of_flameAI, boss_viscidus::boss_viscidusAI, boss_xt002, npc_barnes::npc_barnesAI, npc_firelands_molten_flamefather, npc_onyx_flamecaller, boss_earthrager_ptah::boss_earthrager_ptahAI, boss_ahune, boss_rend_blackhand, boss_temple_guardian_anhuur::boss_temple_guardian_anhuurAI, npc_tempest_minion, npc_medivh_bm, npc_doomfire::npc_doomfireAI, boss_sapphiron, boss_hydross_the_unstable::boss_hydross_the_unstableAI, boss_krik_thir, boss_blood_queen_lana_thel, npc_geist_ambusher, npc_dk_understudy, boss_svala, BroggokPrisionersAI, npc_emily, boss_the_lurker_below::boss_the_lurker_belowAI, boss_alar, boss_doomrel::boss_doomrelAI, boss_priestess_delrissa::boss_priestess_delrissaAI, boss_jedoga_shadowseeker, boss_dorothee::boss_dorotheeAI, boss_ick, boss_morogrim_tidewalker::boss_morogrim_tidewalkerAI, boss_high_astromancer_solarian, boss_sartharion, boss_steelbreaker::boss_steelbreakerAI, boss_anraphet::boss_anraphetAI, boss_felmyst::boss_felmystAI, boss_tyrannus, boss_moroes::boss_moroesAI, boss_auriaya, boss_onyxia, boss_lord_marrowgar, npc_twilight_flame_caller::npc_twilight_flame_callerAI, boss_high_priestess_azil::boss_high_priestess_azilAI, boss_devourer_of_souls, boss_ingvar_the_plunderer, boss_ossirian::boss_ossirianAI, boss_anubrekhan, boss_twinemperorsAI, npc_restless_soul::npc_restless_soulAI, boss_lieutenant_drake::boss_lieutenant_drakeAI, npc_tiger_matriarch, boss_illidari_council, boss_urom, boss_ignis::boss_ignis_AI, npc_flamewaker_priest, boss_felblood_kaelthas, npc_coilfang_waterelemental::npc_coilfang_waterelementalAI, npc_unworthy_initiate::npc_unworthy_initiateAI, boss_warlord_kalithresh::boss_warlord_kalithreshAI, boss_ayamiss::boss_ayamissAI, boss_slabhide::boss_slabhideAI, boss_skeram::boss_skeramAI, npc_inner_demon::npc_inner_demonAI, npc_disciple_of_naralex::npc_disciple_of_naralexAI, boss_ymiron, boss_magus_telestra, boss_selin_fireheart::boss_selin_fireheartAI, boss_sacrolash::boss_sacrolashAI, boss_general_vezax::boss_general_vezaxAI, boss_high_king_maulgar::boss_high_king_maulgarAI, npc_ancient_wisp::npc_ancient_wispAI, boss_jaraxxus, boss_dathrohan_balnazzar::boss_dathrohan_balnazzarAI, boss_cannon_master_willey::boss_cannon_master_willeyAI, npc_iceborn_protodrake, boss_keleseth, boss_gurtogg_bloodboil, npc_core_rager, boss_mandokir, hyjalAI, boss_anub_arak, boss_warchief_kargath_bladefist::boss_warchief_kargath_bladefistAI, npc_firesworn, netherspite_infernal::netherspite_infernalAI, boss_archaedas::boss_archaedasAI, npc_lady_sylvanas_windrunner::npc_lady_sylvanas_windrunnerAI, boss_rotface, firelands_bossAI, boss_brutallus::boss_brutallusAI, boss_kologarn::boss_kologarnAI, boss_baleroc, boss_ionar, boss_volkhan, npc_shadowfang_prisoner::npc_shadowfang_prisonerAI, npc_willix::npc_willixAI, boss_drakkari_colossus, boss_gal_darah, npc_firelands_flame_archon, generic_boss_controllerAI, npc_guard_generic, boss_festergut, npc_commander_dawnforge::npc_commander_dawnforgeAI, npc_belnistrasz::npc_belnistraszAI, boss_eregos, boss_ambassador_hellmaw, boss_mekgineer_steamrigger::boss_mekgineer_steamriggerAI, boss_razuvious, boss_harbinger_skyriss, boss_gruul::boss_gruulAI, boss_prince_taldaram, boss_mother_shahraz, boss_teron_gorefiend, boss_silver_hand_bosses::boss_silver_hand_bossesAI, boss_noth, boss_wrath_scryer_soccothrates, boss_gluth, boss_exarch_maladaar, boss_pyroguard_emberseer, boss_mr_smite::boss_mr_smiteAI, boss_scarlet_commander_mograine, boss_baltharus_the_warborn, boss_heigan, boss_najentus, npc_nether_drake::npc_nether_drakeAI, boss_ragnaros, boss_novos, boss_slad_ran, boss_anomalus, boss_nexusprince_shaffar, boss_garfrost, boss_sjonnir, boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, boss_magistrate_barthilas::boss_magistrate_barthilasAI, boss_loken, boss_ichoron, SmartAI, npc_gilthares::npc_giltharesAI, boss_sartura::boss_sarturaAI, boss_maexxna, boss_alizabal::boss_alizabalAI, boss_ozruk::boss_ozrukAI, boss_nazan::boss_nazanAI, npc_maghar_captive::npc_maghar_captiveAI, boss_faerlina, npc_draenei_survivor::npc_draenei_survivorAI, boss_amanitar, boss_bronjahm, boss_azgalor::boss_azgalorAI, boss_mal_ganis::boss_mal_ganisAI, boss_captain_skarloc::boss_captain_skarlocAI, boss_shirrak_the_dead_watcher::boss_shirrak_the_dead_watcherAI, boss_darkweaver_syth, boss_vaelastrasz, boss_the_black_stalker::boss_the_black_stalkerAI, boss_trollgore, boss_varos, boss_terestian_illhoof::boss_terestianAI, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, boss_xevozz, boss_omor_the_unscarred::boss_omor_the_unscarredAI, boss_anetheron::boss_anetheronAI, boss_kazrogal::boss_kazrogalAI, boss_doomwalker, boss_buru::boss_buruAI, npc_cairne_bloodhoof::npc_cairne_bloodhoofAI, boss_patchwerk, boss_keristrasza, boss_vexallus::boss_vexallusAI, boss_epoch_hunter::boss_epoch_hunterAI, boss_general_zarithrian, boss_tharon_ja, boss_majordomo, boss_blackheart_the_inciter, boss_ouro::boss_ouroAI, boss_saviana_ragefire, boss_grandmaster_vorpil, boss_doomlord_kazzak, boss_rage_winterchill::boss_rage_winterchillAI, boss_moorabi, boss_anzu, npc_wrathbone_flayer, boss_supremus, boss_ormorok, boss_dalliah_the_doomsayer, boss_curator::boss_curatorAI, boss_darkmaster_gandling::boss_darkmaster_gandlingAI, boss_elder_nadox, boss_emalon, boss_talon_king_ikiss, npc_naga_distiller::npc_naga_distillerAI, boss_romogg_bonecrusher::boss_romogg_bonecrusherAI, boss_infinite_corruptor::boss_infinite_corruptorAI, boss_drakos, boss_watchkeeper_gargolmar::boss_watchkeeper_gargolmarAI, boss_mechano_lord_capacitus, npc_ruul_snowhoof::npc_ruul_snowhoofAI, boss_gyth, boss_high_inquisitor_fairbanks, boss_baron_rivendare, boss_nerubenkan::boss_nerubenkanAI, boss_ramstein_the_gorger::boss_ramstein_the_gorgerAI, npc_blackfathom_deeps_event, boss_zum_rah::boss_zum_rahAI, CritterAI, boss_balinda, boss_falric::boss_falricAI, boss_twilight_corrupter::boss_twilight_corrupterAI, boss_salramm::boss_salrammAI, boss_king_dred, boss_instructor_malicia::boss_instructormaliciaAI, boss_pathaleon_the_calculator, npc_unkor_the_ruthless::npc_unkor_the_ruthlessAI, boss_noxxion::boss_noxxionAI, boss_princess_theradras::boss_ptheradrasAI, boss_randolph_moloch, boss_ironaya, boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI, boss_thorngrin_the_tender::boss_thorngrin_the_tenderAI, boss_timmy_the_cruel::boss_timmy_the_cruelAI, boss_grobbulus, boss_loatheb, boss_hydromancer_thespia::boss_thespiaAI, boss_occuthar::boss_occutharAI, boss_hogger, celebras_the_cursed::celebras_the_cursedAI, boss_landslide::boss_landslideAI, boss_zuramat, boss_mennu_the_betrayer, boss_broggok::boss_broggokAI, boss_overlord_wyrmthalak, boss_maiden_of_virtue::boss_maiden_of_virtueAI, boss_kormok::boss_kormokAI, npc_ymirjar_flamebearer, boss_herod, boss_epoch::boss_epochAI, boss_pandemonius, boss_rokmar_the_crackler, boss_commander_sarannis, boss_postmaster_malown::boss_postmaster_malownAI, boss_erekem, boss_nethermancer_sepethrea, boss_golemagg, boss_marwyn::boss_marwynAI, boss_laj, boss_corla::boss_corlaAI, boss_emperor_dagran_thaurissan::boss_draganthaurissanAI, boss_jindo_the_godbreaker::boss_jindo_the_godbreakerAI, boss_warp_splinter, CasterAI, boss_sulfuron, boss_maleki_the_pallid::boss_maleki_the_pallidAI, boss_eck, npc_dragonflayer_forge_master, npc_mageguard_dalaran, boss_gatewatcher_gyrokill, boss_lord_valthalak, boss_daakara::boss_daakaraAI, boss_meathook::boss_meathookAI, boss_broodlord, boss_magmadar, boss_jandice_barov::boss_jandicebarovAI, boss_baroness_anastari, boss_nalorakk::boss_nalorakkAI, boss_mordresh_fire_eye::boss_mordresh_fire_eyeAI, boss_krystallus, boss_high_botanist_freywinn, boss_galvangar, boss_beauty::boss_beautyAI, boss_interrogator_vishas, boss_chrono_lord_deja, boss_drekthar, boss_ascendant_lord_obsidius::boss_ascendant_lord_obsidiusAI, boss_karsh_steelbender::boss_karsh_steelbenderAI, boss_halycon, boss_hexlord_malacrass::boss_hex_lord_malacrassAI, boss_aeonus, boss_temporus, boss_maiden_of_grief, boss_quagmirran, boss_zereketh_the_unbound, boss_gatewatcher_iron_hand, boss_general_angerforge::boss_general_angerforgeAI, boss_baron_geddon, boss_arcanist_doan, boss_bloodmage_thalnos, boss_lord_alexei_barov::boss_lordalexeibarovAI, boss_kelris, boss_ioc_horde_alliance, boss_gizrul_the_slavener, boss_boss_ras_frostwhisper::boss_rasfrostAI, boss_venoxis, boss_zanzil::boss_zanzilAI, boss_doctor_theolen_krastinov::boss_theolenkrastinovAI, boss_vectus::boss_vectusAI, boss_janalai::boss_janalaiAI, boss_glutton::boss_gluttonAI, boss_void_reaver, boss_magmus::boss_magmusAI, boss_the_beast::boss_thebeastAI, boss_halazzi::boss_halazziAI, boss_archavon, boss_pit_lord_argaloth::boss_pit_lord_argalothAI, boss_moira_bronzebeard::boss_moira_bronzebeardAI, boss_illucia_barov::boss_illuciabarovAI, boss_tuten_kash::boss_tuten_kashAI, boss_the_maker::boss_the_makerAI, boss_death_knight_darkreaver::boss_death_knight_darkreaverAI, boss_lorekeeper_polkelt::boss_lorekeeperpolkeltAI, boss_the_ravenian::boss_theravenianAI, boss_hungarfen, boss_high_interrogator_gerstahn::boss_high_interrogator_gerstahnAI, boss_garr, boss_aku_mai, boss_toravon, boss_urok_doomhowl, boss_warmaster_voone, boss_cyanigosa, boss_gehennas, boss_lucifron, boss_azshir_the_sleepless, boss_kilnara, boss_nexus_commanders, boss_grilek, boss_hazzarah, boss_renataki, boss_koralon, boss_moragg, boss_vanndar, boss_ambassador_flamelash::boss_ambassador_flamelashAI, boss_drakkisath, boss_shazzrah, boss_lord_overheat, boss_akilzon::boss_akilzonAI, boss_shadow_hunter_voshgajin, quartermaster_zigris, boss_flamegor, CombatAI, boss_mother_smolderweb, npc_pet_hunter_snake_trap, boss_highlord_omokk, boss_houndmaster_loksey, boss_scorn, boss_ebonroc, boss_firemaw, boss_wushoolay, boss_lavanthor, and boss_gelihast.

109 { }
+ Here is the caller graph for this function:

◆ JustEnteredCombat()

void CreatureAI::JustEnteredCombat ( Unit who)
overridevirtual

Reimplemented from UnitAI.

Reimplemented in npc_yogg_saron_keeper::npc_yogg_saron_keeperAI, npc_training_dummy, boss_sara::boss_saraAI, npc_risen_archmage, and npc_green_dragon_combat_trigger.

215 {
216  if (!IsEngaged() && !me->CanHaveThreatList())
217  EngagementStart(who);
218 }
bool CanHaveThreatList() const
====================== THREAT & COMBAT ====================
Definition: Unit.h:1127
Creature *const me
Definition: CreatureAI.h:61
void EngagementStart(Unit *who)
Definition: CreatureAI.cpp:276
bool IsEngaged() const
Definition: CreatureAI.h:87
+ Here is the call graph for this function:

◆ JustReachedHome()

virtual void CreatureAI::JustReachedHome ( )
inlinevirtual

Reimplemented in npc_arthas_stratholme::npc_arthas_stratholmeAI, boss_romulo::boss_romuloAI, npc_tirion_fordring_tft, boss_julianne::boss_julianneAI, boss_rouge_toc5::boss_rouge_toc5AI, boss_bigbadwolf::boss_bigbadwolfAI, boss_hunter_toc5::boss_hunter_toc5AI, npc_rocket_propelled_warhead, npc_kelthuzad_guardian, boss_crone::boss_croneAI, boss_shaman_toc5::boss_shaman_toc5AI, boss_roar::boss_roarAI, boss_faction_championsAI, npc_the_lich_king_controller, BloodPrincesBossAI, boss_mage_toc5::boss_mage_toc5AI, boss_tinhead::boss_tinheadAI, boss_archimonde::boss_archimondeAI, boss_fjola, npc_egg_pile::npc_egg_pileAI, boss_nefarian, boss_sister_svalna, boss_headless_horseman, boss_strawman::boss_strawmanAI, boss_kaelthas, boss_warrior_toc5::boss_warrior_toc5AI, BossAI, boss_deathbringer_saurfang, npc_blackhand_incarcerator, boss_rimefang, boss_sindragosa, npc_blazing_monstrosity::npc_blazing_monstrosityAI, boss_professor_putricide, boss_blood_queen_lana_thel, boss_anubarak_trial, npc_headless_horseman_head, boss_twin_baseAI, boss_temple_guardian_anhuur::boss_temple_guardian_anhuurAI, boss_earthrager_ptah::boss_earthrager_ptahAI, boss_victor_nefarius, npc_harbinger_of_flame::npc_harbinger_of_flameAI, boss_anraphet::boss_anraphetAI, BroggokPrisionersAI, npc_dk_understudy, boss_lord_marrowgar, boss_dorothee::boss_dorotheeAI, boss_priestess_delrissa::boss_priestess_delrissaAI, boss_sartharion, boss_rotface, boss_nightbane::boss_nightbaneAI, boss_festergut, boss_urom, boss_ichoron, boss_mal_ganis::boss_mal_ganisAI, boss_anubrekhan, boss_xevozz, SmartAI, boss_faerlina, boss_nethermancer_sepethrea, boss_bronjahm, boss_razuvious, boss_erekem, boss_zuramat, boss_moragg, boss_kelris, boss_lavanthor, and FollowerAI.

166 { }
+ Here is the caller graph for this function:

◆ JustRegisteredAreaTrigger()

virtual void CreatureAI::JustRegisteredAreaTrigger ( AreaTrigger )
inlinevirtual
133 { }
+ Here is the caller graph for this function:

◆ JustRegisteredDynObject()

virtual void CreatureAI::JustRegisteredDynObject ( DynamicObject )
inlinevirtual
129 { }
+ Here is the caller graph for this function:

◆ JustStartedThreateningMe()

virtual void CreatureAI::JustStartedThreateningMe ( Unit who)
inlinevirtual

Reimplemented in NullCreatureAI, PossessedAI, and ScheduledChangeAI.

106 { if (!IsEngaged()) EngagementStart(who); }
void EngagementStart(Unit *who)
Definition: CreatureAI.cpp:276
bool IsEngaged() const
Definition: CreatureAI.h:87
+ Here is the caller graph for this function:

◆ JustSummoned()

virtual void CreatureAI::JustSummoned ( Creature )
inlinevirtual

Reimplemented in npc_toc_enh_shaman, npc_illidan_db_target, npc_blade_of_azzinoth, npc_thorim_minibossAI, npc_phoenix_egg_tk, npc_the_lich_king_escape_hor::npc_the_lich_king_escape_horAI, boss_aerial_command_unit::boss_aerial_command_unitAI, npc_frostwing_ymirjar_vrykul, boss_brain_of_yogg_saron::boss_brain_of_yogg_saronAI, npc_akama_illidan, boss_garaxxas::boss_garaxxasAI, npc_felfire_portal::npc_felfire_portalAI, boss_vx_001::boss_vx_001AI, npc_hand_of_the_deceiver::npc_hand_of_the_deceiverAI, npc_hodir_mage::npc_hodir_mageAI, boss_sara::boss_saraAI, npc_collapsing_star, npc_gothik_trigger, npc_black_hole, boss_leviathan_mk_ii::boss_leviathan_mk_iiAI, npc_necromancer::npc_necromancerAI, boss_prince_valanar_icc, npc_twilight_eggs, boss_the_lich_king, boss_prince_taldaram_icc, npc_risen_archmage, boss_jormungarAI, npc_violet_hold_teleportation_portal_commonAI, boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI, boss_freya::boss_freyaAI, boss_prince_keleseth_icc, boss_thorim::boss_thorimAI, boss_kiljaeden::boss_kiljaedenAI, npc_creature_generator_akama, npc_halion_controller::npc_halion_controllerAI, npc_earthmender_wilda::npc_earthmender_wildaAI, npc_the_lich_king_controller, npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, boss_kaelthas, npc_sinclari_vh, boss_illidan_stormrage, npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, boss_lady_deathwhisper, boss_massive_jormungar, boss_archimonde::boss_archimondeAI, npc_kiljaeden_controller::npc_kiljaeden_controllerAI, boss_razorscale, npc_announcer_toc5::npc_announcer_toc5AI, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, boss_algalon_the_observer, boss_sindragosa, boss_paletress::boss_paletressAI, npc_blessed_banner, boss_valithria_dreamwalker, boss_headless_horseman, npc_thalorien_dawnseeker, boss_toc_champion_controller, npc_tirion_toc, boss_deathbringer_saurfang, npc_akama_shade, boss_vazruden_the_herald::boss_vazruden_the_heraldAI, npc_brann_hos, boss_hadronox, WorldBossAI, npc_precious_icc, npc_ahune_bunny, npc_hellfire_channeler, npc_crystal_channel_target, boss_krick, npc_kurenai_captive::npc_kurenai_captiveAI, npc_warden_mellichar, boss_midnight::boss_midnightAI, boss_gothik, npc_muru_portal, BossAI, npc_blazing_monstrosity::npc_blazing_monstrosityAI, npc_koltira_deathweaver, boss_professor_putricide, boss_garothi_worldbreaker, boss_muru, npc_fiendish_portal::npc_fiendish_portalAI, boss_felblood_kaelthas, boss_kelthuzad, boss_anubarak_trial, boss_corborus::boss_corborusAI, boss_jedoga_shadowseeker, npc_muglash::npc_muglashAI, boss_victor_nefarius, boss_felmyst::boss_felmystAI, boss_drakkari_colossus, boss_warbringer_omrogg::boss_warbringer_omroggAI, npc_buru_egg::npc_buru_eggAI, boss_kologarn::boss_kologarnAI, boss_palehoof, boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, npc_ethereal_beacon, boss_volazj, boss_novos, boss_ionar, boss_volkhan, boss_slad_ran, boss_hydross_the_unstable::boss_hydross_the_unstableAI, boss_trollgore, boss_ymiron, boss_rotface, boss_ignis::boss_ignis_AI, boss_skadi, boss_svala, boss_alar, boss_onyxia, boss_ichoron, npc_colonel_jules::npc_colonel_julesAI, npc_firelands_molten_flamefather, npc_restless_soul::npc_restless_soulAI, boss_entropius, npc_void_sentry, boss_ick, boss_eregos, npc_lady_sylvanas_windrunner::npc_lady_sylvanas_windrunnerAI, boss_noth, boss_reliquary_of_souls, npc_disciple_of_naralex::npc_disciple_of_naralexAI, boss_attumen::boss_attumenAI, npc_twilight_flame_caller::npc_twilight_flame_callerAI, hyjalAI, boss_black_knight::boss_black_knightAI, boss_exarch_maladaar, npc_maghar_captive::npc_maghar_captiveAI, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, boss_warchief_kargath_bladefist::boss_warchief_kargath_bladefistAI, boss_baltharus_the_warborn, boss_bronjahm, npc_willix::npc_willixAI, boss_sjonnir, boss_amanitar, boss_darkweaver_syth, boss_harbinger_skyriss, boss_prince_taldaram, boss_nexusprince_shaffar, npc_commander_dawnforge::npc_commander_dawnforgeAI, SmartAI, boss_grandmaster_vorpil, boss_anubrekhan, npc_daegarn, boss_shattered_executioner::boss_shattered_executionerAI, boss_commander_sarannis, boss_omor_the_unscarred::boss_omor_the_unscarredAI, boss_nazan::boss_nazanAI, boss_ozruk::boss_ozrukAI, boss_nethermancer_sepethrea, boss_moorabi, boss_xevozz, boss_ayamiss::boss_ayamissAI, boss_emalon, boss_general_zarithrian, boss_gal_darah, boss_vexallus::boss_vexallusAI, boss_shirrak_the_dead_watcher::boss_shirrak_the_dead_watcherAI, boss_warp_splinter, boss_the_black_stalker::boss_the_black_stalkerAI, boss_occuthar::boss_occutharAI, boss_hogger, boss_skeram::boss_skeramAI, boss_balinda, boss_randolph_moloch, boss_high_botanist_freywinn, npc_ruul_snowhoof::npc_ruul_snowhoofAI, boss_kormok::boss_kormokAI, boss_broggok::boss_broggokAI, boss_laj, npc_emily, boss_jandice_barov::boss_jandicebarovAI, and boss_horAI.

118 { }
+ Here is the caller graph for this function:

◆ JustSummonedGameobject()

virtual void CreatureAI::JustSummonedGameobject ( GameObject )
inlinevirtual
125 { }
+ Here is the caller graph for this function:

◆ JustUnregisteredAreaTrigger()

virtual void CreatureAI::JustUnregisteredAreaTrigger ( AreaTrigger )
inlinevirtual
134 { }
+ Here is the caller graph for this function:

◆ JustUnregisteredDynObject()

virtual void CreatureAI::JustUnregisteredDynObject ( DynamicObject )
inlinevirtual
130 { }
+ Here is the caller graph for this function:

◆ KilledUnit()

virtual void CreatureAI::KilledUnit ( Unit )
inlinevirtual

Reimplemented in npc_arthas_stratholme::npc_arthas_stratholmeAI, boss_romulo::boss_romuloAI, npc_the_lich_king_escape_hor::npc_the_lich_king_escape_horAI, boss_aerial_command_unit::boss_aerial_command_unitAI, boss_julianne::boss_julianneAI, boss_vx_001::boss_vx_001AI, boss_elder_ironbranch::boss_elder_ironbranchAI, boss_bigbadwolf::boss_bigbadwolfAI, boss_elder_stonebark::boss_elder_stonebarkAI, npc_argent_captainAI, npc_necromancer::npc_necromancerAI, boss_leviathan_mk_ii::boss_leviathan_mk_iiAI, npc_feugen, boss_sara::boss_saraAI, boss_elder_brightleaf::boss_elder_brightleafAI, boss_crone::boss_croneAI, boss_faction_championsAI, boss_leotheras_the_blind_demonform::boss_leotheras_the_blind_demonformAI, boss_kiljaeden::boss_kiljaedenAI, boss_roar::boss_roarAI, boss_malygos, boss_the_lich_king, boss_stormcaller_brundir::boss_stormcaller_brundirAI, npc_stalagg, boss_kaelthas, boss_thorim::boss_thorimAI, boss_illidan_stormrage, boss_tinhead::boss_tinheadAI, BloodPrincesBossAI, boss_emeriss::boss_emerissAI, boss_algalon_the_observer, boss_sathrovarr, boss_essence_of_desire, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, boss_twilight_halion::boss_twilight_halionAI, npc_bone_spike, boss_priestess_lackey_commonAI, boss_nefarian, boss_alythess::boss_alythessAI, boss_archimonde::boss_archimondeAI, boss_headless_horseman, boss_lady_deathwhisper, boss_strawman::boss_strawmanAI, boss_leotheras_the_blind::boss_leotheras_the_blindAI, boss_hodir::boss_hodirAI, boss_volazj, boss_runemaster_molgeim::boss_runemaster_molgeimAI, npc_gravity_well::npc_gravity_wellAI, boss_midnight::boss_midnightAI, boss_sister_svalna, boss_deathbringer_saurfang, boss_gothik, boss_essence_of_suffering, boss_freya::boss_freyaAI, boss_krick, npc_ohgan, dummy_dragonAI, boss_four_horsemen_baseAI, boss_sindragosa, boss_anub_arak, boss_professor_putricide, IllidariCouncilBossAI, boss_high_inquisitor_whitemane, boss_blood_queen_lana_thel, boss_ymiron, boss_palehoof, boss_malchezaar::boss_malchezaarAI, boss_kelthuzad, boss_archmage_arugal::boss_archmage_arugalAI, boss_prince_taldaram, boss_vazruden::boss_vazrudenAI, boss_garothi_worldbreaker, boss_lady_vashj::boss_lady_vashjAI, boss_warbringer_omrogg::boss_warbringer_omroggAI, boss_general_vezax::boss_general_vezaxAI, boss_priestess_delrissa::boss_priestess_delrissaAI, boss_kalecgos, npc_lesser_doomguard::npc_lesser_doomguardAI, boss_steelbreaker::boss_steelbreakerAI, boss_twin_baseAI, npc_towering_infernal::npc_towering_infernalAI, boss_skadi, boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, boss_urom, boss_magtheridon, boss_svala, boss_anubarak_trial, boss_bjarngrim, boss_xt002, boss_fathomlord_karathress::boss_fathomlord_karathressAI, boss_sartharion, boss_temple_guardian_anhuur::boss_temple_guardian_anhuurAI, boss_jedoga_shadowseeker, boss_onyxia, boss_ingvar_the_plunderer, boss_baleroc, boss_felmyst::boss_felmystAI, boss_sjonnir, boss_shade_of_aran::boss_aranAI, boss_tyrannus, boss_hydross_the_unstable::boss_hydross_the_unstableAI, boss_slad_ran, boss_lord_marrowgar, boss_jaraxxus, boss_mal_ganis::boss_mal_ganisAI, boss_anraphet::boss_anraphetAI, boss_ossirian::boss_ossirianAI, boss_trollgore, boss_thaddius, boss_ignis::boss_ignis_AI, boss_auriaya, boss_moroes::boss_moroesAI, npc_tiger_matriarch, boss_devourer_of_souls, boss_gal_darah, boss_krik_thir, boss_gurtogg_bloodboil, generic_boss_controllerAI, boss_rotface, boss_mandokir, boss_kologarn::boss_kologarnAI, boss_ichoron, boss_festergut, boss_lieutenant_drake::boss_lieutenant_drakeAI, boss_morogrim_tidewalker::boss_morogrim_tidewalkerAI, boss_high_astromancer_solarian, netherspite_infernal::netherspite_infernalAI, boss_magus_telestra, boss_volkhan, boss_warchief_kargath_bladefist::boss_warchief_kargath_bladefistAI, boss_warlord_kalithresh::boss_warlord_kalithreshAI, boss_noth, boss_sacrolash::boss_sacrolashAI, boss_epoch::boss_epochAI, boss_selin_fireheart::boss_selin_fireheartAI, boss_twinemperorsAI, boss_archaedas::boss_archaedasAI, boss_talon_king_ikiss, boss_attumen::boss_attumenAI, boss_exarch_maladaar, boss_drakos, boss_saviana_ragefire, boss_ionar, boss_harbinger_skyriss, boss_anubrekhan, boss_teron_gorefiend, boss_salramm::boss_salrammAI, boss_brutallus::boss_brutallusAI, boss_krystallus, boss_nexusprince_shaffar, boss_baltharus_the_warborn, boss_novos, boss_scarlet_commander_mograine, npc_millhouse_manastorm, boss_mother_shahraz, boss_ambassador_hellmaw, boss_wrath_scryer_soccothrates, boss_ragnaros, boss_loken, boss_high_king_maulgar::boss_high_king_maulgarAI, boss_vaelastrasz, boss_general_zarithrian, boss_gruul::boss_gruulAI, boss_darkweaver_syth, boss_garfrost, boss_ormorok, boss_alizabal::boss_alizabalAI, boss_moorabi, boss_faerlina, boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, boss_sartura::boss_sarturaAI, boss_elder_nadox, boss_zuramat, boss_buru::boss_buruAI, boss_xevozz, boss_watchkeeper_gargolmar::boss_watchkeeper_gargolmarAI, emerald_dragonAI, SmartAI, boss_bronjahm, boss_falric::boss_falricAI, boss_mekgineer_steamrigger::boss_mekgineer_steamriggerAI, boss_eregos, boss_meathook::boss_meathookAI, boss_keristrasza, boss_grandmaster_vorpil, boss_terestian_illhoof::boss_terestianAI, boss_azgalor::boss_azgalorAI, boss_captain_skarloc::boss_captain_skarlocAI, boss_tharon_ja, boss_anetheron::boss_anetheronAI, boss_kazrogal::boss_kazrogalAI, boss_blackheart_the_inciter, boss_omor_the_unscarred::boss_omor_the_unscarredAI, boss_dalliah_the_doomsayer, boss_aeonus, boss_epoch_hunter::boss_epoch_hunterAI, boss_mechano_lord_capacitus, boss_rage_winterchill::boss_rage_winterchillAI, boss_nexus_commanders, boss_doomlord_kazzak, boss_zum_rah::boss_zum_rahAI, boss_chrono_lord_deja, boss_razuvious, boss_heigan, boss_erekem, boss_marwyn::boss_marwynAI, boss_pathaleon_the_calculator, boss_najentus, boss_thorngrin_the_tender::boss_thorngrin_the_tenderAI, boss_vexallus::boss_vexallusAI, boss_twilight_corrupter::boss_twilight_corrupterAI, boss_amnennar_the_coldbringer::boss_amnennar_the_coldbringerAI, boss_mennu_the_betrayer, boss_majordomo, boss_commander_sarannis, boss_herod, boss_skeram::boss_skeramAI, boss_postmaster_malown::boss_postmaster_malownAI, boss_rokmar_the_crackler, boss_nethermancer_sepethrea, boss_daakara::boss_daakaraAI, boss_patchwerk, boss_nalorakk::boss_nalorakkAI, boss_maiden_of_grief, boss_doomwalker, boss_warp_splinter, boss_corla::boss_corlaAI, boss_romogg_bonecrusher::boss_romogg_bonecrusherAI, boss_emperor_dagran_thaurissan::boss_draganthaurissanAI, boss_gatewatcher_gyrokill, boss_hexlord_malacrass::boss_hex_lord_malacrassAI, boss_temporus, boss_zanzil::boss_zanzilAI, boss_high_botanist_freywinn, boss_bloodmage_thalnos, boss_janalai::boss_janalaiAI, boss_quagmirran, boss_zereketh_the_unbound, boss_void_reaver, boss_gatewatcher_iron_hand, boss_curator::boss_curatorAI, boss_interrogator_vishas, boss_halazzi::boss_halazziAI, boss_ascendant_lord_obsidius::boss_ascendant_lord_obsidiusAI, boss_karsh_steelbender::boss_karsh_steelbenderAI, boss_the_maker::boss_the_makerAI, boss_hydromancer_thespia::boss_thespiaAI, boss_venoxis, boss_glutton::boss_gluttonAI, boss_pandemonius, boss_kilnara, boss_akilzon::boss_akilzonAI, boss_maiden_of_virtue::boss_maiden_of_virtueAI, boss_cyanigosa, and PetAI.

115 { }
+ Here is the caller graph for this function:

◆ MoveInLineOfSight()

void CreatureAI::MoveInLineOfSight ( Unit who)
protectedvirtual

Reimplemented in alliance_rifleman::alliance_riflemanAI, npc_runic_colossus::npc_runic_colossusAI, boss_romulo::boss_romuloAI, npc_phoenix_egg_tk, boss_julianne::boss_julianneAI, npc_grizzlemaw_cw_trigger::npc_grizzlemaw_cw_triggerAI, npc_hodirs_fury::npc_hodirs_furyAI, npc_beryl_sorcerer, npc_cw_area_trigger::npc_cw_area_triggerAI, npc_thorims_hammer::npc_thorims_hammerAI, npc_dkc1_gothik::npc_dkc1_gothikAI, npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI, npc_shield_generator_channel::npc_shield_generator_channelAI, npc_alexstraza_the_lifebinder::npc_alexstraza_the_lifebinderAI, npc_salanar_the_horseman::npc_salanar_the_horsemanAI, advisorbase_ai, npc_cyclone::npc_cycloneAI, npc_toxic_sporebat::npc_toxic_sporebatAI, npc_anubarak_spike, npc_ashtongue_sorcerer, npc_the_etymidian::npc_the_etymidianAI, npc_reliquary_combat_trigger, npc_violet_hold_teleportation_portal_commonAI, boss_malygos, npc_kelthuzad_minionAI, npc_enchanted_elemental::npc_enchanted_elementalAI, boss_roar::boss_roarAI, npc_elder_kekek::npc_elder_kekekAI, npc_felmyst_trail::npc_felmyst_trailAI, npc_flame_patch_alar, npc_odyn, npc_a_special_surprise::npc_a_special_surpriseAI, boss_shade_of_aran::boss_aranAI, boss_tinhead::boss_tinheadAI, npc_chromie_middle::npc_chromie_middleAI, npc_high_oracle_soo_roo::npc_high_oracle_soo_rooAI, boss_voice_of_yogg_saron::boss_voice_of_yogg_saronAI, boss_kaelthas, npc_hadronox_crusherPackAI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_coilfang_ambusher::npc_coilfang_ambusherAI, npc_blessed_banner, boss_alythess::boss_alythessAI, npc_scorch_ground::npc_scorch_groundAI, npc_the_biggest_tree::npc_the_biggest_treeAI, npc_lesser_shadow_fissure::npc_lesser_shadow_fissureAI, npc_gatewatcher_petAI, boss_strawman::boss_strawmanAI, npc_water_globule::npc_water_globuleAI, npc_fel_orc_convert::npc_fel_orc_convertAI, npc_prince_taldaram_flame_sphere, npc_twiggy_flathead::npc_twiggy_flatheadAI, npc_injured_draenei::npc_injured_draeneiAI, npc_annhylde_the_caller, npc_warden_mellichar, npc_archaedas_minions::npc_archaedas_minionsAI, boss_twinemperorsAI, npc_tournament_training_dummy, npc_snowfall_glade_playmate::npc_snowfall_glade_playmateAI, boss_leotheras_the_blind::boss_leotheras_the_blindAI, npc_hive_zara_larva::npc_hive_zara_larvaAI, boss_lady_vashj::boss_lady_vashjAI, boss_brutallus::boss_brutallusAI, npc_jungle_punch_target, npc_steamrigger_mechanic::npc_steamrigger_mechanicAI, npc_lesser_doomguard::npc_lesser_doomguardAI, npc_towering_infernal::npc_towering_infernalAI, npc_mrfloppy, npc_doomfire_targetting::npc_doomfire_targettingAI, boss_ossirian::boss_ossirianAI, boss_anubarak_trial, npc_harbinger_of_flame::npc_harbinger_of_flameAI, npc_nesingwary_trapper, boss_dorothee::boss_dorotheeAI, npc_hearthsinger_forresten_cot::npc_hearthsinger_forresten_cotAI, boss_krik_thir, boss_svala, boss_grand_warlock_nethekurse::boss_grand_warlock_nethekurseAI, boss_alar, boss_felmyst::boss_felmystAI, npc_doomfire::npc_doomfireAI, boss_the_lurker_below::boss_the_lurker_belowAI, npc_winterfin_playmate::npc_winterfin_playmateAI, boss_novos, npc_air_force_bots::npc_air_force_botsAI, boss_coren_direbrew, hyjalAI, npc_medivh_bm, npc_captured_rageclaw, netherspite_infernal::netherspite_infernalAI, npc_guardian_pavilion, boss_loken, boss_wrath_scryer_soccothrates, SmartAI, npc_nether_drake::npc_nether_drakeAI, VehicleAI, boss_harbinger_skyriss, npc_draenei_survivor::npc_draenei_survivorAI, boss_nexusprince_shaffar, boss_doomwalker, npc_tooga::npc_toogaAI, boss_watchkeeper_gargolmar::boss_watchkeeper_gargolmarAI, boss_magistrate_barthilas::boss_magistrate_barthilasAI, boss_temporus, boss_ambassador_hellmaw, boss_chrono_lord_deja, boss_aeonus, boss_cyanigosa, boss_talon_king_ikiss, npc_mageguard_dalaran, npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI, npc_pet_hunter_snake_trap, NullCreatureAI, PetAI, EscortAI, FollowerAI, PossessedAI, PassiveAI, ReactorAI, and ScheduledChangeAI.

124 {
125  if (me->IsEngaged())
126  return;
127 
128  if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who, false))
129  me->EngageWithTarget(who);
130 }
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:7818
Creature *const me
Definition: CreatureAI.h:61
Definition: UnitDefines.h:474
bool IsEngaged() const override
Definition: Creature.cpp:3430
bool HasReactState(ReactStates state) const
Definition: Creature.h:135
bool CanStartAttack(Unit const *u, bool force) const
Definition: Creature.cpp:1992
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MoveInLineOfSight_Safe()

void CreatureAI::MoveInLineOfSight_Safe ( Unit who)

== Reactions At =================================

115 {
116  if (_moveInLOSLocked == true)
117  return;
118  _moveInLOSLocked = true;
119  MoveInLineOfSight(who);
120  _moveInLOSLocked = false;
121 }
bool _moveInLOSLocked
Definition: CreatureAI.h:263
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:123
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MovementInform()

virtual void CreatureAI::MovementInform ( uint32  ,
uint32   
)
inlinevirtual

Reimplemented in npc_quel_delar_sword::npc_quel_delar_swordAI, npc_uther_quel_delar::npc_uther_quel_delarAI, npc_train_wrecker::npc_train_wreckerAI, npc_turned_champion::npc_turned_championAI, npc_spirit_bomb, npc_gunship_mage, npc_stratholme_rp_dummy, npc_gunship_rocketeer, npc_gunship_gunner, npc_illidan_db_target, npc_valkyr_shadowguard, npc_gunship_boarding_addAI, npc_roger_owens::npc_roger_owensAI, npc_shield_orb::npc_shield_orbAI, boss_aerial_command_unit::boss_aerial_command_unitAI, npc_the_lich_king_escape_hor::npc_the_lich_king_escape_horAI, npc_melee_hover_disk, npc_trapped_mammoth_calf, npc_expedition_engineer, npc_akama_illidan, npc_sergeant_morigan::npc_sergeant_moriganAI, npc_tirion_fordring_tft, npc_icc_nerubar_broodkeeper, npc_ashtongue_broken, npc_malcolm_moore::npc_malcolm_mooreAI, boss_icehowl, npc_expedition_trapper, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, npc_ball_of_flame, npc_brann_bronzebeard_algalon, npc_muradin_bronzebeard_icc, boss_dreadscale, npc_expedition_defender, npc_leryssa::npc_leryssaAI, npc_blood_queen_lana_thel, npc_bartleby_battson::npc_bartleby_battsonAI, npc_darnavan, npc_mechanolift::npc_mechanoliftAI, npc_rimefang_icc, npc_suppresser, boss_the_lich_king, boss_leviathan_mk_ii::boss_leviathan_mk_iiAI, npc_king_jokkum_vehicle, npc_counselor_talbot::npc_counselor_talbotAI, npc_jena_anderson::npc_jena_andersonAI, npc_toxic_sporebat::npc_toxic_sporebatAI, npc_general_arlos::npc_general_arlosAI, npc_high_overlord_saurfang_icc, npc_spinestalker, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_image_lich_king::npc_image_lich_kingAI, npc_frostbrood_skytalon, npc_fizzlebang_toc, npc_hadronox_foeAI, boss_illidan_stormrage, npc_kelthuzad_minionAI, boss_malygos, npc_frost_sphere, npc_martha_goslin::npc_martha_goslinAI, npc_valkyr_of_odyn, npc_azure_saboteur, gunship_npc_AI, boss_thorim::boss_thorimAI, npc_spectating_valarjar, boss_flame_leviathan::boss_flame_leviathanAI, npc_unleashed_ballAI, npc_wild_wyrm, boss_headless_horseman, npc_anubarak_anub_ar_assassin, npc_eye_of_acherus, npc_earthen_ring_flamecaller, boss_kaelthas, npc_image_of_medivh::npc_image_of_medivhAI, npc_skadi_trashAI, npc_spectator, npc_spirit_shade::npc_spirit_shadeAI, boss_nefarian, npc_wounded_skirmisher, boss_sister_svalna, npc_brann_bronzebeard_anraphet::npc_brann_bronzebeard_anraphetAI, npc_twilight_volunteer, npc_akama_shade, boss_razorscale, boss_essence_of_desire, npc_enslaved_netherwing_drake::npc_enslaved_netherwing_drakeAI, boss_algalon_the_observer, boss_deathbringer_saurfang, npc_hadronox_crusherPackAI, npc_living_mojo, boss_high_inquisitor_whitemane, npc_molten_barrage::npc_molten_barrageAI, npc_scarlet_courier::npc_scarlet_courierAI, npc_chained_spirit, boss_professor_putricide, npc_grauf, npc_ingvar_throw_dummy, boss_krick, boss_four_horsemen_baseAI, boss_sindragosa, boss_gormok, npc_weegli_blastfuse::npc_weegli_blastfuseAI, boss_paletress::boss_paletressAI, npc_omen, npc_spark_of_ionar, npc_barada::npc_baradaAI, npc_troll_volunteer, boss_lich_king_toc, boss_blood_queen_lana_thel, boss_essence_of_suffering, npc_glob_of_viscidus::npc_glob_of_viscidusAI, npc_apothecary_genericAI, npc_koltira_deathweaver, npc_ruby_emerald_amber_drake, npc_milos_gyro::npc_milos_gyro_AI, npc_barrett_toc, npc_annhylde_the_caller, boss_lord_marrowgar, npc_malformed_ooze, boss_jedoga_shadowseeker, npc_valarjar_paying_respect_to_odyn, npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI, npc_hive_zara_larva::npc_hive_zara_larvaAI, boss_gluth, boss_shade_of_akama, npc_ichor_globule, boss_felmyst::boss_felmystAI, boss_kalecgos, npc_corrupted_soul_fragment, npc_feasting_valarjar, boss_alar, boss_rend_blackhand, boss_twin_baseAI, boss_mr_smite::boss_mr_smiteAI, boss_onyxia, boss_sapphiron, npc_enslaved_proto_drake, boss_nightbane::boss_nightbaneAI, npc_azure_ring_captain, boss_eadric::boss_eadricAI, boss_volkhan, dummy_dragonAI, boss_anraphet::boss_anraphetAI, npc_onyx_flamecaller, npc_drakkari_invader, boss_hadronox, npc_voljin_zulaman::npc_voljin_zulamanAI, npc_announcer_toc5::npc_announcer_toc5AI, npc_verdisa_beglaristrasz_eternos, boss_the_lurker_below::boss_the_lurker_belowAI, boss_slabhide::boss_slabhideAI, npc_colonel_jules::npc_colonel_julesAI, npc_snufflenose_gopher::npc_snufflenose_gopherAI, boss_jaraxxus, boss_high_priestess_azil::boss_high_priestess_azilAI, npc_sc_millhouse_manastorm::npc_sc_millhouse_manastormAI, npc_mortimer_moloch, boss_ymiron, npc_commander_eligor_dawnbringer, npc_released_offspring_harkoa, boss_warchief_kargath_bladefist::boss_warchief_kargath_bladefistAI, boss_garfrost, boss_selin_fireheart::boss_selin_fireheartAI, SmartAI, npc_unworthy_initiate::npc_unworthy_initiateAI, npc_belnistrasz::npc_belnistraszAI, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, boss_alizabal::boss_alizabalAI, npc_warden_thelwater, npc_freed_protodrake, npc_danica_the_reclaimer, boss_infinite_corruptor::boss_infinite_corruptorAI, npc_sharpbeak::npc_sharpbeak_AI, boss_ayamiss::boss_ayamissAI, npc_nether_drake::npc_nether_drakeAI, npc_tooga::npc_toogaAI, boss_saviana_ragefire, CritterAI, npc_lazy_peon::npc_lazy_peonAI, boss_erekem, npc_kalecgos::npc_kalecgosAI, npc_eagle_spirit::npc_eagle_spirit_AI, npc_argent_valiant, EscortAI, and PetAI.

161 { }
+ Here is the caller graph for this function:

◆ OnChannelFinished()

virtual void CreatureAI::OnChannelFinished ( SpellInfo const *  )
inlinevirtual
152 { }

◆ OnCharmed()

void CreatureAI::OnCharmed ( bool  isNew)
overridevirtual

Reimplemented from UnitAI.

Reimplemented in npc_gunship_cannon, npc_king_jokkum_vehicle, npc_wyrmrest_defender, npc_eye_of_acherus, npc_dk_understudy, npc_icefang, and SmartAI.

61 {
62  if (isNew && !me->IsCharmed() && !me->LastCharmerGUID.IsEmpty())
63  {
65  {
66  if (Unit* lastCharmer = ObjectAccessor::GetUnit(*me, me->LastCharmerGUID))
67  me->EngageWithTarget(lastCharmer);
68  }
69 
71 
72  if (!me->IsInCombat())
74  }
75 
76  UnitAI::OnCharmed(isNew);
77 }
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:206
bool IsCharmed() const
Definition: Unit.h:1300
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:220
bool IsInCombat() const
Definition: Unit.h:1149
Definition: UnitDefines.h:472
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:7818
Creature *const me
Definition: CreatureAI.h:61
Definition: CreatureAI.h:73
void Clear()
Definition: ObjectGuid.h:277
bool HasReactState(ReactStates state) const
Definition: Creature.h:135
bool IsEmpty() const
Definition: ObjectGuid.h:310
virtual void OnCharmed(bool isNew)
Definition: UnitAI.cpp:48
Definition: Unit.h:746
ObjectGuid LastCharmerGUID
Definition: Unit.h:1797
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnGossipHello()

virtual bool CreatureAI::OnGossipHello ( Player )
inlinevirtual

Reimplemented in npc_experience::npc_experienceAI, npc_wormhole::npc_wormholeAI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_hidden_cultist, npc_prof_tailor::npc_prof_tailorAI, npc_prof_leather::npc_prof_leatherAI, npc_engineering_tele_trinket::npc_engineering_tele_trinketAI, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, npc_brann_hos, npc_death_knight_initiate::npc_death_knight_initiateAI, npc_thassarian::npc_thassarianAI, npc_taretha::npc_tarethaAI, npc_prof_blacksmith::npc_prof_blacksmithAI, npc_alchemist_adrianna, npc_essence_of_twin, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, npc_chromie_middle::npc_chromie_middleAI, npc_lokhtos_darkbargainer::npc_lokhtos_darkbargainerAI, npc_announcer_toc5::npc_announcer_toc5AI, npc_prof_alchemy::npc_prof_alchemyAI, npc_sinclari_vh, npc_weegli_blastfuse::npc_weegli_blastfuseAI, npc_barnes::npc_barnesAI, npc_jaina_or_sylvanas_intro_hor::npc_jaina_or_sylvanas_intro_horAI, npc_disciple_of_naralex::npc_disciple_of_naralexAI, npc_chromie_start::npc_chromie_startAI, npc_wg_queue, boss_doomrel::boss_doomrelAI, npc_tyrande_whisperwind::npc_tyrande_whisperwindAI, npc_colonel_jules::npc_colonel_julesAI, SmartAI, npc_wg_spirit_guide, npc_sergeant_bly::npc_sergeant_blyAI, npc_thrall::npc_thrallAI, npc_cairne_bloodhoof::npc_cairne_bloodhoofAI, npc_shadowfang_prisoner::npc_shadowfang_prisonerAI, npc_wg_demolisher_engineer, npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI, npc_koltira_deathweaver, npc_jaina_proudmoore::npc_jaina_proudmooreAI, boss_gloomrel::boss_gloomrelAI, npc_erozion::npc_erozionAI, npc_corastrasza, and npc_innkeeper::npc_innkeeperAI.

204 { return false; }
+ Here is the caller graph for this function:

◆ OnGossipSelect()

virtual bool CreatureAI::OnGossipSelect ( Player ,
uint32  ,
uint32   
)
inlinevirtual

Reimplemented in npc_argent_squire_gruntling::npc_argent_squire_gruntlingAI, npc_experience::npc_experienceAI, npc_wormhole::npc_wormholeAI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_observation_ring_keeper::npc_observation_ring_keeperAI, npc_hidden_cultist, npc_zafod_boombox, npc_lorekeeper::npc_lorekeeperAI, npc_prof_tailor::npc_prof_tailorAI, npc_muradin_bronzebeard_igb, npc_brann_bronzebeard_ulduar_intro::npc_brann_bronzebeard_ulduar_introAI, npc_tirion_fordring_tft, npc_prof_leather::npc_prof_leatherAI, npc_akama_illidan, npc_high_overlord_saurfang_igb, npc_engineering_tele_trinket::npc_engineering_tele_trinketAI, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, npc_muradin_bronzebeard_icc, npc_grandmother::npc_grandmotherAI, npc_prof_blacksmith::npc_prof_blacksmithAI, npc_lake_frog, npc_expedition_commander, npc_brann_hos, npc_death_knight_initiate::npc_death_knight_initiateAI, npc_thassarian::npc_thassarianAI, npc_high_overlord_saurfang_icc, npc_magister_aledis::npc_magister_aledisAI, npc_entrance_faction_leader, npc_taretha::npc_tarethaAI, npc_prof_alchemy::npc_prof_alchemyAI, npc_akama_shade, npc_wyrmrest_defender, npc_chromie_middle::npc_chromie_middleAI, npc_announcer_toc5::npc_announcer_toc5AI, npc_alchemist_finklestein, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, npc_lokhtos_darkbargainer::npc_lokhtos_darkbargainerAI, npc_sinclari_vh, npc_jaina_or_sylvanas_intro_hor::npc_jaina_or_sylvanas_intro_horAI, boss_victor_nefarius, npc_weegli_blastfuse::npc_weegli_blastfuseAI, npc_chromie_start::npc_chromie_startAI, npc_barnes::npc_barnesAI, npc_brann_bronzebeard_anraphet::npc_brann_bronzebeard_anraphetAI, npc_disciple_of_naralex::npc_disciple_of_naralexAI, npc_brann_bronzebeard_keystone, npc_wg_queue, npc_barada::npc_baradaAI, npc_barrett_toc, boss_doomrel::boss_doomrelAI, npc_crusade_recruit, npc_engineer_spark_overgrind::npc_engineer_spark_overgrindAI, npc_tyrande_whisperwind::npc_tyrande_whisperwindAI, boss_vaelastrasz, npc_wg_spirit_guide, SmartAI, npc_morridune, boss_majordomo, npc_jaina_fos, npc_sergeant_bly::npc_sergeant_blyAI, npc_thrall::npc_thrallAI, npc_wg_demolisher_engineer, npc_verdisa_beglaristrasz_eternos, npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, npc_cairne_bloodhoof::npc_cairne_bloodhoofAI, npc_thalorien_dawnseeker, boss_coren_direbrew, npc_shadowfang_prisoner::npc_shadowfang_prisonerAI, npc_sylvanas_fos, npc_voljin_zulaman::npc_voljin_zulamanAI, boss_apothecary_hummel, npc_corastrasza, npc_jaina_proudmoore::npc_jaina_proudmooreAI, npc_selina_dourman, npc_innkeeper::npc_innkeeperAI, npc_erozion::npc_erozionAI, boss_gloomrel::boss_gloomrelAI, and npc_tb_spirit_guide::npc_tb_spirit_guideAI.

207 { return false; }
+ Here is the caller graph for this function:

◆ OnGossipSelectCode()

virtual bool CreatureAI::OnGossipSelectCode ( Player ,
uint32  ,
uint32  ,
char const *   
)
inlinevirtual

Reimplemented in SmartAI.

210 { return false; }
+ Here is the caller graph for this function:

◆ OnOwnerCombatInteraction()

void CreatureAI::OnOwnerCombatInteraction ( Unit target)
private
133 {
134  if (!target || !me->IsAlive())
135  return;
136 
137  if (!me->HasReactState(REACT_PASSIVE) && me->CanStartAttack(target, true))
138  me->EngageWithTarget(target);
139 }
Definition: UnitDefines.h:472
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:7818
Creature *const me
Definition: CreatureAI.h:61
bool IsAlive() const
Definition: Unit.h:1251
bool HasReactState(ReactStates state) const
Definition: Creature.h:135
bool CanStartAttack(Unit const *u, bool force) const
Definition: Creature.cpp:1992
+ Here is the call graph for this function:

◆ OnQuestAccept()

◆ OnQuestReward()

virtual void CreatureAI::OnQuestReward ( Player ,
Quest const *  ,
LootItemType  ,
uint32   
)
inlinevirtual

Reimplemented in npc_the_etymidian::npc_the_etymidianAI, npc_rocknot::npc_rocknotAI, npc_chicken_cluck::npc_chicken_cluckAI, boss_apothecary_hummel, npc_lady_sylvanas_windrunner::npc_lady_sylvanas_windrunnerAI, and SmartAI.

216 { }
+ Here is the caller graph for this function:

◆ OnSpellCast()

virtual void CreatureAI::OnSpellCast ( SpellInfo const *  )
inlinevirtual

Reimplemented in boss_garothi_worldbreaker, SmartAI, boss_exarch_maladaar, boss_commander_sarannis, boss_warp_splinter, and boss_maiden_of_grief.

143 { }
+ Here is the caller graph for this function:

◆ OnSpellClick()

virtual void CreatureAI::OnSpellClick ( Unit ,
bool   
)
inlinevirtual

Reimplemented in npc_descend_into_madness::npc_descend_into_madnessAI, npc_dream_portal, boss_flame_leviathan_overload_device::boss_flame_leviathan_overload_deviceAI, SmartAI, and npc_whisperwind_lasher::npc_whisperwind_lasherAI.

228 { }
+ Here is the caller graph for this function:

◆ OnSpellFailed()

virtual void CreatureAI::OnSpellFailed ( SpellInfo const *  )
inlinevirtual

Reimplemented in npc_shambling_horror_icc, and SmartAI.

146 { }
+ Here is the caller graph for this function:

◆ OnSpellStart()

virtual void CreatureAI::OnSpellStart ( SpellInfo const *  )
inlinevirtual

Reimplemented in SmartAI.

149 { }
+ Here is the caller graph for this function:

◆ OwnerAttacked()

virtual void CreatureAI::OwnerAttacked ( Unit target)
inlinevirtual

Reimplemented in PetAI.

177 { OnOwnerCombatInteraction(target); }
void OnOwnerCombatInteraction(Unit *target)
Definition: CreatureAI.cpp:132

◆ OwnerAttackedBy()

virtual void CreatureAI::OwnerAttackedBy ( Unit attacker)
inlinevirtual

Reimplemented in FollowerAI, and PetAI.

174 { OnOwnerCombatInteraction(attacker); }
void OnOwnerCombatInteraction(Unit *target)
Definition: CreatureAI.cpp:132
+ Here is the caller graph for this function:

◆ PassengerBoarded()

◆ ReceiveEmote()

virtual void CreatureAI::ReceiveEmote ( Player ,
uint32   
)
inlinevirtual

◆ SetBoundary()

void CreatureAI::SetBoundary ( CreatureBoundary const *  boundary,
bool  negativeBoundaries = false 
)
430 {
431  _boundary = boundary;
432  _negateBoundary = negateBoundaries;
434 }
bool _negateBoundary
Definition: CreatureAI.h:256
Creature *const me
Definition: CreatureAI.h:61
void DoImmediateBoundaryCheck()
Definition: Creature.h:284
CreatureBoundary const * _boundary
Definition: CreatureAI.h:255
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SpellHit()

virtual void CreatureAI::SpellHit ( WorldObject ,
SpellInfo const *   
)
inlinevirtual

Reimplemented in npc_sif::npc_sifAI, npc_shadowmoon_tuber_node::npc_shadowmoon_tuber_nodeAI, npc_razorscale_harpoon_fire_state, npc_crate_helper::npc_crate_helperAI, npc_arcane_overload, npc_tirion_fordring_tft, boss_julianne::boss_julianneAI, boss_vx_001::boss_vx_001AI, npc_beryl_sorcerer, npc_garments_of_quests::npc_garments_of_questsAI, npc_portal_eoe, npc_saurfang_event, npc_toasty_fire::npc_toasty_fireAI, boss_yogg_saron::boss_yogg_saronAI, npc_pool_of_tar::npc_pool_of_tarAI, npc_muradin_bronzebeard_icc, npc_argent_captainAI, npc_black_hole, npc_feugen, npc_gothik_trigger, advisorbase_ai, npc_rocket_propelled_warhead, npc_injured_patient::npc_injured_patientAI, boss_the_lich_king, npc_storm_cloud, npc_living_constellation, npc_putricide_oozeAI, npc_sir_thomas, npc_icc_orb_controller, npc_cult_adherent, npc_frostbrood_skytalon, npc_high_overlord_saurfang_icc, npc_open_portal_target_toc, boss_malygos, npc_cult_fanatic, npc_stalagg, npc_death_knight_initiate::npc_death_knight_initiateAI, npc_wild_wyrm, npc_venture_co_straggler, BloodPrincesBossAI, boss_thorim::boss_thorimAI, npc_earthen_ring_flamecaller, npc_wyrmrest_defender, boss_shade_of_aran::boss_aranAI, boss_twilight_halion::boss_twilight_halionAI, boss_razorscale, boss_sathrovarr, npc_nagrand_banner::npc_nagrand_bannerAI, boss_deathbringer_saurfang, npc_wounded_skirmisher, npc_grauf, npc_molten_golem, boss_sister_svalna, npc_enslaved_netherwing_drake::npc_enslaved_netherwing_drakeAI, npc_akama_shade, boss_strawman::boss_strawmanAI, boss_valithria_dreamwalker, npc_gatewatcher_petAI, boss_anub_arak, npc_omen, boss_flame_leviathan::boss_flame_leviathanAI, npc_muru_portal, npc_jungle_punch_target, npc_troll_volunteer, boss_halion::boss_halionAI, boss_urom, boss_krik_thir, boss_kelthuzad, npc_archaedas_minions::npc_archaedas_minionsAI, npc_outhouse_bunny, npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI, npc_spectral_ghostly_citizen::npc_spectral_ghostly_citizenAI, npc_ruby_emerald_amber_drake, boss_shade_of_akama, npc_ichor_globule, boss_attumen::boss_attumenAI, boss_alar, npc_tournament_training_dummy, boss_felmyst::boss_felmystAI, boss_onyxia, npc_taskmaster_fizzule::npc_taskmaster_fizzuleAI, boss_scarlet_commander_mograine, boss_magtheridon, npc_medivh_bm, boss_gal_darah, npc_infernal_attacker::npc_infernal_attackerAI, boss_twinemperorsAI, npc_summoned_skeleton, netherspite_infernal::netherspite_infernalAI, npc_wounded_milita::npc_wounded_militaAI, npc_warp_splinter_sapling, boss_viscidus::boss_viscidusAI, boss_warlord_kalithresh::boss_warlord_kalithreshAI, npc_restless_soul::npc_restless_soulAI, boss_ionar, boss_archaedas::boss_archaedasAI, npc_captured_rageclaw, npc_nether_drake::npc_nether_drakeAI, boss_ossirian::boss_ossirianAI, boss_moorabi, boss_faerlina, SmartAI, boss_pyroguard_emberseer, boss_xevozz, npc_draenei_survivor::npc_draenei_survivorAI, boss_terestian_illhoof::boss_terestianAI, boss_najentus, boss_razuvious, boss_high_botanist_freywinn, npc_lazy_peon::npc_lazy_peonAI, npc_brunnhildar_prisoner, npc_drakuru_shackles, npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI, npc_pet_dk_ebon_gargoyle, boss_ioc_horde_alliance, and npc_wounded_coldridge_mountaineer::npc_wounded_coldridge_mountaineerAI.

137 { }
+ Here is the caller graph for this function:

◆ SpellHitTarget()

◆ SummonedCreatureDespawn()

◆ SummonedCreatureDies()

◆ SummonedGameobjectDespawn()

virtual void CreatureAI::SummonedGameobjectDespawn ( GameObject )
inlinevirtual
126 { }
+ Here is the caller graph for this function:

◆ Talk()

void CreatureAI::Talk ( uint8  id,
WorldObject const *  whisperTarget = nullptr 
)
55 {
56  sCreatureTextMgr->SendChat(me, id, whisperTarget);
57 }
Creature *const me
Definition: CreatureAI.h:61
#define sCreatureTextMgr
Definition: CreatureTextMgr.h:131

◆ TriggerAlert()

void CreatureAI::TriggerAlert ( Unit const *  who) const
143 {
144  // If there's no target, or target isn't a player do nothing
145  if (!who || who->GetTypeId() != TYPEID_PLAYER)
146  return;
147 
148  // If this unit isn't an NPC, is already distracted, is fighting, is confused, stunned or fleeing, do nothing
150  return;
151 
152  // Only alert for hostiles!
154  return;
155 
156  // Send alert sound (if any) for this creature
158 
159  // Face the unit (stealthed player) and set distracted state for 5 seconds
161 }
bool IsCivilian() const
Definition: Creature.h:111
Definition: SharedDefines.h:5822
TypeID GetTypeId() const
Definition: Object.h:170
Definition: Unit.h:245
MotionMaster * GetMotionMaster()
Definition: Unit.h:1736
Definition: ObjectGuid.h:39
Definition: UnitDefines.h:472
Definition: Unit.h:253
Definition: Unit.h:254
Creature *const me
Definition: CreatureAI.h:61
bool HasUnitState(const uint32 f) const
Definition: Unit.h:850
bool _IsTargetAcceptable(Unit const *target) const
Definition: Creature.cpp:2523
Definition: Common.h:68
bool IsEngaged() const override
Definition: Creature.cpp:3430
void MoveDistract(uint32 time, float orientation)
Definition: MotionMaster.cpp:1084
bool HasReactState(ReactStates state) const
Definition: Creature.h:135
void SendAIReaction(AiReaction reactionType)
Definition: Creature.cpp:2405
Definition: ObjectGuid.h:40
float GetAbsoluteAngle(float x, float y) const
Definition: Position.h:126
bool IsHostileTo(WorldObject const *target) const
Definition: Object.cpp:2694
Definition: Unit.h:249
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateVictim()

bool CreatureAI::UpdateVictim ( )
protected
247 {
248  if (!IsEngaged())
249  return false;
250 
251  if (!me->IsAlive())
252  {
253  EngagementOver();
254  return false;
255  }
256 
258  {
259  if (Unit* victim = me->SelectVictim())
260  if (victim != me->GetVictim())
261  AttackStart(victim);
262 
263  return me->GetVictim() != nullptr;
264  }
265  else if (!me->IsInCombat())
266  {
268  return false;
269  }
270  else if (me->GetVictim())
271  me->AttackStop();
272 
273  return true;
274 }
bool AttackStop()
Definition: Unit.cpp:5624
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:220
bool IsInCombat() const
Definition: Unit.h:1149
Definition: UnitDefines.h:472
Creature *const me
Definition: CreatureAI.h:61
bool IsAlive() const
Definition: Unit.h:1251
bool IsEngaged() const
Definition: CreatureAI.h:87
Definition: CreatureAI.h:73
void EngagementOver()
Definition: CreatureAI.cpp:288
Unit * GetVictim() const
Definition: Unit.h:833
bool HasReactState(ReactStates state) const
Definition: Creature.h:135
Unit * SelectVictim()
Definition: Creature.cpp:1199
Definition: Unit.h:746
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:28
+ Here is the call graph for this function:

◆ VisualizeBoundary()

int32 CreatureAI::VisualizeBoundary ( Seconds  duration,
Unit owner = nullptr,
bool  fill = false 
) const
337 {
338  typedef std::pair<int32, int32> coordinate;
339 
340  if (!owner)
341  return -1;
342 
343  if (!_boundary || _boundary->empty())
345 
346  std::queue<coordinate> Q;
347  std::unordered_set<coordinate> alreadyChecked;
348  std::unordered_set<coordinate> outOfBounds;
349 
350  Position startPosition = owner->GetPosition();
351  if (!IsInBoundary(&startPosition)) // fall back to creature position
352  {
353  startPosition = me->GetPosition();
354  if (!IsInBoundary(&startPosition)) // fall back to creature home position
355  {
356  startPosition = me->GetHomePosition();
357  if (!IsInBoundary(&startPosition))
359  }
360  }
361  float spawnZ = startPosition.GetPositionZ() + BOUNDARY_VISUALIZE_SPAWN_HEIGHT;
362 
363  bool boundsWarning = false;
364  Q.push({ 0,0 });
365  while (!Q.empty())
366  {
367  coordinate front = Q.front();
368  bool hasOutOfBoundsNeighbor = false;
369  for (coordinate const& off : std::list<coordinate>{ {1, 0}, {0, 1}, {-1, 0}, {0, -1} })
370  {
371  coordinate next(front.first + off.first, front.second + off.second);
373  {
374  boundsWarning = true;
375  continue;
376  }
377  if (alreadyChecked.find(next) == alreadyChecked.end()) // never check a coordinate twice
378  {
379  Position nextPos(startPosition.GetPositionX() + next.first*BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionY() + next.second*BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionZ());
380  if (IsInBoundary(&nextPos))
381  Q.push(next);
382  else
383  {
384  outOfBounds.insert(next);
385  hasOutOfBoundsNeighbor = true;
386  }
387  alreadyChecked.insert(next);
388  }
389  else if (outOfBounds.find(next) != outOfBounds.end())
390  hasOutOfBoundsNeighbor = true;
391  }
392  if (fill || hasOutOfBoundsNeighbor)
393  {
394  if (TempSummon* point = owner->SummonCreature(BOUNDARY_VISUALIZE_CREATURE, Position(startPosition.GetPositionX() + front.first * BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionY() + front.second * BOUNDARY_VISUALIZE_STEP_SIZE, spawnZ), TEMPSUMMON_TIMED_DESPAWN, duration))
395  {
396  point->SetObjectScale(BOUNDARY_VISUALIZE_CREATURE_SCALE);
397  point->SetUnitFlag(UNIT_FLAG_STUNNED);
398  point->SetImmuneToAll(true);
399  if (!hasOutOfBoundsNeighbor)
400  point->SetUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
401  }
402  }
403 
404  Q.pop();
405  }
406  return boundsWarning ? LANG_CREATURE_MOVEMENT_MAYBE_UNBOUNDED : 0;
407 }
Definition: TemporarySummon.h:43
Definition: Language.h:1229
const float BOUNDARY_VISUALIZE_SPAWN_HEIGHT
Definition: CreatureAI.cpp:335
const int8 BOUNDARY_VISUALIZE_STEP_SIZE
Definition: CreatureAI.cpp:333
Definition: UnitDefines.h:150
const uint32 BOUNDARY_VISUALIZE_CREATURE
Definition: CreatureAI.cpp:331
float GetPositionY() const
Definition: Position.h:78
Creature *const me
Definition: CreatureAI.h:61
bool IsInBoundary(Position const *who=nullptr) const
Definition: CreatureAI.cpp:409
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:1927
Definition: Language.h:1228
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:312
Definition: UnitDefines.h:143
const float BOUNDARY_VISUALIZE_CREATURE_SCALE
Definition: CreatureAI.cpp:332
float GetPositionZ() const
Definition: Position.h:79
float GetPositionX() const
Definition: Position.h:77
CreatureBoundary const * _boundary
Definition: CreatureAI.h:255
Definition: Position.h:27
void GetPosition(float &x, float &y) const
Definition: Position.h:82
const int32 BOUNDARY_VISUALIZE_FAILSAFE_LIMIT
Definition: CreatureAI.cpp:334
Definition: ObjectDefines.h:63
Definition: Language.h:1230
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WaypointPathEnded()

virtual void CreatureAI::WaypointPathEnded ( uint32  ,
uint32   
)
inlinevirtual

Reimplemented in SmartAI.

222 { }
+ Here is the caller graph for this function:

◆ WaypointReached()

virtual void CreatureAI::WaypointReached ( uint32  ,
uint32   
)
inlinevirtual

Reimplemented in npc_gargoyle::npc_gargoyleAI, npc_frost_wyrm::npc_frost_wyrmAI, npc_fel_stalker::npc_fel_stalkerAI, npc_crypt_fiend::npc_crypt_fiendAI, npc_banshee::npc_bansheeAI, violet_hold_trashAI, npc_necromancer::npc_necromancerAI, npc_ghoul::npc_ghoulAI, npc_demolitionist_legoso::npc_demolitionist_legosoAI, npc_crok_scourgebane, npc_taretha::npc_tarethaAI, npc_abomination::npc_abominationAI, npc_rocknot::npc_rocknotAI, npc_argent_soldier::npc_argent_soldierAI, npc_earthmender_wilda::npc_earthmender_wildaAI, npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_giant_infernal::npc_giant_infernalAI, npc_thassarian::npc_thassarianAI, npc_magwin::npc_magwinAI, npc_ranshalla::npc_ranshallaAI, npc_brann_hos, npc_kurenai_captive::npc_kurenai_captiveAI, npc_muglash::npc_muglashAI, npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, npc_thrall_old_hillsbrad::npc_thrall_old_hillsbradAI, generic_vehicleAI_toc5::generic_vehicleAI_toc5AI, npc_grimstone::npc_grimstoneAI, npc_barnes::npc_barnesAI, npc_morridune, hyjalAI, npc_cameron, npc_maghar_captive::npc_maghar_captiveAI, boss_azgalor::boss_azgalorAI, boss_anetheron::boss_anetheronAI, npc_disciple_of_naralex::npc_disciple_of_naralexAI, boss_kazrogal::boss_kazrogalAI, boss_rage_winterchill::boss_rage_winterchillAI, npc_ruul_snowhoof::npc_ruul_snowhoofAI, SmartAI, npc_shadowfang_prisoner::npc_shadowfang_prisonerAI, npc_emily, npc_gilthares::npc_giltharesAI, npc_willix::npc_willixAI, and npc_engineer_helice.

221 { }
+ Here is the caller graph for this function:

◆ WaypointStarted()

virtual void CreatureAI::WaypointStarted ( uint32  ,
uint32   
)
inlinevirtual

== Waypoints system =============================

Reimplemented in npc_crok_scourgebane, and npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI.

220 { }

Member Data Documentation

◆ _boundary

CreatureBoundary const* CreatureAI::_boundary
protected

◆ _isEngaged

bool CreatureAI::_isEngaged
private

◆ _moveInLOSLocked

bool CreatureAI::_moveInLOSLocked
private

◆ _negateBoundary

bool CreatureAI::_negateBoundary
protected

◆ _scriptId

uint32 const CreatureAI::_scriptId
private

◆ me

Creature* const CreatureAI::me
protected

The documentation for this class was generated from the following files: