TrinityCore
CreatureAI Class Reference

#include <CreatureAI.h>

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=EvadeReason::Other)
 
void JustEnteredCombat (Unit *) override
 
virtual void JustStartedThreateningMe (Unit *who)
 
virtual void JustEngagedWith (Unit *)
 
virtual void OnHealthDepleted (Unit *, bool)
 
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 ()
 
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 const *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 OnCharmed (bool isNew)
 
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 JustEnteredCombat (Unit *)
 
virtual void JustExitedCombat ()
 
virtual void OnDespawn ()
 
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={})
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void OnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Static Public Member Functions

static void DoZoneInCombat (Creature *creature)
 
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=EvadeReason::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
 

Detailed Description

Definition at line 58 of file CreatureAI.h.

Constructor & Destructor Documentation

◆ CreatureAI()

CreatureAI::CreatureAI ( Creature creature,
uint32  scriptId = {} 
)
explicit

Definition at line 45 of file CreatureAI.cpp.

46 : UnitAI(creature), me(creature), _boundary(nullptr),
47 _negateBoundary(false), _scriptId(scriptId ? scriptId : creature->GetScriptId()), _isEngaged(false), _moveInLOSLocked(false)
48{
49 ASSERT(_scriptId, "A CreatureAI was initialized with an invalid scriptId!");
50}
#define ASSERT
Definition: Errors.h:68
CreatureBoundary const * _boundary
Definition: CreatureAI.h:249
bool _isEngaged
Definition: CreatureAI.h:256
bool _negateBoundary
Definition: CreatureAI.h:250
uint32 const _scriptId
Definition: CreatureAI.h:255
Creature *const me
Definition: CreatureAI.h:61
bool _moveInLOSLocked
Definition: CreatureAI.h:257
uint32 GetScriptId() const
Definition: Creature.cpp:3133
UnitAI(Unit *unit)
Definition: UnitAI.h:54

◆ ~CreatureAI()

CreatureAI::~CreatureAI ( )
virtual

Definition at line 52 of file CreatureAI.cpp.

53{
54}

Member Function Documentation

◆ _EnterEvadeMode()

bool CreatureAI::_EnterEvadeMode ( EvadeReason  why = EvadeReason::Other)
protected

Definition at line 299 of file CreatureAI.cpp.

300{
301 if (me->IsInEvadeMode())
302 return false;
303
304 if (!me->IsAlive())
305 {
307 return false;
308 }
309
311
312 me->CombatStop(true);
314 me->SetTappedBy(nullptr);
315
318 me->SetCannotReachTarget(false);
323
324 return true;
325}
void EngagementOver()
Definition: CreatureAI.cpp:287
bool IsTapListNotClearedOnEvade() const
Definition: Creature.h:255
void SetLastDamagedTime(time_t val)
Definition: Creature.h:389
void DoNotReacquireSpellFocusTarget()
Definition: Creature.cpp:3514
void ResetPlayerDamageReq()
Definition: Creature.h:362
void SetCannotReachTarget(bool cannotReach)
Definition: Creature.cpp:3280
void SetTappedBy(Unit const *unit, bool withGroup=true)
Definition: Creature.cpp:1342
void SetTarget(ObjectGuid const &guid) override
Definition: Creature.cpp:3388
bool IsInEvadeMode() const
Definition: Creature.h:179
static ObjectGuid const Empty
Definition: ObjectGuid.h:272
void ResetAllCooldowns()
bool IsAlive() const
Definition: Unit.h:1150
SpellHistory * GetSpellHistory()
Definition: Unit.h:1443
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition: Unit.cpp:5808
void RemoveAurasOnEvade()
Definition: Unit.cpp:4284
+ 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 GuardAI, and boss_veras_darkshadow.

Definition at line 224 of file CreatureAI.h.

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

◆ CheckInRoom()

bool CreatureAI::CheckInRoom ( )
virtual

Reimplemented in boss_drekthar, and boss_galvangar.

Definition at line 437 of file CreatureAI.cpp.

438{
439 if (IsInBoundary())
440 return true;
441 else
442 {
444 return false;
445 }
446}
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:219
bool IsInBoundary(Position const *who=nullptr) const
Definition: CreatureAI.cpp:410
+ 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.

Definition at line 187 of file CreatureAI.h.

187{ }

◆ DoSummon() [1/2]

Creature * CreatureAI::DoSummon ( uint32  entry,
Position const &  pos,
Milliseconds  despawnTime = 30s,
TempSummonType  summonType = TEMPSUMMON_CORPSE_TIMED_DESPAWN 
)
protected

Definition at line 448 of file CreatureAI.cpp.

449{
450 return me->SummonCreature(entry, pos, summonType, despawnTime);
451}
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:2013
+ 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

Definition at line 453 of file CreatureAI.cpp.

454{
455 Position pos = obj->GetRandomNearPosition(radius);
456 return me->SummonCreature(entry, pos, summonType, despawnTime);
457}
Position GetRandomNearPosition(float radius)
Definition: Object.cpp:3411
+ 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

Definition at line 459 of file CreatureAI.cpp.

460{
461 Position pos = obj->GetRandomNearPosition(radius);
462 pos.m_positionZ += flightZ;
463 return me->SummonCreature(entry, pos, summonType, despawnTime);
464}
float m_positionZ
Definition: Position.h:55
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoZoneInCombat() [1/2]

void CreatureAI::DoZoneInCombat ( )
inline

Definition at line 161 of file CreatureAI.h.

161{ DoZoneInCombat(me); }
void DoZoneInCombat()
Definition: CreatureAI.h:161
+ Here is the call graph for this function:

◆ DoZoneInCombat() [2/2]

void CreatureAI::DoZoneInCombat ( Creature creature)
static

Definition at line 81 of file CreatureAI.cpp.

82{
83 Map* map = creature->GetMap();
84 if (!map->IsDungeon()) // use IsDungeon instead of Instanceable, in case battlegrounds will be instantiated
85 {
86 TC_LOG_ERROR("scripts.ai", "CreatureAI::DoZoneInCombat: call for map that isn't an instance ({})", creature->GetGUID().ToString());
87 return;
88 }
89
90 if (!map->HavePlayers())
91 return;
92
93 for (MapReference const& ref : map->GetPlayers())
94 {
95 if (Player* player = ref.GetSource())
96 {
97 if (!player->IsAlive() || !CombatManager::CanBeginCombat(creature, player))
98 continue;
99
100 creature->EngageWithTarget(player);
101
102 for (Unit* pet : player->m_Controlled)
103 creature->EngageWithTarget(pet);
104
105 if (Unit* vehicle = player->GetVehicleBase())
106 creature->EngageWithTarget(vehicle);
107 }
108 }
109}
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:165
static bool CanBeginCombat(Unit const *a, Unit const *b)
Definition: Map.h:187
bool IsDungeon() const
Definition: Map.cpp:3205
bool HavePlayers() const
Definition: Map.h:353
PlayerList const & GetPlayers() const
Definition: Map.h:363
std::string ToString() const
Definition: ObjectGuid.cpp:554
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:158
Definition: Unit.h:622
Unit * GetVehicleBase() const
Definition: Unit.cpp:11403
ControlList m_Controlled
Definition: Unit.h:1197
void EngageWithTarget(Unit *who)
Definition: Unit.cpp:8050
Map * GetMap() const
Definition: Object.h:604
+ Here is the call graph for this function:

