AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
npc_wild_wyrm Struct Reference
Inheritance diagram for npc_wild_wyrm:
VehicleAI CreatureAI UnitAI

Public Member Functions

 npc_wild_wyrm (Creature *creature)
 
void InitSpellsForPhase ()
 
void Reset () override
 
void DoAction (int32 action) override
 
void SpellHit (Unit *caster, SpellInfo const *spellInfo) override
 
void MovementInform (uint32 type, uint32 id) override
 
void DamageTaken (Unit *, uint32 &damage, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void PassengerBoarded (Unit *passenger, int8 seatId, bool apply) override
 == Fields =======================================
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
- Public Member Functions inherited from VehicleAI
 VehicleAI (Creature *creature)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 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 SummonedCreatureEvade (Creature *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void OnSpellCastFinished (SpellInfo const *, SpellFinishReason)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
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 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 ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
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 *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
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 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)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
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.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
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)
 To specify the caster as target if the spell is self-cast.
 
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, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not 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)
 Called when a summon reaches a waypoint or point movement finished.
 
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
 

Private Attributes

uint8 _phase {PHASE_INITIAL}
 
ObjectGuid _playerGuid
 

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 Member Functions inherited from VehicleAI
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 ()
 
- 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)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ npc_wild_wyrm()

npc_wild_wyrm::npc_wild_wyrm ( Creature creature)
inlineexplicit
905: VehicleAI(creature) { }
Definition CombatAI.h:99

Member Function Documentation

◆ DamageTaken()

void npc_wild_wyrm::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from UnitAI.

