AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
NullCreatureAI Class Reference

#include "PassiveAI.h"

Inheritance diagram for NullCreatureAI:
CreatureAI UnitAI TriggerAI boss_flame_leviathan_overload_device::boss_flame_leviathan_overload_deviceAI boss_flame_leviathan_safety_container::boss_flame_leviathan_safety_containerAI boss_freya_healthy_spore::boss_freya_healthy_sporeAI boss_freya_iron_root::boss_freya_iron_rootAI boss_freya_lifebinder::boss_freya_lifebinderAI boss_freya_nature_bomb::boss_freya_nature_bombAI boss_grobbulus_poison_cloud::boss_grobbulus_poison_cloudAI boss_krick::boss_krickAI boss_maexxna_webwrap::boss_maexxna_webwrapAI boss_naxxramas_misc::boss_naxxramas_miscAI boss_thorim_pillar::boss_thorim_pillarAI boss_thorim_trap::boss_thorim_trapAI boss_yoggsaron_brain::boss_yoggsaron_brainAI boss_yoggsaron_death_orb::boss_yoggsaron_death_orbAI boss_yoggsaron_influence_tentacle::boss_yoggsaron_influence_tentacleAI boss_yoggsaron_keeper::boss_yoggsaron_keeperAI boss_yoggsaron_lich_king::boss_yoggsaron_lich_kingAI boss_yoggsaron_llane::boss_yoggsaron_llaneAI boss_yoggsaron_voice::boss_yoggsaron_voiceAI npc_algalon_worm_hole::npc_algalon_worm_holeAI npc_arthas_teleport_visual::npc_arthas_teleport_visualAI npc_attracted_reef_bull::npc_attracted_reef_bullAI npc_balance_of_light_and_shadow::npc_balance_of_light_and_shadowAI npc_bone_spike::npc_bone_spikeAI npc_brann_radio::npc_brann_radioAI npc_brew_bubble npc_captured_rageclaw::npc_captured_rageclawAI npc_coldflame::npc_coldflameAI npc_collapsing_star::npc_collapsing_starAI npc_concentrated_ball::npc_concentrated_ballAI npc_crate_helper::npc_crate_helperAI npc_creature_generator_akama::npc_creature_generator_akamaAI npc_crystal_spike::npc_crystal_spikeAI npc_demonic_vapor::npc_demonic_vaporAI npc_demonic_vapor_trail::npc_demonic_vapor_trailAI npc_drakuru_shackles::npc_drakuru_shacklesAI npc_feedin_da_goolz::npc_feedin_da_goolzAI npc_fos_corrupted_soul_fragment::npc_fos_corrupted_soul_fragmentAI npc_four_car_garage::npc_four_car_garageAI npc_freya_ward::npc_freya_wardAI npc_frost_freeze_trap::npc_frost_freeze_trapAI npc_frost_sphere::npc_frost_sphereAI npc_frost_tomb::npc_frost_tombAI npc_frozen_orb_stalker::npc_frozen_orb_stalkerAI npc_grand_magister_rommath::npc_grand_magister_rommathAI npc_gunship::npc_gunshipAI npc_halion_controller::npc_halion_controllerAI npc_hallows_end_train_fire npc_hodirs_fury::npc_hodirs_furyAI npc_hor_leader::npc_hor_leaderAI npc_hor_leader_second::npc_hor_leader_secondAI npc_hor_lich_king::npc_hor_lich_kingAI npc_icc_gauntlet_controller::npc_icc_gauntlet_controllerAI npc_icc_putricades_trap::npc_icc_putricades_trapAI npc_ice_tomb::npc_ice_tombAI npc_idol_room_spawner::npc_idol_room_spawnerAI npc_impaling_spear::npc_impaling_spearAI npc_infra_green_bomber_generic::npc_infra_green_bomber_genericAI npc_injured_7th_legion_soldier::npc_injured_7th_legion_soldierAI npc_invisible_tractor_beam_source npc_kalecgos_kj::npc_kalecgos_kjAI npc_kiljaeden_controller::npc_kiljaeden_controllerAI npc_kinetic_bomb::npc_kinetic_bombAI npc_lk_spirit_bomb::npc_lk_spirit_bombAI npc_love_in_air_snivel npc_madrigosa::npc_madrigosaAI npc_mechanolift::npc_mechanoliftAI npc_nerubar_victim::npc_nerubar_victimAI npc_orb_carrier::npc_orb_carrierAI npc_pet_darting_hatchling npc_pet_dk_dancing_rune_weapon::npc_pet_dk_dancing_rune_weaponAI npc_pet_gen_fetch_ball npc_pet_gen_imp_in_a_bottle npc_pet_gen_moth npc_pet_gen_target_following_bomb npc_pet_gen_wind_rider_cub npc_pilgrims_bounty_plate npc_pool_of_tar::npc_pool_of_tarAI npc_pos_after_first_boss::npc_pos_after_first_bossAI npc_pos_collapsing_icicle::npc_pos_collapsing_icicleAI npc_pos_icicle_trigger::npc_pos_icicle_triggerAI npc_pos_leader::npc_pos_leaderAI npc_pos_leader_second::npc_pos_leader_secondAI npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI npc_pos_tyrannus_events::npc_pos_tyrannus_eventsAI npc_power_spark::npc_power_sparkAI npc_preparations_for_war_vehicle npc_q24545_lich_king::npc_q24545_lich_kingAI npc_q24545_vegard_dummy::npc_q24545_vegard_dummyAI npc_ravenclaw_apparition::npc_ravenclaw_apparitionAI npc_ritual_channeler::npc_ritual_channelerAI npc_singularity::npc_singularityAI npc_sinkhole_kill_credit::npc_sinkhole_kill_creditAI npc_soh_fire_trigger npc_spiritual_insight::npc_spiritual_insightAI npc_still_at_it_trigger::npc_still_at_it_triggerAI npc_storm_beacon_spawn::npc_storm_beacon_spawnAI npc_strangulate_vehicle::npc_strangulate_vehicleAI npc_taldaram_flamesphere npc_thorims_hammer::npc_thorims_hammerAI npc_time_rift npc_toc5_player_vehicle::npc_toc5_player_vehicleAI npc_ulduar_bot_summon_trigger::npc_ulduar_bot_summon_triggerAI npc_ulduar_expedition_commander::npc_ulduar_expedition_commanderAI npc_ulduar_expedition_engineer::npc_ulduar_expedition_engineerAI npc_ulduar_flames_initial::npc_ulduar_flames_initialAI npc_ulduar_flames_spread::npc_ulduar_flames_spreadAI npc_ulduar_flash_freeze::npc_ulduar_flash_freezeAI npc_ulduar_harpoonfirestate::npc_ulduar_harpoonfirestateAI npc_ulduar_icicle::npc_ulduar_icicleAI npc_ulduar_magnetic_core::npc_ulduar_magnetic_coreAI npc_ulduar_mimiron_rocket::npc_ulduar_mimiron_rocketAI npc_ulduar_rocket_strike_trigger::npc_ulduar_rocket_strike_triggerAI npc_ulduar_saronite_vapors::npc_ulduar_saronite_vaporsAI npc_ulduar_toasty_fire::npc_ulduar_toasty_fireAI npc_valithria_portal::npc_valithria_portalAI npc_valkyr_shadowguard::npc_valkyr_shadowguardAI npc_vh_teleportation_portal::npc_vh_teleportation_portalAI npc_vh_void_sentry::npc_vh_void_sentryAI npc_zafod_boombox::npc_zafod_boomboxAI trigger_death::trigger_deathAI trigger_periodic::trigger_periodicAI

Public Member Functions

 NullCreatureAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void UpdateAI (uint32) override
 
void EnterEvadeMode (EvadeReason) override
 
void OnCharmed (bool) override
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
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 SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
- 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)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=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 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 
virtual void sGossipHello (Player *)
 
virtual void sGossipSelect (Player *, uint32, uint32)
 
virtual void sGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void sQuestAccept (Player *, Quest const *)
 
virtual void sQuestSelect (Player *, Quest const *)
 
virtual void sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Static Public Member Functions

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

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
bool UpdateVictimWithGaze ()
 
void SetGazeOn (Unit *target)
 
CreatureDoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ NullCreatureAI()

NullCreatureAI::NullCreatureAI ( Creature c)
explicit
@ REACT_PASSIVE
Definition: Unit.h:1035
Definition: CreatureAI.h:70
Creature *const me
Definition: CreatureAI.h:72
void SetReactState(ReactStates st)
Definition: Creature.h:89

References CreatureAI::me, REACT_PASSIVE, and Creature::SetReactState().

Member Function Documentation

◆ AttackStart()

void NullCreatureAI::AttackStart ( Unit )
inlineoverridevirtual

◆ EnterEvadeMode()

void NullCreatureAI::EnterEvadeMode ( EvadeReason  )
inlineoverridevirtual