◆ EngagementOver()

void CreatureAI::EngagementOver ( )
protected

Definition at line 287 of file CreatureAI.cpp.

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

◆ EngagementStart()

void CreatureAI::EngagementStart ( Unit who)
protected

Definition at line 275 of file CreatureAI.cpp.

276{
277 if (_isEngaged)
278 {
279 TC_LOG_ERROR("scripts.ai", "CreatureAI::EngagementStart called even though creature is already engaged. Creature debug info:\n{}", me->GetDebugInfo());
280 return;
281 }
282 _isEngaged = true;
283
284 me->AtEngage(who);
285}
void AtEngage(Unit *target) override
Definition: Creature.cpp:3577
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EnterEvadeMode()

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

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

Definition at line 219 of file CreatureAI.cpp.

220{
221 if (!_EnterEvadeMode(why))
222 return;
223
224 TC_LOG_DEBUG("scripts.ai", "CreatureAI::EnterEvadeMode: entering evade mode (why: {}) ({})", EnumUtils::ToConstant(why), me->GetGUID().ToString());
225
226 if (!me->GetVehicle()) // otherwise me will be in evade mode forever
227 {
228 if (Unit* owner = me->GetCharmerOrOwner())
229 {
232 }
233 else
234 {
235 // Required to prevent attacking creatures that are evading and cause them to reenter combat
236 // Does not apply to MoveFollow
239 }
240 }
241
242 Reset();
243}
#define PET_FOLLOW_DIST
Definition: PetDefines.h:97
@ UNIT_STATE_EVADE
Definition: Unit.h:272
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
Definition: CreatureAI.cpp:299
static char const * ToConstant(Enum value)
Definition: SmartEnum.h:120
void MoveFollow(Unit *target, float dist, ChaseAngle angle, Optional< Milliseconds > duration={}, MovementSlot slot=MOTION_SLOT_ACTIVE)
void MoveTargetedHome()
virtual void Reset()
Definition: UnitAI.h:63
Vehicle * GetVehicle() const
Definition: Unit.h:1697
MotionMaster * GetMotionMaster()
Definition: Unit.h:1637
void AddUnitState(uint32 f)
Definition: Unit.h:726
Unit * GetCharmerOrOwner() const
Definition: Unit.h:1186
virtual float GetFollowAngle() const
Definition: Unit.h:1731
+ 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.

Definition at line 229 of file CreatureAI.h.

229{ return nullptr; }

◆ GetBoundary()

CreatureBoundary const * CreatureAI::GetBoundary ( ) const
inline

Definition at line 236 of file CreatureAI.h.

236{ return _boundary; }

◆ GetDialogStatus()

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

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

Definition at line 327 of file CreatureAI.cpp.

328{
329 return {};
330}

◆ GetId()

uint32 CreatureAI::GetId ( ) const
inline

Definition at line 75 of file CreatureAI.h.

75{ return _scriptId; }

◆ IsEngaged()

bool CreatureAI::IsEngaged ( ) const
inline

Definition at line 77 of file CreatureAI.h.

77{ return _isEngaged; }
+ Here is the caller graph for this function:

◆ IsEscorted()

virtual bool CreatureAI::IsEscorted ( ) const
inlinevirtual

Reimplemented in EscortAI, and FollowerAI.

Definition at line 148 of file CreatureAI.h.

148{ return false; }

◆ IsInBoundary()

bool CreatureAI::IsInBoundary ( Position const *  who = nullptr) const

Definition at line 410 of file CreatureAI.cpp.

411{
412 if (!_boundary)
413 return true;
414
415 if (!who)
416 who = me;
417
419}
static bool IsInBounds(CreatureBoundary const &boundary, Position const *who)
Definition: CreatureAI.cpp:421
+ 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

Definition at line 421 of file CreatureAI.cpp.

422{
423 for (AreaBoundary const* areaBoundary : boundary)
424 if (!areaBoundary->IsWithinBoundary(pos))
425 return false;
426
427 return true;
428}
+ Here is the caller graph for this function:

◆ IsSummonedBy()

virtual void CreatureAI::IsSummonedBy ( WorldObject )
inlinevirtual

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

Definition at line 112 of file CreatureAI.h.

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

◆ JustAppeared()

void CreatureAI::JustAppeared ( )
virtual