993 {
994 if (damage >= me->GetHealth())
995 {
996 damage = me->GetHealth() - 1;
997
998 if (_phase == PHASE_DEAD)
999 return;
1000
1002 scheduler.CancelAll().Async([this]
1003 {
1005
1007 player->VehicleSpellInitialize();
1008
1011
1014
1016
1018 });
1019 }
1020 }
@ UNIT_NPC_FLAG_NONE
Definition UnitDefines.h:318
TaskScheduler scheduler
Definition CreatureAI.h:76
Creature *const me
Definition CreatureAI.h:73
void MoveFall(uint32 id=0, bool addFlagForNPC=false)
The unit will fall. Used when in the air. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:676
Definition Player.h:1066
TaskScheduler & CancelAll()
Definition TaskScheduler.cpp:45
TaskScheduler & Async(std::function< void()> const &callable)
Definition TaskScheduler.cpp:39
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:284
MotionMaster * GetMotionMaster()
Definition Unit.h:1738
uint32 GetHealth() const
Definition Unit.h:1093
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5032
void ReplaceAllNpcFlags(NPCFlags flags)
Definition Unit.h:756
Player * GetPlayer(Map const *, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:220
uint8 _phase
Definition zone_storm_peaks.cpp:1089
void InitSpellsForPhase()
Definition zone_storm_peaks.cpp:907
ObjectGuid _playerGuid
Definition zone_storm_peaks.cpp:1090
@ PHASE_DEAD
Definition zone_storm_peaks.cpp:891
@ SPELL_JAWS_OF_DEATH_PERIODIC
Definition zone_storm_peaks.cpp:863
@ SPELL_FALLING_DRAGON_FEIGN_DEATH
Definition zone_storm_peaks.cpp:868
@ SPELL_WYRM_KILL_CREDIT
Definition zone_storm_peaks.cpp:867
@ POINT_FALL
Definition zone_storm_peaks.cpp:884
@ SPELL_PRY_JAWS_OPEN
Definition zone_storm_peaks.cpp:860

References _phase, _playerGuid, TaskScheduler::Async(), TaskScheduler::CancelAll(), UnitAI::DoCastAOE(), Unit::GetHealth(), Unit::GetMotionMaster(), ObjectAccessor::GetPlayer(), InitSpellsForPhase(), CreatureAI::me, MotionMaster::MoveFall(), PHASE_DEAD, POINT_FALL, Unit::RemoveAurasDueToSpell(), Unit::ReplaceAllNpcFlags(), CreatureAI::scheduler, SPELL_FALLING_DRAGON_FEIGN_DEATH, SPELL_JAWS_OF_DEATH_PERIODIC, SPELL_PRY_JAWS_OPEN, SPELL_WYRM_KILL_CREDIT, and UNIT_NPC_FLAG_NONE.

◆ DoAction()

void npc_wild_wyrm::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

927 {
929 if (!player)
930 return;
931
932 switch (action)
933 {
935 Talk(SAY_SWIPE, player);
936 break;
938 Talk(SAY_DODGED, player);
939 break;
941 Talk(SAY_GRIP_WARN, player);
942 break;
943 case ACTION_GRIP_LOST:
945 break;
947 Talk(SAY_STRIKE_MISS, player);
948 break;
949 default:
950 break;
951 }
952 }
Talk
Definition hyjal.cpp:82
@ SAY_DODGED
Definition zone_storm_peaks.cpp:872
@ SPELL_EJECT_PASSENGER_1
Definition zone_storm_peaks.cpp:859
@ SAY_STRIKE_MISS
Definition zone_storm_peaks.cpp:875
@ ACTION_GRIP_FAILING
Definition zone_storm_peaks.cpp:879
@ ACTION_FATAL_STRIKE_MISS
Definition zone_storm_peaks.cpp:881
@ ACTION_GRIP_LOST
Definition zone_storm_peaks.cpp:880
@ ACTION_CLAW_SWIPE_DODGE
Definition zone_storm_peaks.cpp:878
@ SAY_GRIP_WARN
Definition zone_storm_peaks.cpp:874
@ ACTION_CLAW_SWIPE_WARN
Definition zone_storm_peaks.cpp:877
@ SAY_SWIPE
Definition zone_storm_peaks.cpp:871

References _playerGuid, ACTION_CLAW_SWIPE_DODGE, ACTION_CLAW_SWIPE_WARN, ACTION_FATAL_STRIKE_MISS, ACTION_GRIP_FAILING, ACTION_GRIP_LOST, UnitAI::DoCastAOE(), ObjectAccessor::GetPlayer(), CreatureAI::me, SAY_DODGED, SAY_GRIP_WARN, SAY_STRIKE_MISS, SAY_SWIPE, and SPELL_EJECT_PASSENGER_1.

◆ InitSpellsForPhase()

void npc_wild_wyrm::InitSpellsForPhase ( )
inline
908 {
910 for (uint8 i = 0; i < ControllableSpellsCount; ++i)
912 }
std::uint8_t uint8
Definition Define.h:109
#define ASSERT
Definition Errors.h:68
uint32 m_spells[MAX_CREATURE_SPELLS]
Definition Creature.h:252
constexpr uint8 ControllableSpellsCount
Definition zone_storm_peaks.cpp:895
@ PHASE_MAX
Definition zone_storm_peaks.cpp:892
constexpr uint32 WyrmControlSpells[PHASE_MAX][ControllableSpellsCount]
Definition zone_storm_peaks.cpp:896

References _phase, ASSERT, ControllableSpellsCount, Creature::m_spells, CreatureAI::me, PHASE_MAX, and WyrmControlSpells.

Referenced by DamageTaken(), PassengerBoarded(), and Reset().

◆ MovementInform()

void npc_wild_wyrm::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

967 {
968 if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
969 return;
970
971 switch (id)
972 {
974 {
976 if (!player)
977 return;
978
981 break;
982 }
983 case POINT_FALL:
985 me->KillSelf();
986 break;
987 default:
988 break;
989 }
990 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ EFFECT_MOTION_TYPE
Definition MotionMaster.h:56
void Clear(bool reset=true)
Definition MotionMaster.h:192
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
void KillSelf(bool durabilityLoss=true, WeaponAttackType attackType=BASE_ATTACK, SpellInfo const *spellProto=nullptr, Spell const *spell=nullptr)
Definition Unit.h:1219
@ POINT_START_FIGHT
Definition zone_storm_peaks.cpp:883
@ SPELL_PLAYER_MOUNT_WYRM
Definition zone_storm_peaks.cpp:845
@ SPELL_EJECT_ALL_PASSENGERS
Definition zone_storm_peaks.cpp:869

References _playerGuid, MotionMaster::Clear(), UnitAI::DoCast(), UnitAI::DoCastAOE(), EFFECT_MOTION_TYPE, Unit::GetMotionMaster(), ObjectAccessor::GetPlayer(), Unit::KillSelf(), CreatureAI::me, POINT_FALL, POINT_MOTION_TYPE, POINT_START_FIGHT, SPELL_EJECT_ALL_PASSENGERS, and SPELL_PLAYER_MOUNT_WYRM.

◆ PassengerBoarded()

void npc_wild_wyrm::PassengerBoarded ( Unit ,
int8  ,
bool   
)
inlineoverridevirtual

== Fields =======================================

Reimplemented from CreatureAI.

1023 {
1024 if (!apply)
1025 {
1026 // The player is automatically moved from SEAT_INITIAL to SEAT_MOUTH during phase transition.
1027 // Only evade if player exits during the respective active phase.
1028 bool initialPhaseExit = (seatId == SEAT_INITIAL && _phase == PHASE_INITIAL);
1029 bool mouthPhaseExit = (seatId == SEAT_MOUTH && _phase == PHASE_MOUTH);
1030 if (initialPhaseExit || mouthPhaseExit)
1032 return;
1033 }
1034
1035 if (passenger->GetGUID() != _playerGuid)
1036 return;
1037
1038 if (seatId == SEAT_INITIAL)
1039 {
1042
1043 scheduler.Async([this]
1044 {
1045 me->GetMotionMaster()->MoveWaypoint(me->GetWaypointPath(), true);
1046 }).Schedule(500ms, [this](TaskContext context)
1047 {
1048 if (_phase == PHASE_MOUTH)
1049 return;
1050
1051 if (me->HealthBelowPct(25))
1052 {
1054 context.Async([this]
1055 {
1060
1062 Talk(SAY_PHASE_2, player);
1063
1067 });
1068 return;
1069 }
1070
1071 context.Repeat();
1072 });
1073 }
1074 }
@ SPELLVALUE_AURA_STACK
Definition SpellDefines.h:118
@ EVADE_REASON_NO_HOSTILES
Definition CreatureAI.h:90
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:205
uint32 GetWaypointPath() const
Definition Creature.h:348
Definition TaskScheduler.h:421
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
Definition TaskScheduler.h:493
TaskContext & Async(std::function< void()> const &callable)
Definition TaskScheduler.cpp:253
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1251
bool HealthBelowPct(int32 pct) const
Definition Unit.h:1101
@ PHASE_INITIAL
Definition zone_storm_peaks.cpp:889
@ SEAT_INITIAL
Definition zone_storm_peaks.cpp:886
@ SPELL_FLY_STATE_VISUAL
Definition zone_storm_peaks.cpp:864
@ PHASE_MOUTH
Definition zone_storm_peaks.cpp:890
@ SAY_PHASE_2
Definition zone_storm_peaks.cpp:873
@ SPELL_GRIP
Definition zone_storm_peaks.cpp:848
@ SPELL_CLAW_SWIPE_PERIODIC
Definition zone_storm_peaks.cpp:853
@ SPELL_LOW_HEALTH_TRIGGER
Definition zone_storm_peaks.cpp:856
@ SEAT_MOUTH
Definition zone_storm_peaks.cpp:887

References _phase, _playerGuid, TaskScheduler::Async(), TaskContext::Async(), Unit::CastCustomSpell(), UnitAI::DoCastAOE(), CreatureAI::EnterEvadeMode(), CreatureAI::EVADE_REASON_NO_HOSTILES, Object::GetGUID(), Unit::GetMotionMaster(), ObjectAccessor::GetPlayer(), Creature::GetWaypointPath(), Unit::HealthBelowPct(), InitSpellsForPhase(), CreatureAI::me, PHASE_INITIAL, PHASE_MOUTH, Unit::RemoveAurasDueToSpell(), TaskContext::Repeat(), SAY_PHASE_2, CreatureAI::scheduler, SEAT_INITIAL, SEAT_MOUTH, SPELL_CLAW_SWIPE_PERIODIC, SPELL_EJECT_PASSENGER_1, SPELL_FLY_STATE_VISUAL, SPELL_GRIP, SPELL_JAWS_OF_DEATH_PERIODIC, SPELL_LOW_HEALTH_TRIGGER, and SPELLVALUE_AURA_STACK.

◆ Reset()

void npc_wild_wyrm::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

915 {
917
920
922
923 me->SetImmuneToPC(false);
924 }
void Clear()
Definition ObjectGuid.h:138
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition Unit.cpp:13772

References _phase, _playerGuid, TaskScheduler::CancelAll(), ObjectGuid::Clear(), InitSpellsForPhase(), CreatureAI::me, PHASE_INITIAL, CreatureAI::scheduler, and Unit::SetImmuneToPC().

◆ SpellHit()

void npc_wild_wyrm::SpellHit ( Unit caster,
SpellInfo const *  spellInfo 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

955 {
956 if (!_playerGuid.IsEmpty() || spellInfo->Id != SPELL_SPEAR_OF_HODIR)
957 return;
958
959 _playerGuid = caster->GetGUID();
961 me->SetImmuneToPC(true);
962
964 }
void MovePoint(uint32 id, const Position &pos, ForcedMovement forcedMovement=FORCED_MOVEMENT_NONE, float speed=0.f, bool generatePath=true, bool forceDestination=true, std::optional< AnimTier > animTier=std::nullopt)
Definition MotionMaster.h:238
bool IsEmpty() const
Definition ObjectGuid.h:161
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
@ SPELL_SPEAR_OF_HODIR
Definition zone_storm_peaks.cpp:847
@ SPELL_FULL_HEAL_MANA
Definition zone_storm_peaks.cpp:855

References _playerGuid, UnitAI::DoCastAOE(), Object::GetGUID(), Unit::GetMotionMaster(), SpellInfo::Id, ObjectGuid::IsEmpty(), CreatureAI::me, MotionMaster::MovePoint(), POINT_START_FIGHT, Unit::SetImmuneToPC(), SPELL_FULL_HEAL_MANA, and SPELL_SPEAR_OF_HODIR.

◆ UpdateAI()

void npc_wild_wyrm::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

1077 {
1078 if (!_playerGuid)
1079 {
1080 if (UpdateVictim())
1082 return;
1083 }
1084
1085 scheduler.Update(diff);
1086 }
bool UpdateVictim()
Definition CreatureAI.cpp:277
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Definition TaskScheduler.cpp:27
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39

References _playerGuid, UnitAI::DoMeleeAttackIfReady(), CreatureAI::scheduler, TaskScheduler::Update(), and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _phase

uint8 npc_wild_wyrm::_phase {PHASE_INITIAL}
private

◆ _playerGuid

ObjectGuid npc_wild_wyrm::_playerGuid
private

The documentation for this struct was generated from the following file: