All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boss_nazan::boss_nazanAI Struct Reference

Public Member Functions

 boss_nazanAI (Creature *creature)
void Initialize ()
void Reset () override
void EnterCombat (Unit *) override
void IsSummonedBy (Unit *summoner) override
void JustSummoned (Creature *summoned) override
void SpellHitTarget (Unit *target, const SpellInfo *entry) override
void UpdateAI (uint32 diff) override
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
virtual ~BossAI ()
void SummonedCreatureDespawn (Creature *summon) override
virtual void ExecuteEvent (uint32)
virtual void ScheduleTasks ()
void JustDied (Unit *) override
void JustReachedHome () override
bool CanAIAttack (Unit const *target) const override
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
virtual ~ScriptedAI ()
void AttackStartNoMove (Unit *target)
void DamageTaken (Unit *, uint32 &) override
void KilledUnit (Unit *) override
void SpellHit (Unit *, SpellInfo const *) override
void OnPossess (bool)
void AttackStart (Unit *) override
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
void DoStartNoMovement (Unit *target)
void DoStopAttack ()
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
void DoResetThreat ()
float DoGetThreat (Unit *unit)
void DoModifyThreatPercent (Unit *unit, int32 pct)
void DoTeleportTo (float x, float y, float z, uint32 time=0)
void DoTeleportTo (float const pos[4])
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
void DoTeleportAll (float x, float y, float z, float o)
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
std::list< Creature * > DoFindFriendlyCC (float range)
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
PlayerGetPlayerAtMinimumRange (float minRange)
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
bool HealthBelowPct (uint32 pct) const
bool HealthAbovePct (uint32 pct) const
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, float rangeMin, float rangeMax, SelectEffect effect)
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
void SetCombatMovement (bool allowMovement)
bool IsCombatMovementAllowed () const
bool IsHeroic () const
Difficulty GetDifficulty () const
bool Is25ManRaid () const
template<class T >
const T & DUNGEON_MODE (const T &normal5, const T &heroic10) const
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25) const
template<class T >
const T & RAID_MODE (const T &normal10, const T &normal25, const T &heroic10, const T &heroic25) const
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 CreatureAI (Creature *creature)
virtual ~CreatureAI ()
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
void TriggerAlert (Unit const *who) const
virtual bool CanRespawn ()
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
virtual void SummonedCreatureDies (Creature *, Unit *)
virtual void AttackedBy (Unit *)
virtual bool IsEscorted () const
virtual void JustRespawned ()
virtual void MovementInform (uint32, uint32)
void OnCharmed (bool apply) override
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
virtual void ReceiveEmote (Player *, uint32)
virtual void OwnerAttackedBy (Unit *)
virtual void OwnerAttacked (Unit *)
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
virtual void OnSpellClick (Unit *, bool &)
virtual bool CanSeeAlways (WorldObject const *)
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
virtual bool CheckInRoom ()
CreatureBoundary constGetBoundary () const
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
virtual ~UnitAI ()
virtual void InitializeAI ()
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 (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
virtual void HealReceived (Unit *, uint32 &)
virtual void HealDone (Unit *, uint32 &)
virtual void SpellInterrupted (uint32, uint32)
void AttackStartCaster (Unit *victim, float dist)
void DoCast (uint32 spellId)
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
void DoCastVictim (uint32 spellId, bool triggered=false)
void DoCastAOE (uint32 spellId, bool triggered=false)
void DoMeleeAttackIfReady ()
bool DoSpellAttackIfReady (uint32 spellId)
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 sQuestReward (Player *, Quest const *, uint32)
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
virtual void sOnGameEvent (bool, uint16)

Private Attributes

uint32 Fireball_Timer
uint32 ConeOfFire_Timer
uint32 BellowingRoar_Timer
uint32 Fly_Timer
uint32 Turn_Timer
bool flight
ObjectGuid VazrudenGUID

Additional Inherited Members

- Public Types inherited from CreatureAI
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
- Public Attributes inherited from BossAI
InstanceScript *const instance
- Public Attributes inherited from ScriptedAI
bool IsFleeing
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
- Protected Member Functions inherited from BossAI
void _Reset ()
void _EnterCombat ()
void _JustDied ()
void _JustReachedHome ()
void _DespawnAtEvade ()
void TeleportCheaters ()
- 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 CheckBoundary (Position const *who=nullptr) const
void SetBoundary (CreatureBoundary const *boundary)
virtual void MoveInLineOfSight (Unit *)
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
- Protected Attributes inherited from BossAI
EventMap events
SummonList summons
TaskScheduler scheduler
- Protected Attributes inherited from CreatureAI
Creature *const me
CreatureBoundary const_boundary
- Protected Attributes inherited from UnitAI
Unit *const me

Constructor & Destructor Documentation

boss_nazan::boss_nazanAI::boss_nazanAI ( Creature creature)
71  : BossAI(creature, DATA_NAZAN)
72  {
73  Initialize();
74  flight = true;
76  ConeOfFire_Timer = 0;
77  }
uint32 BellowingRoar_Timer
Definition: boss_vazruden_the_herald.cpp:190
Definition: hellfire_ramparts.h:31
bool flight
Definition: boss_vazruden_the_herald.cpp:193
uint32 ConeOfFire_Timer
Definition: boss_vazruden_the_herald.cpp:189
void Initialize()
Definition: boss_vazruden_the_herald.cpp:79
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

void boss_nazan::boss_nazanAI::EnterCombat ( Unit )

Reimplemented from BossAI.

92 { }
void boss_nazan::boss_nazanAI::Initialize ( void  )
80  {
81  Fireball_Timer = 4000;
82  Fly_Timer = 45000;
83  Turn_Timer = 0;
84  }
uint32 Fireball_Timer
Definition: boss_vazruden_the_herald.cpp:188
uint32 Fly_Timer
Definition: boss_vazruden_the_herald.cpp:191
uint32 Turn_Timer
Definition: boss_vazruden_the_herald.cpp:192

+ Here is the caller graph for this function:

void boss_nazan::boss_nazanAI::IsSummonedBy ( Unit summoner)

Reimplemented from CreatureAI.

95  {
96  if (summoner->GetEntry() == NPC_VAZRUDEN_HERALD)
97  VazrudenGUID = summoner->GetGUID();
98  }
Definition: hellfire_ramparts.h:37
ObjectGuid const & GetGUID() const
Definition: Object.h:105
ObjectGuid VazrudenGUID
Definition: boss_vazruden_the_herald.cpp:194
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

void boss_nazan::boss_nazanAI::JustSummoned ( Creature summoned)

Reimplemented from BossAI.

101  {
102  if (summoned && summoned->GetEntry() == NPC_LIQUID_FIRE)
103  {
104  summoned->SetLevel(me->getLevel());
105  summoned->setFaction(me->getFaction());
107  summoned->CastSpell(summoned, SPELL_FIRE_NOVA_VISUAL, true);
108  }
109  }
Definition: boss_vazruden_the_herald.cpp:47
Definition: boss_vazruden_the_herald.cpp:53
uint32 getFaction() const
Definition: Unit.h:1466
uint8 getLevel() const
Definition: Unit.h:1408
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
void SetLevel(uint8 lvl)
Definition: Unit.cpp:11523
Definition: boss_vazruden_the_herald.cpp:48
const T & DUNGEON_MODE(const T &normal5, const T &heroic10) const
Definition: ScriptedCreature.h:277
uint32 GetEntry() const
Definition: Object.h:107
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: hellfire_ramparts.h:40

+ Here is the call graph for this function:

void boss_nazan::boss_nazanAI::Reset ( )

Reimplemented from BossAI.

87  {
88  Initialize();
89  _Reset();
90  }
void _Reset()
Definition: ScriptedCreature.cpp:457
void Initialize()
Definition: boss_vazruden_the_herald.cpp:79

+ Here is the call graph for this function:

void boss_nazan::boss_nazanAI::SpellHitTarget ( Unit target,
const SpellInfo entry 

Reimplemented from ScriptedAI.

112  {
113  if (target && entry->Id == uint32(SPELL_FIREBALL))
115  }
uint32 Id
Definition: SpellInfo.h:329
Definition: boss_vazruden_the_herald.cpp:45
Creature *const me
Definition: CreatureAI.h:71
float GetOrientation() const
Definition: Position.h:107
float GetPositionY() const
Definition: Position.h:105
Definition: Object.h:56
float GetPositionZ() const
Definition: Position.h:106
uint32_t uint32
Definition: Define.h:150
float GetPositionX() const
Definition: Position.h:104
Definition: hellfire_ramparts.h:40
TempSummon * SummonCreature(uint32 id, Position const &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0) const
Definition: Object.cpp:2346

+ Here is the call graph for this function:

void boss_nazan::boss_nazanAI::UpdateAI ( uint32  diff)

Reimplemented from BossAI.

118  {
119  if (!UpdateVictim())
120  return;
122  if (Fireball_Timer <= diff)
123  {
124  if (Unit* victim = SelectTarget(SELECT_TARGET_RANDOM, 0))
125  DoCast(victim, SPELL_FIREBALL, true);
126  Fireball_Timer = urand(4000, 7000);
127  }
128  else
129  Fireball_Timer -= diff;
131  if (flight) // phase 1 - the flight
132  {
134  if (Fly_Timer < diff || !(Vazruden && Vazruden->IsAlive() && Vazruden->HealthAbovePct(20)))
135  {
136  flight = false;
137  BellowingRoar_Timer = 6000;
138  ConeOfFire_Timer = 12000;
139  me->SetDisableGravity(false);
140  me->SetWalk(true);
141  me->GetMotionMaster()->Clear();
142  if (Unit* victim = SelectTarget(SELECT_TARGET_NEAREST, 0))
143  AttackStart(victim);
145  Talk(EMOTE);
146  return;
147  }
148  else
149  Fly_Timer -= diff;
151  if (Turn_Timer <= diff)
152  {
153  uint32 waypoint = (Fly_Timer/10000)%2;
154  if (!me->IsWithinDist3d(VazrudenRing[waypoint][0], VazrudenRing[waypoint][1], VazrudenRing[waypoint][2], 5))
155  me->GetMotionMaster()->MovePoint(0, VazrudenRing[waypoint][0], VazrudenRing[waypoint][1], VazrudenRing[waypoint][2]);
156  Turn_Timer = 10000;
157  }
158  else
159  Turn_Timer -= diff;
160  }
161  else // phase 2 - land fight
162  {
163  if (ConeOfFire_Timer <= diff)
164  {
166  ConeOfFire_Timer = 12000;
167  Fireball_Timer = 4000;
168  }
169  else
170  ConeOfFire_Timer -= diff;
172  if (IsHeroic())
173  {
174  if (BellowingRoar_Timer <= diff)
175  {
177  BellowingRoar_Timer = 45000;
178  }
179  else
180  BellowingRoar_Timer -= diff;
181  }
184  }
185  }
Definition: boss_vazruden_the_herald.cpp:46
bool UpdateVictim()
Definition: CreatureAI.cpp:233
void Clear(bool reset=true)
Definition: MotionMaster.h:138
uint32 Fireball_Timer
Definition: boss_vazruden_the_herald.cpp:188
Definition: boss_vazruden_the_herald.cpp:45
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
uint32 BellowingRoar_Timer
Definition: boss_vazruden_the_herald.cpp:190
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: Creature.h:467
bool SetDisableGravity(bool disable, bool packetOnly=false)
Definition: Unit.cpp:15818
uint32 Fly_Timer
Definition: boss_vazruden_the_herald.cpp:191
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: boss_vazruden_the_herald.cpp:49
uint32 Turn_Timer
Definition: boss_vazruden_the_herald.cpp:192
Definition: UnitAI.h:35
bool IsAlive() const
Definition: Unit.h:1692
Unit * GetVictim() const
Definition: Unit.h:1379
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
uint32_t uint32
Definition: Define.h:150
bool flight
Definition: boss_vazruden_the_herald.cpp:193
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
bool IsWithinDist3d(float x, float y, float z, float dist) const
Definition: Object.cpp:1638
uint32 ConeOfFire_Timer
Definition: boss_vazruden_the_herald.cpp:189
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
const float VazrudenRing[2][3]
Definition: boss_vazruden_the_herald.cpp:58
bool HealthAbovePct(int32 pct) const
Definition: Unit.h:1432
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
ObjectGuid VazrudenGUID
Definition: boss_vazruden_the_herald.cpp:194
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:134
Definition: Unit.h:1305
Definition: boss_vazruden_the_herald.cpp:40
Definition: UnitAI.h:38
static float waypoint[6][3]
Definition: boss_alar.cpp:50

+ Here is the call graph for this function:

Member Data Documentation

uint32 boss_nazan::boss_nazanAI::BellowingRoar_Timer
uint32 boss_nazan::boss_nazanAI::ConeOfFire_Timer
uint32 boss_nazan::boss_nazanAI::Fireball_Timer
bool boss_nazan::boss_nazanAI::flight
uint32 boss_nazan::boss_nazanAI::Fly_Timer
uint32 boss_nazan::boss_nazanAI::Turn_Timer
ObjectGuid boss_nazan::boss_nazanAI::VazrudenGUID

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