Reimplemented in NullCreatureAI, PetAI, ScheduledChangeAI, SmartAI, boss_garothi_worldbreaker, boss_guarm, npc_illidari_fighting_invasion_begins, npc_kayn_sunfury_ashtongue_intro_private, npc_sevis_brightflame_ashtongue_gateway_private, npc_sevis_brightflame_coilskar_gateway_private, npc_inquisitor_baleful_molten_shore, npc_baleful_beaming_eye, npc_cyana_nightglaive_freed_private, npc_izal_whitemoon_freed_private, npc_belath_dawnblade_freed_private, npc_mannethrel_darkstar_freed_private, npc_altar_altercation_ariok, npc_altar_altercation_blood_ritual_orb, boss_kazzara_the_hellforged, boss_leymor, npc_arcane_tender, npc_ley_line_sprouts, boss_telash_greywing, npc_av_marshal_or_warmaster, boss_drekthar, npc_blackhand_incarcerator, npc_dark_rider_of_acherus, npc_scarlet_ghoul, npc_headless_horseman_head, boss_headless_horseman, boss_felmyst, npc_joren_ironstock, npc_partygoer_pather, npc_partygoer, npc_silverpine_horde_hauler, npc_silverpine_sylvanas_windrunner_high_command, npc_silverpine_deathstalker, npc_silverpine_deathstalker_rane_yorick, npc_silverpine_lord_darius_crowley_exsanguinate, npc_silverpine_packleader_ivar_bloodfang_exsanguinate, npc_silverpine_salty_rocka, npc_silverpine_apothecary_wormcrud, npc_silverpine_admiral_hatchet, npc_silverpine_orc_sea_dog_not_sick, npc_silverpine_orc_sea_dog_sick, npc_silverpine_orc_sea_pup, npc_silverpine_forest_ettin, npc_silverpine_mutant_bush_chicken, npc_silverpine_webbed_victim, npc_silverpine_orc_sea_dog, npc_silverpine_skitterweb_matriarch, npc_silverpine_agatha_fenris_isle, npc_silverpine_crowley_bloodfang_fenris_keep, npc_silverpine_generic_actor_fenris_keep, npc_ship_captain_warming_up_private, npc_sparring_partner_exiles_reach, npc_ship_captain_brace_for_impact_private, npc_first_mate_brace_for_impact_private, npc_crew_ship_private, npc_pet_ship_private, npc_horde_survivors_beach_q59930_private< PathId >, npc_survivors_beach_leave_private< PathId, WaitTime >, npc_sparring_partner_combat_training, npc_leader_northbound, npc_huxsworth_hunter_quest_private, npc_huxsworth_briarpatch_quest_private, npc_dawntracker_hunter_quest_private, npc_dawntracker_briarpatch_quest_private, npc_geolord_grekog, npc_briarpatch_prisoner, npc_gnome_goblin_plains_make_copter_private, npc_lindie_springstock_q56034, npc_cork_fizzlepop_q59941, npc_re_sized_boar_q56034, npc_chromie_middle::npc_chromie_middleAI, npc_martha_goslin::npc_martha_goslinAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_husam_tolvir_land_mine, npc_husam_shockwave_visual, npc_lockmaw_frenzied_crocolisk, npc_lockmaw_augh_add, npc_lockmaw_augh_boss, npc_durotar_tiki_target, npc_darkspear_jailor, npc_captive_spitescale_scout, npc_echo_isles_class_trainer< PitPos, QuestID >, npc_voljin_garrosh_vision, npc_voljin_thrall_vision, boss_hadronox, boss_krik_thir, npc_halion_controller::npc_halion_controllerAI, boss_twin_baseAI, BloodPrincesBossAI, npc_spinestalker, npc_rimefang_icc, npc_sindragosa_trash, npc_gothik_minion_livingrider, npc_gothik_minion_spectralrider, npc_grobbulus_poison_cloud, npc_kelthuzad_shadow_fissure, npc_sapphiron_wing_buffet, boss_thaddius, boss_general_bjarngrim, boss_volkhan, npc_volkhan_molten_golem, npc_malformed_ooze, npc_iron_sludge, npc_xt_void_zone, npc_beryl_sorcerer, npc_captured_beryl_sorcerer, npc_thassarian, npc_brunnhildar_prisoner, npc_storm_cloud, npc_voidwalker_summoner, npc_void_traveler, npc_maiev, boss_doomlord_kazzak, npc_greyheart_spellbinder, npc_ahune_ice_spear_bunny, npc_kael_flamestrike, npc_raging_flames, npc_huojin_trainee, npc_tushui_leading_trainee, npc_instructor_zhi, npc_pet_gen_soul_trader, npc_pet_hunter_snake_trap, npc_sylvanas_windrunner_shadowcopy_riding, boss_sylvanas_windrunner, boss_anduin_wrynn, npc_anduin_wrynn_empty_vessel, npc_anduin_wrynn_lost_soul, npc_anduin_wrynn_anduin_soul, npc_anduin_wrynn_anduin_despair, npc_anduin_wrynn_anduin_doubt, npc_anduin_wrynn_anduin_hope, boss_remnant_of_a_fallen_king, npc_anduin_wrynn_grim_reflection, npc_anduin_wrynn_sylvanas, npc_anduin_wrynn_jaina, npc_anduin_wrynn_uther, npc_gen_void_zone, boss_cragmaw_the_infested, npc_cragmaw_blood_tick, and npc_blood_wave_stalker.

Definition at line 194 of file CreatureAI.cpp.

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

Definition at line 105 of file CreatureAI.h.

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

◆ JustEngagedWith()

virtual void CreatureAI::JustEngagedWith ( Unit )
inlinevirtual

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

Definition at line 99 of file CreatureAI.h.

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

◆ JustEnteredCombat()

void CreatureAI::JustEnteredCombat ( Unit who)
overridevirtual

Reimplemented from UnitAI.

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

Definition at line 213 of file CreatureAI.cpp.

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

◆ JustReachedHome()

virtual void CreatureAI::JustReachedHome ( )
inlinevirtual

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

Definition at line 159 of file CreatureAI.h.

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

◆ JustRegisteredAreaTrigger()

virtual void CreatureAI::JustRegisteredAreaTrigger ( AreaTrigger )
inlinevirtual

Definition at line 126 of file CreatureAI.h.

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

◆ JustRegisteredDynObject()

virtual void CreatureAI::JustRegisteredDynObject ( DynamicObject )
inlinevirtual

Definition at line 122 of file CreatureAI.h.

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

◆ JustStartedThreateningMe()

virtual void CreatureAI::JustStartedThreateningMe ( Unit who)
inlinevirtual

Reimplemented in PossessedAI, NullCreatureAI, and ScheduledChangeAI.

Definition at line 96 of file CreatureAI.h.

96{ if (!IsEngaged()) EngagementStart(who); }
+ Here is the caller graph for this function:

◆ JustSummoned()

virtual void CreatureAI::JustSummoned ( Creature )
inlinevirtual

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

Definition at line 111 of file CreatureAI.h.

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

◆ JustSummonedGameobject()

virtual void CreatureAI::JustSummonedGameobject ( GameObject )
inlinevirtual

Definition at line 118 of file CreatureAI.h.

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

◆ JustUnregisteredAreaTrigger()

virtual void CreatureAI::JustUnregisteredAreaTrigger ( AreaTrigger )
inlinevirtual

Reimplemented in npc_anduin_wrynn_beacon_of_hope.

Definition at line 127 of file CreatureAI.h.

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

◆ JustUnregisteredDynObject()

virtual void CreatureAI::JustUnregisteredDynObject ( DynamicObject )
inlinevirtual

Definition at line 123 of file CreatureAI.h.

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

◆ KilledUnit()

virtual void CreatureAI::KilledUnit ( Unit )
inlinevirtual

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

Definition at line 108 of file CreatureAI.h.

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

◆ MoveInLineOfSight()

void CreatureAI::MoveInLineOfSight ( Unit who)
protectedvirtual

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

Definition at line 122 of file CreatureAI.cpp.

123{
124 if (me->IsEngaged())
125 return;
126
127 if (me->HasReactState(REACT_AGGRESSIVE) && me->CanStartAttack(who, false))
128 me->EngageWithTarget(who);
129}
@ REACT_AGGRESSIVE
Definition: UnitDefines.h:508
bool HasReactState(ReactStates state) const
Definition: Creature.h:142
bool IsEngaged() const override
Definition: Creature.cpp:3570
bool CanStartAttack(Unit const *u, bool force) const
Definition: Creature.cpp:2109
+ 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 =================================

Definition at line 113 of file CreatureAI.cpp.

114{
115 if (_moveInLOSLocked == true)
116 return;
117 _moveInLOSLocked = true;
119 _moveInLOSLocked = false;
120}
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:122
+ 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 boss_volkhan, npc_lockmaw_augh_add, npc_lockmaw_augh_boss, npc_tooga::npc_toogaAI, boss_general_bjarngrim, npc_spectator, boss_essence_of_suffering, boss_essence_of_desire, npc_akama_shade, npc_earthen_ring_flamecaller, boss_shade_of_akama, npc_ashtongue_broken, SmartAI, boss_paletress::boss_paletressAI, npc_eye_of_acherus, npc_voljin_zulaman::npc_voljin_zulamanAI, npc_brann_bronzebeard_anraphet, boss_algalon_the_observer, npc_molten_barrage::npc_molten_barrageAI, boss_eadric::boss_eadricAI, npc_spirit_shade::npc_spirit_shadeAI, boss_four_horsemen_baseAI, CritterAI, PetAI, boss_rend_blackhand, boss_nefarian, npc_image_of_medivh::npc_image_of_medivhAI, boss_selin_fireheart::boss_selin_fireheartAI, npc_unworthy_initiate::npc_unworthy_initiateAI, npc_scarlet_courier::npc_scarlet_courierAI, boss_headless_horseman, boss_high_inquisitor_whitemane, boss_kirtonos_the_herald::boss_kirtonos_the_heraldAI, boss_kalecgos, npc_warden_thelwater, npc_mortimer_moloch, npc_silverpine_mutant_bush_chicken, npc_silverpine_fenris_keep_camera, npc_troll_volunteer, boss_infinite_corruptor::boss_infinite_corruptorAI, npc_martha_goslin::npc_martha_goslinAI, npc_jena_anderson::npc_jena_andersonAI, npc_bartleby_battson::npc_bartleby_battsonAI, npc_malcolm_moore::npc_malcolm_mooreAI, npc_sergeant_morigan::npc_sergeant_moriganAI, npc_roger_owens::npc_roger_owensAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_stratholme_rp_dummy, boss_onyxia, npc_belnistrasz::npc_belnistraszAI, npc_snufflenose_gopher::npc_snufflenose_gopherAI, boss_ayamiss::boss_ayamissAI, npc_hive_zara_larva::npc_hive_zara_larvaAI, npc_captive_spitescale_scout, npc_echo_isles_class_trainer< PitPos, QuestID >, boss_high_priestess_azil::boss_high_priestess_azilAI, boss_slabhide::boss_slabhideAI, npc_hadronox_crusherPackAI, npc_hadronox_foeAI, npc_corrupted_soul_fragment, boss_garfrost, boss_krick, npc_living_mojo, npc_blood_queen_lana_thel, npc_ball_of_flame, boss_blood_queen_lana_thel, boss_deathbringer_saurfang, npc_high_overlord_saurfang_icc, npc_muradin_bronzebeard_icc, npc_darnavan, boss_lord_marrowgar, boss_professor_putricide, boss_sister_svalna, npc_tirion_fordring_tft, npc_valkyr_shadowguard, npc_icc_nerubar_broodkeeper, boss_malygos, npc_melee_hover_disk, npc_azure_ring_captain, npc_ruby_emerald_amber_drake, npc_malformed_ooze, npc_mechanolift::npc_mechanoliftAI, boss_thorim::boss_thorimAI, npc_annhylde_the_caller, npc_ingvar_throw_dummy, npc_enslaved_proto_drake, npc_ichor_globule, npc_commander_eligor_dawnbringer, npc_frostbrood_skytalon, npc_freed_protodrake, npc_wild_wyrm, npc_king_jokkum_vehicle, npc_toxic_sporebat, boss_warchief_kargath_bladefist::boss_warchief_kargath_bladefistAI, npc_nether_drake::npc_nether_drakeAI, npc_colonel_jules::npc_colonel_julesAI, npc_barada::npc_baradaAI, npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI, npc_enslaved_netherwing_drake::npc_enslaved_netherwing_drakeAI, npc_tushui_huojin_trainee, boss_sylvanas_windrunner, boss_anraphet, boss_saviana_ragefire, boss_sindragosa, npc_spinestalker, npc_rimefang_icc, npc_spirit_bomb, boss_leviathan_mk_ii::boss_leviathan_mk_iiAI, boss_aerial_command_unit::boss_aerial_command_unitAI, boss_kaelthas, boss_guarm, npc_kayn_sunfury_invasion_begins, npc_jayce_darkweaver_invasion_begins, npc_allari_the_souleater_invasion_begins, npc_korvas_bloodthorn_invasion_begins, npc_sevis_brightflame_invasion_begins, npc_cyana_nightglaive_invasion_begins, npc_inquisitor_baleful_molten_shore, boss_nightbane::boss_nightbaneAI, npc_kalecgos::npc_kalecgosAI, npc_koltira_deathweaver, npc_apothecary_genericAI, npc_safe_technician_sanitron, npc_milos_gyro::npc_milos_gyro_AI, npc_vanessa_vancleef_human_heritage_lions_pride_inn_basement, npc_sharpbeak::npc_sharpbeak_AI, npc_chained_spirit, npc_omen, npc_eagle_spirit::npc_eagle_spirit_AI, npc_taelia_get_your_bearings, npc_sc_millhouse_manastorm::npc_sc_millhouse_manastormAI, boss_jedoga_shadowseeker, npc_twilight_volunteer, dummy_dragonAI, npc_onyx_flamecaller, npc_frost_sphere, boss_jaraxxus, boss_gormok, boss_dreadscale, boss_icehowl, boss_twin_baseAI, npc_barrett_toc, boss_lich_king_toc, npc_fizzlebang_toc, npc_drakkari_invader, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, npc_the_lich_king_escape_hor::npc_the_lich_king_escape_horAI, npc_quel_delar_sword::npc_quel_delar_swordAI, gunship_npc_AI, npc_gunship_boarding_addAI, npc_gunship_gunner, npc_gunship_rocketeer, npc_gunship_mage, boss_the_lich_king, npc_brann_bronzebeard_algalon, boss_razorscale, npc_expedition_defender, npc_expedition_trapper, npc_expedition_engineer, npc_turned_champion::npc_turned_championAI, npc_grauf, npc_skadi_trashAI, boss_ymiron, boss_erekem, npc_azure_saboteur, boss_illidan_stormrage, npc_akama_illidan, npc_illidan_db_target, npc_anduin_wrynn_anduin_hope, npc_shield_orb::npc_shield_orbAI, boss_hadronox, npc_suppresser, npc_released_offspring_harkoa, boss_the_lurker_below, boss_alar, npc_sparring_partner_exiles_reach, npc_captain_warlord_first_aid_private, npc_garrick_summoned_beach, npc_grimaxe_summoned_beach, npc_sparring_partner_combat_training, npc_leader_northbound, npc_lindie_springstock_q56034, npc_cork_fizzlepop_q59941, npc_re_sized_boar_q56034, npc_unleashed_ballAI, npc_announcer_toc5::npc_announcer_toc5AI, npc_spark_of_ionar, npc_argent_valiant, npc_danica_the_reclaimer, npc_feasting_valarjar, npc_valarjar_paying_respect_to_odyn, npc_spectating_valarjar, npc_valkyr_of_odyn, boss_telash_greywing, npc_glob_of_viscidus::npc_glob_of_viscidusAI, npc_lazy_peon::npc_lazy_peonAI, npc_anubarak_anub_ar_assassin, boss_gluth, npc_kelthuzad_minionAI, boss_sapphiron, npc_verdisa_beglaristrasz_eternos, boss_flame_leviathan::boss_flame_leviathanAI, npc_wounded_skirmisher, npc_train_wrecker::npc_train_wreckerAI, boss_cragmaw_the_infested, boss_alizabal::boss_alizabalAI, npc_uther_quel_delar::npc_uther_quel_delarAI, EscortAI, boss_felmyst, and npc_weegli_blastfuse::npc_weegli_blastfuseAI.

Definition at line 154 of file CreatureAI.h.

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

◆ OnChannelFinished()

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

Reimplemented in boss_leymor, and boss_cragmaw_the_infested.

Definition at line 145 of file CreatureAI.h.

145{ }

◆ OnCharmed()

void CreatureAI::OnCharmed ( bool  isNew)
overridevirtual

Reimplemented from UnitAI.

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

Definition at line 62 of file CreatureAI.cpp.

63{
64 if (isNew && !me->IsCharmed() && !me->LastCharmerGUID.IsEmpty())
65 {
67 {
68 if (Unit* lastCharmer = ObjectAccessor::GetUnit(*me, me->LastCharmerGUID))
69 me->EngageWithTarget(lastCharmer);
70 }
71
73
74 if (!me->IsInCombat())
76 }
77
78 UnitAI::OnCharmed(isNew);
79}
@ REACT_PASSIVE
Definition: UnitDefines.h:506
bool IsEmpty() const
Definition: ObjectGuid.h:317
void Clear()
Definition: ObjectGuid.h:284
virtual void OnCharmed(bool isNew)
Definition: UnitAI.cpp:49
bool IsCharmed() const
Definition: Unit.h:1201
ObjectGuid LastCharmerGUID
Definition: Unit.h:1693
bool IsInCombat() const
Definition: Unit.h:1038
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
+ 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_arthas_stratholme::npc_arthas_stratholmeAI, SmartAI, npc_lokhtos_darkbargainer::npc_lokhtos_darkbargainerAI, boss_gloomrel::boss_gloomrelAI, boss_doomrel::boss_doomrelAI, npc_barnes::npc_barnesAI, npc_death_knight_initiate::npc_death_knight_initiateAI, npc_koltira_deathweaver, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_silverpine_bat_handler_maggotbreath, npc_jaina_proudmoore::npc_jaina_proudmooreAI, npc_thrall::npc_thrallAI, npc_tyrande_whisperwind::npc_tyrande_whisperwindAI, npc_chromie_start::npc_chromie_startAI, npc_chromie_middle::npc_chromie_middleAI, npc_erozion, npc_thrall_old_hillsbrad, npc_taretha, npc_disciple_of_naralex::npc_disciple_of_naralexAI, npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI, npc_mithaka, npc_cairne_bloodhoof::npc_cairne_bloodhoofAI, npc_sergeant_bly::npc_sergeant_blyAI, npc_weegli_blastfuse::npc_weegli_blastfuseAI, npc_announcer_toc5::npc_announcer_toc5AI, npc_essence_of_twin, npc_jaina_or_sylvanas_intro_hor::npc_jaina_or_sylvanas_intro_horAI, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, npc_alchemist_adrianna, npc_brann_hos, npc_sinclari_vh, npc_hidden_cultist, npc_wg_demolisher_engineer, npc_wg_spirit_guide, npc_wg_queue, npc_zm_field_scout, npc_colonel_jules::npc_colonel_julesAI, npc_prof_alchemy::npc_prof_alchemyAI, npc_prof_blacksmith::npc_prof_blacksmithAI, npc_engineering_tele_trinket::npc_engineering_tele_trinketAI, npc_prof_leather::npc_prof_leatherAI, npc_prof_tailor::npc_prof_tailorAI, and npc_wormhole::npc_wormholeAI.

Definition at line 198 of file CreatureAI.h.

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

◆ OnGossipSelect()

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

Reimplemented in npc_brann_bronzebeard_anraphet, npc_tirion_fordring_tft, npc_entrance_faction_leader, npc_high_overlord_saurfang_igb, npc_muradin_bronzebeard_igb, SmartAI, npc_sevis_brightflame_shivarra_gateway, boss_coren_direbrew, boss_victor_nefarius, boss_vaelastrasz, boss_majordomo, npc_grandmother::npc_grandmotherAI, boss_apothecary_hummel, npc_master_mathias_shaw_human_heritage_lions_pride_inn_basement, npc_jaina_proudmoore_tides_of_war, npc_voljin_zulaman::npc_voljin_zulamanAI, npc_selina_dourman, npc_echo_isles_class_trainer< PitPos, QuestID >, npc_cyrus_crestfall_old_knight, npc_7th_legion_magus_sanctum_of_the_sages, npc_barrett_toc, npc_sylvanas_fos, npc_jaina_fos, npc_verdisa_beglaristrasz_eternos, npc_brann_bronzebeard_ulduar_intro::npc_brann_bronzebeard_ulduar_introAI, npc_lorekeeper::npc_lorekeeperAI, npc_sinclari_vh, npc_wyrmrest_defender, npc_thalorien_dawnseeker, npc_high_overlord_saurfang_icc, npc_muradin_bronzebeard_icc, npc_observation_ring_keeper::npc_observation_ring_keeperAI, npc_baros_alexston, npc_lokhtos_darkbargainer::npc_lokhtos_darkbargainerAI, boss_gloomrel::boss_gloomrelAI, boss_doomrel::boss_doomrelAI, npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, npc_barnes::npc_barnesAI, npc_death_knight_initiate::npc_death_knight_initiateAI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_silverpine_bat_handler_maggotbreath, npc_tb_spirit_guide, npc_jaina_proudmoore::npc_jaina_proudmooreAI, npc_thrall::npc_thrallAI, npc_tyrande_whisperwind::npc_tyrande_whisperwindAI, npc_erozion, npc_thrall_old_hillsbrad, npc_taretha, npc_disciple_of_naralex::npc_disciple_of_naralexAI, npc_cairne_bloodhoof::npc_cairne_bloodhoofAI, npc_sergeant_bly::npc_sergeant_blyAI, npc_weegli_blastfuse::npc_weegli_blastfuseAI, npc_announcer_toc5::npc_announcer_toc5AI, npc_jaina_or_sylvanas_intro_hor::npc_jaina_or_sylvanas_intro_horAI, npc_jaina_or_sylvanas_escape_hor::npc_jaina_or_sylvanas_escape_horAI, npc_brann_hos, npc_expedition_commander, npc_hidden_cultist, npc_thassarian, npc_wg_demolisher_engineer, npc_wg_spirit_guide, npc_zm_field_scout, npc_akama_illidan, npc_akama_shade, npc_barada::npc_baradaAI, npc_prof_alchemy::npc_prof_alchemyAI, npc_prof_blacksmith::npc_prof_blacksmithAI, npc_engineering_tele_trinket::npc_engineering_tele_trinketAI, npc_prof_leather::npc_prof_leatherAI, npc_prof_tailor::npc_prof_tailorAI, npc_wormhole::npc_wormholeAI, npc_argent_squire_gruntling::npc_argent_squire_gruntlingAI, npc_chromie_start::npc_chromie_startAI, npc_chromie_middle::npc_chromie_middleAI, npc_arthas_stratholme::npc_arthas_stratholmeAI, npc_silverpine_admiral_hatchet, npc_morridune, npc_engineer_spark_overgrind::npc_engineer_spark_overgrindAI, npc_darkspear_jailor, npc_voljin_garrosh_vision, npc_voljin_thrall_vision, npc_zafod_boombox, npc_lake_frog, npc_brann_bronzebeard_keystone, npc_wg_queue, npc_crusade_recruit, npc_alchemist_finklestein, and npc_magister_aledis::npc_magister_aledisAI.