Reimplemented from CreatureAI.

60{}

◆ MoveInLineOfSight()

◆ OnCharmed()

void NullCreatureAI::OnCharmed ( bool  )
inlineoverridevirtual

◆ Permissible()

int32 NullCreatureAI::Permissible ( Creature const *  creature)
static
27{
28 if (creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK))
29 return PERMIT_BASE_PROACTIVE + 50;
30
31 if (creature->IsTrigger())
33
34 return PERMIT_BASE_IDLE;
35}
@ PERMIT_BASE_PROACTIVE
Definition: CreatureAI.h:236
@ PERMIT_BASE_IDLE
Definition: CreatureAI.h:234
@ UNIT_NPC_FLAGS
Definition: UpdateFields.h:139
@ UNIT_NPC_FLAG_SPELLCLICK
Definition: Unit.h:540

References Object::HasFlag(), Creature::IsTrigger(), PERMIT_BASE_IDLE, PERMIT_BASE_PROACTIVE, UNIT_NPC_FLAG_SPELLCLICK, and UNIT_NPC_FLAGS.

◆ UpdateAI()

void NullCreatureAI::UpdateAI ( uint32  )
inlineoverridevirtual

Implements UnitAI.

Reimplemented in npc_madrigosa::npc_madrigosaAI, npc_demonic_vapor_trail::npc_demonic_vapor_trailAI, npc_kiljaeden_controller::npc_kiljaeden_controllerAI, npc_kalecgos_kj::npc_kalecgos_kjAI, npc_singularity::npc_singularityAI, npc_balance_of_light_and_shadow::npc_balance_of_light_and_shadowAI, npc_grand_magister_rommath::npc_grand_magister_rommathAI, npc_ravenclaw_apparition::npc_ravenclaw_apparitionAI, npc_brew_bubble, npc_hallows_end_train_fire, npc_love_in_air_snivel, npc_time_rift, npc_taldaram_flamesphere, npc_halion_controller::npc_halion_controllerAI, npc_toc5_player_vehicle::npc_toc5_player_vehicleAI, npc_frost_sphere::npc_frost_sphereAI, npc_fos_corrupted_soul_fragment::npc_fos_corrupted_soul_fragmentAI, npc_hor_leader::npc_hor_leaderAI, npc_hor_lich_king::npc_hor_lich_kingAI, npc_hor_leader_second::npc_hor_leader_secondAI, boss_krick::boss_krickAI, npc_pos_leader::npc_pos_leaderAI, npc_pos_after_first_boss::npc_pos_after_first_bossAI, npc_pos_tyrannus_events::npc_pos_tyrannus_eventsAI, npc_pos_icicle_trigger::npc_pos_icicle_triggerAI, npc_pos_collapsing_icicle::npc_pos_collapsing_icicleAI, npc_pos_martin_or_gorkun_second::npc_pos_martin_or_gorkun_secondAI, npc_pos_leader_second::npc_pos_leader_secondAI, npc_kinetic_bomb::npc_kinetic_bombAI, npc_coldflame::npc_coldflameAI, npc_bone_spike::npc_bone_spikeAI, npc_ice_tomb::npc_ice_tombAI, npc_valkyr_shadowguard::npc_valkyr_shadowguardAI, npc_strangulate_vehicle::npc_strangulate_vehicleAI, npc_lk_spirit_bomb::npc_lk_spirit_bombAI, npc_frost_freeze_trap::npc_frost_freeze_trapAI, npc_impaling_spear::npc_impaling_spearAI, npc_arthas_teleport_visual::npc_arthas_teleport_visualAI, npc_icc_gauntlet_controller::npc_icc_gauntlet_controllerAI, npc_icc_putricades_trap::npc_icc_putricades_trapAI, boss_grobbulus_poison_cloud::boss_grobbulus_poison_cloudAI, boss_naxxramas_misc::boss_naxxramas_miscAI, npc_power_spark::npc_power_sparkAI, npc_crystal_spike::npc_crystal_spikeAI, npc_algalon_worm_hole::npc_algalon_worm_holeAI, npc_freya_ward::npc_freya_wardAI, npc_hodirs_fury::npc_hodirs_furyAI, npc_thorims_hammer::npc_thorims_hammerAI, npc_storm_beacon_spawn::npc_storm_beacon_spawnAI, boss_flame_leviathan_safety_container::boss_flame_leviathan_safety_containerAI, npc_mechanolift::npc_mechanoliftAI, boss_freya_lifebinder::boss_freya_lifebinderAI, boss_freya_healthy_spore::boss_freya_healthy_sporeAI, boss_freya_nature_bomb::boss_freya_nature_bombAI, npc_ulduar_icicle::npc_ulduar_icicleAI, npc_ulduar_flash_freeze::npc_ulduar_flash_freezeAI, npc_ulduar_magnetic_core::npc_ulduar_magnetic_coreAI, npc_ulduar_bot_summon_trigger::npc_ulduar_bot_summon_triggerAI, npc_ulduar_flames_initial::npc_ulduar_flames_initialAI, npc_ulduar_expedition_engineer::npc_ulduar_expedition_engineerAI, boss_thorim_trap::boss_thorim_trapAI, boss_thorim_pillar::boss_thorim_pillarAI, boss_yoggsaron_brain::boss_yoggsaron_brainAI, boss_yoggsaron_death_orb::boss_yoggsaron_death_orbAI, boss_yoggsaron_keeper::boss_yoggsaron_keeperAI, boss_yoggsaron_lich_king::boss_yoggsaron_lich_kingAI, boss_yoggsaron_llane::boss_yoggsaron_llaneAI, boss_yoggsaron_voice::boss_yoggsaron_voiceAI, npc_vh_void_sentry::npc_vh_void_sentryAI, npc_vh_teleportation_portal::npc_vh_teleportation_portalAI, npc_sinkhole_kill_credit::npc_sinkhole_kill_creditAI, npc_preparations_for_war_vehicle, npc_q24545_lich_king::npc_q24545_lich_kingAI, npc_infra_green_bomber_generic::npc_infra_green_bomber_genericAI, npc_still_at_it_trigger::npc_still_at_it_triggerAI, npc_feedin_da_goolz::npc_feedin_da_goolzAI, npc_drakuru_shackles::npc_drakuru_shacklesAI, npc_creature_generator_akama::npc_creature_generator_akamaAI, npc_pet_gen_target_following_bomb, npc_pet_gen_imp_in_a_bottle, npc_pet_gen_wind_rider_cub, npc_pet_gen_fetch_ball, npc_pet_darting_hatchling, trigger_periodic::trigger_periodicAI, npc_demonic_vapor::npc_demonic_vaporAI, npc_orb_carrier::npc_orb_carrierAI, npc_concentrated_ball::npc_concentrated_ballAI, npc_ulduar_mimiron_rocket::npc_ulduar_mimiron_rocketAI, npc_frost_tomb::npc_frost_tombAI, and npc_q24545_vegard_dummy::npc_q24545_vegard_dummyAI.

59{}