Definition at line 201 of file CreatureAI.h.

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

◆ OnGossipSelectCode()

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

Reimplemented in SmartAI.

Definition at line 204 of file CreatureAI.h.

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

◆ OnHealthDepleted()

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

Definition at line 102 of file CreatureAI.h.

102{ }

◆ OnOwnerCombatInteraction()

void CreatureAI::OnOwnerCombatInteraction ( Unit target)
private

Definition at line 131 of file CreatureAI.cpp.

132{
133 if (!target || !me->IsAlive())
134 return;
135
136 if (!me->HasReactState(REACT_PASSIVE) && me->CanStartAttack(target, true))
137 me->EngageWithTarget(target);
138}
+ Here is the call graph for this function:

◆ OnQuestAccept()

virtual void CreatureAI::OnQuestAccept ( Player ,
Quest const *   
)
inlinevirtual

◆ OnQuestReward()

◆ OnSpellCast()

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

◆ OnSpellClick()

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

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

Definition at line 222 of file CreatureAI.h.

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

◆ OnSpellFailed()

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

Reimplemented in npc_volatile_sapling, npc_shambling_horror_icc, and SmartAI.

Definition at line 139 of file CreatureAI.h.

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

◆ OnSpellStart()

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

Reimplemented in boss_drakos, and SmartAI.

Definition at line 142 of file CreatureAI.h.

142{ }

◆ OwnerAttacked()

virtual void CreatureAI::OwnerAttacked ( Unit target)
inlinevirtual

Reimplemented in PetAI.

Definition at line 171 of file CreatureAI.h.

171{ OnOwnerCombatInteraction(target); }
void OnOwnerCombatInteraction(Unit *target)
Definition: CreatureAI.cpp:131

◆ OwnerAttackedBy()

virtual void CreatureAI::OwnerAttackedBy ( Unit attacker)
inlinevirtual

Reimplemented in PetAI, and FollowerAI.

Definition at line 168 of file CreatureAI.h.

168{ OnOwnerCombatInteraction(attacker); }

◆ PassengerBoarded()

◆ ReceiveEmote()

◆ SetBoundary()

void CreatureAI::SetBoundary ( CreatureBoundary const *  boundary,
bool  negativeBoundaries = false 
)

Definition at line 430 of file CreatureAI.cpp.

431{
432 _boundary = boundary;
433 _negateBoundary = negateBoundaries;
435}
void DoImmediateBoundaryCheck()
Definition: Creature.h:310
+ 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_ley_line_sprouts, boss_pyroguard_emberseer, boss_attumen::boss_attumenAI, netherspite_infernal::netherspite_infernalAI, boss_shade_of_aran::boss_aranAI, boss_terestian_illhoof::boss_terestianAI, boss_strawman::boss_strawmanAI, boss_julianne::boss_julianneAI, npc_sir_thomas, boss_scarlet_commander_mograine, npc_summoned_skeleton, npc_spectral_ghostly_citizen::npc_spectral_ghostly_citizenAI, npc_muru_portal, boss_archaedas::boss_archaedasAI, npc_archaedas_minions::npc_archaedas_minionsAI, npc_silverpine_forsaken_bat, npc_silverpine_orc_sea_pup, npc_silverpine_agatha_fenris_isle, npc_silverpine_hillsbrad_refugee, npc_silverpine_fenris_keep_stalker, npc_silverpine_fenris_keep_camera, npc_silverpine_crowley_bloodfang_fenris_keep, npc_silverpine_generic_actor_fenris_keep, npc_omen, npc_garrick_summoned_beach, npc_grimaxe_summoned_beach, npc_leader_northbound, npc_lindie_springstock_q56034, npc_cork_fizzlepop_q59941, npc_crate_helper::npc_crate_helperAI, npc_medivh_bm, boss_onyxia, boss_viscidus::boss_viscidusAI, npc_taskmaster_fizzule::npc_taskmaster_fizzuleAI, npc_taelia_get_your_bearings, boss_anub_arak, boss_krik_thir, npc_gatewatcher_petAI, boss_halion::boss_halionAI, boss_twilight_halion::boss_twilight_halionAI, npc_open_portal_target_toc, boss_gal_darah, boss_moorabi, BloodPrincesBossAI, boss_deathbringer_saurfang, npc_high_overlord_saurfang_icc, npc_muradin_bronzebeard_icc, npc_saurfang_event, npc_cult_fanatic, npc_cult_adherent, npc_putricide_oozeAI, npc_argent_captainAI, boss_the_lich_king, npc_tirion_fordring_tft, boss_valithria_dreamwalker, npc_gothik_trigger, boss_kelthuzad, npc_portal_eoe, npc_arcane_overload, boss_magus_telestra, boss_urom, npc_ruby_emerald_amber_drake, boss_ionar, npc_black_hole, boss_flame_leviathan::boss_flame_leviathanAI, npc_pool_of_tar::npc_pool_of_tarAI, npc_toasty_fire::npc_toasty_fireAI, boss_razorscale, npc_razorscale_harpoon_fire_state, boss_thorim::boss_thorimAI, npc_sif::npc_sifAI, boss_yogg_saron::boss_yogg_saronAI, npc_grauf, boss_xevozz, npc_wyrmrest_defender, npc_frostbrood_skytalon, boss_shade_of_akama, npc_akama_shade, boss_najentus, boss_warlord_kalithresh::boss_warlord_kalithreshAI, npc_earthen_ring_flamecaller, boss_magtheridon, boss_high_botanist_freywinn, npc_warp_splinter_sapling, boss_alar, advisorbase_ai, npc_nagrand_banner::npc_nagrand_bannerAI, npc_infernal_attacker::npc_infernal_attackerAI, npc_shadowmoon_tuber_node::npc_shadowmoon_tuber_nodeAI, boss_ioc_horde_alliance, boss_vx_001::boss_vx_001AI, npc_rocket_propelled_warhead, npc_wounded_coldridge_mountaineer::npc_wounded_coldridge_mountaineerAI, npc_wounded_milita::npc_wounded_militaAI, npc_lazy_peon::npc_lazy_peonAI, SmartAI, npc_death_knight_initiate::npc_death_knight_initiateAI, npc_restless_soul::npc_restless_soulAI, boss_felmyst, boss_sathrovarr, npc_silverpine_forest_ettin, npc_troll_volunteer, npc_survivors_healed_by_leader_beach_private< PathId, WaitTime >, npc_alliance_survivors_beach_laying< ConversationId >, npc_bo_beach_laying, npc_mithran_dawntracker_beach_laying, npc_lana_jordan_beach_laying, npc_sparring_partner_enhanced_combat_training_warrior, npc_sparring_partner_enhanced_combat_training_paladin, npc_sparring_partner_enhanced_combat_training_rogue, npc_sparring_partner_enhanced_combat_training_priest, npc_sparring_partner_enhanced_combat_training_shaman, npc_sparring_partner_enhanced_combat_training_mage, npc_sparring_partner_enhanced_combat_training_warlock, npc_sparring_partner_enhanced_combat_training_monk, npc_sparring_partner_enhanced_combat_training_druid, npc_scoutomatic_5000, npc_choppy_booster_scout, boss_ossirian::boss_ossirianAI, boss_twinemperorsAI, npc_draenei_survivor::npc_draenei_survivorAI, npc_aged_dying_ancient_kodo::npc_aged_dying_ancient_kodoAI, boss_sister_svalna, npc_icc_orb_controller, boss_faerlina, boss_razuvious, npc_stalagg, npc_feugen, boss_malygos, npc_living_constellation, npc_ichor_globule, npc_beryl_sorcerer, npc_outhouse_bunny, npc_wounded_skirmisher, npc_venture_co_straggler, npc_tournament_training_dummy, npc_jungle_punch_target, npc_brunnhildar_prisoner, npc_wild_wyrm, npc_storm_cloud, npc_nether_drake::npc_nether_drakeAI, npc_mature_netherwing_drake::npc_mature_netherwing_drakeAI, npc_enslaved_netherwing_drake::npc_enslaved_netherwing_drakeAI, npc_pet_dk_ebon_gargoyle, npc_injured_patient::npc_injured_patientAI, and npc_garments_of_quests::npc_garments_of_questsAI.

Definition at line 130 of file CreatureAI.h.

130{ }

◆ SpellHitTarget()

◆ SummonedCreatureDespawn()

◆ SummonedCreatureDies()

◆ SummonedGameobjectDespawn()

virtual void CreatureAI::SummonedGameobjectDespawn ( GameObject )
inlinevirtual

Definition at line 119 of file CreatureAI.h.

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

◆ Talk()

void CreatureAI::Talk ( uint8  id,
WorldObject const *  whisperTarget = nullptr 
)

Definition at line 56 of file CreatureAI.cpp.

57{
58 sCreatureTextMgr->SendChat(me, id, whisperTarget);
59}
#define sCreatureTextMgr

◆ TriggerAlert()

void CreatureAI::TriggerAlert ( Unit const *  who) const

Definition at line 141 of file CreatureAI.cpp.

142{
143 // If there's no target, or target isn't a player do nothing
144 if (!who || who->GetTypeId() != TYPEID_PLAYER)
145 return;
146
147 // If this unit isn't an NPC, is already distracted, is fighting, is confused, stunned or fleeing, do nothing
149 return;
150
151 // Only alert for hostiles!
153 return;
154
155 // Send alert sound (if any) for this creature
157
158 // Face the unit (stealthed player) and set distracted state for 5 seconds
160}
@ IN_MILLISECONDS
Definition: Common.h:35
@ TYPEID_UNIT
Definition: ObjectGuid.h:40
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
@ AI_REACTION_ALERT
@ UNIT_STATE_DISTRACTED
Definition: Unit.h:262
@ UNIT_STATE_CONFUSED
Definition: Unit.h:261
@ UNIT_STATE_FLEEING
Definition: Unit.h:257
@ UNIT_STATE_STUNNED
Definition: Unit.h:253
bool _IsTargetAcceptable(Unit const *target) const
Definition: Creature.cpp:2646
bool IsCivilian() const
Definition: Creature.h:115
void SendAIReaction(AiReaction reactionType)
Definition: Creature.cpp:2528
void MoveDistract(uint32 time, float orientation)
TypeID GetTypeId() const
Definition: Object.h:172
bool HasUnitState(const uint32 f) const
Definition: Unit.h:727
bool IsHostileTo(WorldObject const *target) const
Definition: Object.cpp:2848
float GetAbsoluteAngle(float x, float y) const
Definition: Position.h:125
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateVictim()

bool CreatureAI::UpdateVictim ( )
protected

Definition at line 245 of file CreatureAI.cpp.

246{
247 if (!IsEngaged())
248 return false;
249
250 if (!me->IsAlive())
251 {
253 return false;
254 }
255
257 {
258 if (Unit* victim = me->SelectVictim())
259 if (victim != me->GetVictim())
260 AttackStart(victim);
261
262 return me->GetVictim() != nullptr;
263 }
264 else if (!me->IsInCombat())
265 {
267 return false;
268 }
269 else if (me->GetVictim())
270 me->AttackStop();
271
272 return true;
273}
Unit * SelectVictim()
Definition: Creature.cpp:1214
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
Unit * GetVictim() const
Definition: Unit.h:710
bool AttackStop()
Definition: Unit.cpp:5762
+ Here is the call graph for this function:

◆ VisualizeBoundary()

int32 CreatureAI::VisualizeBoundary ( Seconds  duration,
Unit owner = nullptr,
bool  fill = false 
) const

Definition at line 337 of file CreatureAI.cpp.

338{
339 typedef std::pair<int32, int32> coordinate;
340
341 if (!owner)
342 return -1;
343
344 if (!_boundary || _boundary->empty())
346
347 std::queue<coordinate> Q;
348 std::unordered_set<coordinate> alreadyChecked;
349 std::unordered_set<coordinate> outOfBounds;
350
351 Position startPosition = owner->GetPosition();
352 if (!IsInBoundary(&startPosition)) // fall back to creature position
353 {
354 startPosition = me->GetPosition();
355 if (!IsInBoundary(&startPosition)) // fall back to creature home position
356 {
357 startPosition = me->GetHomePosition();
358 if (!IsInBoundary(&startPosition))
360 }
361 }
362 float spawnZ = startPosition.GetPositionZ() + BOUNDARY_VISUALIZE_SPAWN_HEIGHT;
363
364 bool boundsWarning = false;
365 Q.push({ 0,0 });
366 while (!Q.empty())
367 {
368 coordinate front = Q.front();
369 bool hasOutOfBoundsNeighbor = false;
370 for (coordinate const& off : std::list<coordinate>{ {1, 0}, {0, 1}, {-1, 0}, {0, -1} })
371 {
372 coordinate next(front.first + off.first, front.second + off.second);
374 {
375 boundsWarning = true;
376 continue;
377 }
378 if (alreadyChecked.find(next) == alreadyChecked.end()) // never check a coordinate twice
379 {
380 Position nextPos(startPosition.GetPositionX() + next.first*BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionY() + next.second*BOUNDARY_VISUALIZE_STEP_SIZE, startPosition.GetPositionZ());
381 if (IsInBoundary(&nextPos))
382 Q.push(next);
383 else
384 {
385 outOfBounds.insert(next);
386 hasOutOfBoundsNeighbor = true;
387 }
388 alreadyChecked.insert(next);
389 }
390 else if (outOfBounds.find(next) != outOfBounds.end())
391 hasOutOfBoundsNeighbor = true;
392 }
393 if (fill || hasOutOfBoundsNeighbor)
394 {
395 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))
396 {
397 point->SetObjectScale(BOUNDARY_VISUALIZE_CREATURE_SCALE);
398 point->SetUnitFlag(UNIT_FLAG_STUNNED);
399 point->SetImmuneToAll(true);
400 if (!hasOutOfBoundsNeighbor)
401 point->SetUninteractible(true);
402 }
403 }
404
405 Q.pop();
406 }
407 return boundsWarning ? LANG_CREATURE_MOVEMENT_MAYBE_UNBOUNDED : 0;
408}
const float BOUNDARY_VISUALIZE_SPAWN_HEIGHT
Definition: CreatureAI.cpp:336
const uint32 BOUNDARY_VISUALIZE_CREATURE
Definition: CreatureAI.cpp:332
const int32 BOUNDARY_VISUALIZE_FAILSAFE_LIMIT
Definition: CreatureAI.cpp:335
const int8 BOUNDARY_VISUALIZE_STEP_SIZE
Definition: CreatureAI.cpp:334
const float BOUNDARY_VISUALIZE_CREATURE_SCALE
Definition: CreatureAI.cpp:333
@ LANG_CREATURE_MOVEMENT_MAYBE_UNBOUNDED
Definition: Language.h:1235
@ LANG_CREATURE_MOVEMENT_NOT_BOUNDED
Definition: Language.h:1234
@ LANG_CREATURE_NO_INTERIOR_POINT_FOUND
Definition: Language.h:1233
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
@ UNIT_FLAG_STUNNED
Definition: UnitDefines.h:162
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition: Creature.h:335
float GetPositionZ() const
Definition: Position.h:78
float GetPositionX() const
Definition: Position.h:76
void GetPosition(float &x, float &y) const
Definition: Position.h:81
float GetPositionY() const
Definition: Position.h:77
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WaypointPathEnded()

◆ WaypointReached()

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

Reimplemented in SmartAI, npc_ranshalla::npc_ranshallaAI, boss_vectus::boss_vectusAI, npc_sanitron_5000, npc_cameron, npc_silverpine_horde_hauler, npc_silverpine_forsaken_bat, npc_silverpine_deathstalker_rane_yorick, npc_silverpine_lord_darius_crowley_exsanguinate, npc_silverpine_packleader_ivar_bloodfang_exsanguinate, npc_silverpine_agatha_fenris_isle, boss_freya::boss_freyaAI, boss_xt002, boss_blackheart_the_inciter, boss_the_black_stalker, npc_nagrand_banner::npc_nagrand_bannerAI, npc_grimstone::npc_grimstoneAI, npc_rocknot::npc_rocknotAI, npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, npc_barnes::npc_barnesAI, npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, npc_morridune, boss_anetheron::boss_anetheronAI, boss_azgalor::boss_azgalorAI, boss_kazrogal::boss_kazrogalAI, boss_rage_winterchill::boss_rage_winterchillAI, npc_giant_infernal::npc_giant_infernalAI, npc_abomination::npc_abominationAI, npc_ghoul::npc_ghoulAI, npc_necromancer::npc_necromancerAI, npc_banshee::npc_bansheeAI, npc_crypt_fiend::npc_crypt_fiendAI, npc_fel_stalker::npc_fel_stalkerAI, npc_frost_wyrm::npc_frost_wyrmAI, npc_gargoyle::npc_gargoyleAI, hyjalAI, npc_thrall_old_hillsbrad, npc_taretha, npc_willix::npc_willixAI, npc_disciple_of_naralex::npc_disciple_of_naralexAI, npc_ruul_snowhoof::npc_ruul_snowhoofAI, npc_muglash::npc_muglashAI, npc_magwin::npc_magwinAI, npc_demolitionist_legoso::npc_demolitionist_legosoAI, npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, npc_argent_soldier::npc_argent_soldierAI, generic_vehicleAI_toc5::generic_vehicleAI_toc5AI, npc_crok_scourgebane, npc_brann_hos, violet_hold_trashAI, npc_emily, npc_engineer_helice, npc_maghar_captive::npc_maghar_captiveAI, npc_kurenai_captive::npc_kurenai_captiveAI, npc_earthmender_wilda::npc_earthmender_wildaAI, and npc_7th_legion_magus_sanctum_of_the_sages.

Definition at line 215 of file CreatureAI.h.

215{ }

◆ WaypointStarted()

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

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

Reimplemented in npc_wizzlecrank_shredder::npc_wizzlecrank_shredderAI, npc_sanitron_5000, and npc_crok_scourgebane.

Definition at line 214 of file CreatureAI.h.

214{ }

Member Data Documentation

◆ _boundary

CreatureBoundary const* CreatureAI::_boundary
protected

Definition at line 249 of file CreatureAI.h.

◆ _isEngaged

bool CreatureAI::_isEngaged
private

Definition at line 256 of file CreatureAI.h.

◆ _moveInLOSLocked

bool CreatureAI::_moveInLOSLocked
private

Definition at line 257 of file CreatureAI.h.

◆ _negateBoundary

bool CreatureAI::_negateBoundary
protected

Definition at line 250 of file CreatureAI.h.

◆ _scriptId

uint32 const CreatureAI::_scriptId
private

Definition at line 255 of file CreatureAI.h.

◆ me

Creature* const CreatureAI::me
protected

Definition at line 61 of file CreatureAI.h.


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