AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_pyroguard_emberseer::boss_pyroguard_emberseerAI Struct Reference
Inheritance diagram for boss_pyroguard_emberseer::boss_pyroguard_emberseerAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_pyroguard_emberseerAI (Creature *creature)
 
void Reset () override
 
void SetData (uint32, uint32 data) override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
void SpellHit (Unit *, SpellInfo const *spell) override
 
void OpenDoors (bool Boss_Killed)
 
void UpdateRunes (GOState state)
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 
void UpdateAI (uint32 diff) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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 DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
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 const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, 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
 
virtual bool CheckEvadeIfOutOfCombatArea () 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
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
- 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
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- 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 CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
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)
 
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
 
EventMap events
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_pyroguard_emberseerAI()

boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::boss_pyroguard_emberseerAI ( Creature creature)
inline
78: BossAI(creature, DATA_PYROGAURD_EMBERSEER) { }
@ DATA_PYROGAURD_EMBERSEER
Definition: blackrock_spire.h:40
Definition: ScriptedCreature.h:456

Member Function Documentation

◆ JustDied()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

132 {
133 // Activate all the runes
135 // Opens all 3 doors
136 OpenDoors(true);
137 // Complete encounter
139 }
@ GO_STATE_READY
Definition: GameObjectData.h:691
@ DONE
Definition: InstanceScript.h:59
InstanceScript *const instance
Definition: ScriptedCreature.h:461
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:317
void OpenDoors(bool Boss_Killed)
Definition: boss_pyroguard_emberseer.cpp:168
void UpdateRunes(GOState state)
Definition: boss_pyroguard_emberseer.cpp:182

References DATA_PYROGAURD_EMBERSEER, DONE, GO_STATE_READY, BossAI::instance, OpenDoors(), InstanceScript::SetBossState(), and UpdateRunes().

◆ JustEngagedWith()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

124 {
125 // ### TODO Check combat timing ###
126 events.ScheduleEvent(EVENT_FIRENOVA, 6s);
127 events.ScheduleEvent(EVENT_FLAMEBUFFET, 3s);
128 events.ScheduleEvent(EVENT_PYROBLAST, 14s);
129 }
@ EVENT_PYROBLAST
Definition: boss_pyroguard_emberseer.cpp:63
@ EVENT_FIRENOVA
Definition: boss_pyroguard_emberseer.cpp:61
@ EVENT_FLAMEBUFFET
Definition: boss_pyroguard_emberseer.cpp:62
events
Definition: boss_sartura.cpp:43

References EVENT_FIRENOVA, EVENT_FLAMEBUFFET, and EVENT_PYROBLAST.

◆ OpenDoors()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::OpenDoors ( bool  Boss_Killed)
inline
169 {
170 // These two doors reopen on reset or boss kill
172 door1->SetGoState(GO_STATE_ACTIVE);
174 door2->SetGoState(GO_STATE_ACTIVE);
175
176 // This door opens on boss kill
177 if (Boss_Killed)
179 door3->SetGoState(GO_STATE_ACTIVE);
180 }
@ GO_STATE_ACTIVE
Definition: GameObjectData.h:690
@ GO_EMBERSEER_IN
Definition: blackrock_spire.h:113
@ GO_EMBERSEER_OUT
Definition: blackrock_spire.h:115
@ GO_DOORS
Definition: blackrock_spire.h:114
Creature * me
Definition: ScriptedCreature.h:282
Definition: GameObject.h:122
Map * GetMap() const
Definition: Object.h:517
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94
GameObject * GetGameObject(ObjectGuid const guid)
Definition: Map.cpp:3298

References Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_DOORS, GO_EMBERSEER_IN, GO_EMBERSEER_OUT, GO_STATE_ACTIVE, BossAI::instance, and ScriptedAI::me.

Referenced by JustDied(), and Reset().

◆ Reset()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

81 {
83 me->SetImmuneToPC(true);
84 events.Reset();
85 // Apply auras on spawn and reset
86 // DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible
90 events.ScheduleEvent(EVENT_RESPAWN, 5s);
91 // Hack for missing trigger spell
92 events.ScheduleEvent(EVENT_FIRE_SHIELD, 3s);
93
94 // Open doors on reset
96 OpenDoors(false); // Opens 2 entrance doors
97 }
@ UNIT_FLAG_NOT_SELECTABLE
Definition: Unit.h:473
@ IN_PROGRESS
Definition: InstanceScript.h:57
@ SPELL_EMBERSEER_FULL_STRENGTH
Definition: boss_pyroguard_emberseer.cpp:41
@ SPELL_EMBERSEER_GROWING_TRIGGER
Definition: boss_pyroguard_emberseer.cpp:40
@ SPELL_EMBERSEER_GROWING
Definition: boss_pyroguard_emberseer.cpp:39
@ EVENT_RESPAWN
Definition: boss_pyroguard_emberseer.cpp:56
@ EVENT_FIRE_SHIELD
Definition: boss_pyroguard_emberseer.cpp:65
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4708
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1481
void SetImmuneToPC(bool apply, bool keepCombat=false)
Definition: Unit.cpp:13518
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:230

References DATA_PYROGAURD_EMBERSEER, EVENT_FIRE_SHIELD, EVENT_RESPAWN, InstanceScript::GetBossState(), IN_PROGRESS, BossAI::instance, ScriptedAI::me, OpenDoors(), Unit::RemoveAura(), Unit::SetImmuneToPC(), Unit::SetUnitFlag(), SPELL_EMBERSEER_FULL_STRENGTH, SPELL_EMBERSEER_GROWING, SPELL_EMBERSEER_GROWING_TRIGGER, and UNIT_FLAG_NOT_SELECTABLE.

Referenced by SetData().

◆ SetData()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::SetData ( uint32  ,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

100 {
101 switch (data)
102 {
103 case 1:
104 events.ScheduleEvent(EVENT_PLAYER_CHECK, 5s);
105 break;
106 case 2:
107 // Close these two doors on Blackhand Incarcerators aggro
109 if (door1->GetGoState() == GO_STATE_ACTIVE)
110 door1->SetGoState(GO_STATE_READY);
112 if (door2->GetGoState() == GO_STATE_ACTIVE)
113 door2->SetGoState(GO_STATE_READY);
114 break;
115 case 3:
116 Reset();
117 break;
118 default:
119 break;
120 }
121 }
@ EVENT_PLAYER_CHECK
Definition: boss_pyroguard_emberseer.cpp:67
void Reset() override
Definition: boss_pyroguard_emberseer.cpp:80

References EVENT_PLAYER_CHECK, Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_DOORS, GO_EMBERSEER_IN, GO_STATE_ACTIVE, GO_STATE_READY, BossAI::instance, ScriptedAI::me, and Reset().

◆ SpellHit()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::SpellHit ( Unit ,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

142 {
143 if (spell->Id == SPELL_ENCAGE_EMBERSEER)
144 {
147 }
148
149 if (spell->Id == SPELL_EMBERSEER_GROWING_TRIGGER)
150 {
153
155 {
162 me->SetImmuneToPC(false);
163 events.ScheduleEvent(EVENT_ENTER_COMBAT, 2s);
164 }
165 }
166 }
@ SPELL_FREEZE_ANIM
Definition: boss_pyroguard_emberseer.cpp:38
@ SPELL_ENCAGE_EMBERSEER
Definition: boss_pyroguard_emberseer.cpp:46
@ SPELL_ENCAGED_EMBERSEER
Definition: boss_pyroguard_emberseer.cpp:35
@ YELL_FREE_OF_BONDS
Definition: boss_pyroguard_emberseer.cpp:30
@ EMOTE_FREE_OF_BONDS
Definition: boss_pyroguard_emberseer.cpp:29
@ EMOTE_TEN_STACK
Definition: boss_pyroguard_emberseer.cpp:28
@ EVENT_ENTER_COMBAT
Definition: boss_pyroguard_emberseer.cpp:68
Talk
Definition: boss_fathomlord_karathress.cpp:23
uint32 GetAuraCount(uint32 spellId) const
Definition: Unit.cpp:5594
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1169
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482

References Unit::CastSpell(), EMOTE_FREE_OF_BONDS, EMOTE_TEN_STACK, EVENT_ENTER_COMBAT, Unit::GetAuraCount(), SpellInfo::Id, ScriptedAI::me, Unit::RemoveAura(), Unit::RemoveUnitFlag(), Unit::SetImmuneToPC(), SPELL_EMBERSEER_FULL_STRENGTH, SPELL_EMBERSEER_GROWING_TRIGGER, SPELL_ENCAGE_EMBERSEER, SPELL_ENCAGED_EMBERSEER, SPELL_FREEZE_ANIM, UNIT_FLAG_NOT_SELECTABLE, and YELL_FREE_OF_BONDS.

◆ UpdateAI()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

202 {
203 if (!UpdateVictim())
204 {
205 events.Update(diff);
206
207 while (uint32 eventId = events.ExecuteEvent())
208 {
209 switch (eventId)
210 {
211 case EVENT_RESPAWN:
212 {
213 // Respawn all Blackhand Incarcerators
214 std::list<Creature*> creatureList;
216 for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
217 if (Creature* creature = *itr)
218 {
219 if (!creature->IsAlive())
220 creature->Respawn();
221
222 creature->AI()->SetData(1, 2);
223 }
226 break;
227 }
229 {
230 // Set data on all Blackhand Incarcerators
231 std::list<Creature*> creatureList;
233 for (std::list<Creature*>::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr)
234 {
235 if (Creature* creature = *itr)
236 creature->AI()->SetData(1, 1);
237 }
238 events.ScheduleEvent(EVENT_PRE_FIGHT_2, 32s);
239 break;
240 }
245 break;
247 // #### Spell isn't doing any damage ??? ####
249 events.ScheduleEvent(EVENT_FIRE_SHIELD, 3s);
250 break;
252 {
253 // Check to see if all players in instance have aura SPELL_EMBERSEER_START before starting event
254 bool _hasAura = false;
255 Map::PlayerList const& players = me->GetMap()->GetPlayers();
256 for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
257 if (Player* player = itr->GetSource()->ToPlayer())
258 if (player->HasAura(SPELL_EMBERSEER_OBJECT_VISUAL))
259 _hasAura = true;
260
261 if (_hasAura)
262 {
263 events.ScheduleEvent(EVENT_PRE_FIGHT_1, 1s);
265 }
266 break;
267 }
270 break;
271 default:
272 break;
273 }
274 }
275 return;
276 }
277
278 events.Update(diff);
279
280 while (uint32 eventId = events.ExecuteEvent())
281 {
282 switch (eventId)
283 {
286 events.ScheduleEvent(EVENT_FIRE_SHIELD, 3s);
287 break;
288 case EVENT_FIRENOVA:
290 events.ScheduleEvent(EVENT_FIRENOVA, 6s);
291 break;
294 events.ScheduleEvent(EVENT_FLAMEBUFFET, 14s);
295 break;
296 case EVENT_PYROBLAST:
298 events.ScheduleEvent(EVENT_PYROBLAST, 15s);
299 break;
300 default:
301 break;
302 }
303 }
305 }
std::uint32_t uint32
Definition: Define.h:108
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:775
@ NOT_STARTED
Definition: InstanceScript.h:56
@ NPC_BLACKHAND_INCARCERATOR
Definition: blackrock_spire.h:79
@ SPELL_FIRE_SHIELD
Definition: boss_pyroguard_emberseer.cpp:37
@ SPELL_EMBERSEER_OBJECT_VISUAL
Definition: boss_pyroguard_emberseer.cpp:50
@ SPELL_FLAMEBUFFET
Definition: boss_pyroguard_emberseer.cpp:43
@ SPELL_FIRENOVA
Definition: boss_pyroguard_emberseer.cpp:42
@ SPELL_PYROBLAST
Definition: boss_pyroguard_emberseer.cpp:44
@ EMOTE_ONE_STACK
Definition: boss_pyroguard_emberseer.cpp:27
@ EVENT_PRE_FIGHT_1
Definition: boss_pyroguard_emberseer.cpp:58
@ EVENT_PRE_FIGHT_2
Definition: boss_pyroguard_emberseer.cpp:59
Definition: LinkedList.h:139
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
SpellCastResult DoCastRandomTarget(uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
Definition: UnitAI.cpp:257
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:178
bool UpdateVictim()
Definition: CreatureAI.cpp:269
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
Definition: Creature.h:46
Player * ToPlayer()
Definition: Object.h:195
Definition: Player.h:1046
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:19031
PlayerList const & GetPlayers() const
Definition: Map.h:484
Definition: MapRefMgr.h:26
iterator begin()
Definition: MapRefMgr.h:36
iterator end()
Definition: MapRefMgr.h:37

References Unit::AddAura(), MapRefMgr::begin(), Unit::CastSpell(), DATA_PYROGAURD_EMBERSEER, UnitAI::DoCast(), UnitAI::DoCastRandomTarget(), UnitAI::DoMeleeAttackIfReady(), CreatureAI::DoZoneInCombat(), EMOTE_ONE_STACK, MapRefMgr::end(), EVENT_ENTER_COMBAT, EVENT_FIRE_SHIELD, EVENT_FIRENOVA, EVENT_FLAMEBUFFET, EVENT_PLAYER_CHECK, EVENT_PRE_FIGHT_1, EVENT_PRE_FIGHT_2, EVENT_PYROBLAST, EVENT_RESPAWN, GetCreatureListWithEntryInGrid(), WorldObject::GetMap(), Map::GetPlayers(), IN_PROGRESS, BossAI::instance, ScriptedAI::me, NOT_STARTED, NPC_BLACKHAND_INCARCERATOR, InstanceScript::SetBossState(), SPELL_EMBERSEER_GROWING, SPELL_EMBERSEER_OBJECT_VISUAL, SPELL_ENCAGED_EMBERSEER, SPELL_FIRE_SHIELD, SPELL_FIRENOVA, SPELL_FLAMEBUFFET, SPELL_FREEZE_ANIM, SPELL_PYROBLAST, Object::ToPlayer(), and CreatureAI::UpdateVictim().

◆ UpdateRunes()

void boss_pyroguard_emberseer::boss_pyroguard_emberseerAI::UpdateRunes ( GOState  state)
inline
183 {
184 // update all runes
186 rune1->SetGoState(state);
188 rune2->SetGoState(state);
190 rune3->SetGoState(state);
192 rune4->SetGoState(state);
194 rune5->SetGoState(state);
196 rune6->SetGoState(state);
198 rune7->SetGoState(state);
199 }
@ GO_EMBERSEER_RUNE_3
Definition: blackrock_spire.h:132
@ GO_EMBERSEER_RUNE_7
Definition: blackrock_spire.h:136
@ GO_EMBERSEER_RUNE_4
Definition: blackrock_spire.h:133
@ GO_EMBERSEER_RUNE_2
Definition: blackrock_spire.h:131
@ GO_EMBERSEER_RUNE_1
Definition: blackrock_spire.h:130
@ GO_EMBERSEER_RUNE_5
Definition: blackrock_spire.h:134
@ GO_EMBERSEER_RUNE_6
Definition: blackrock_spire.h:135

References Map::GetGameObject(), InstanceScript::GetGuidData(), WorldObject::GetMap(), GO_EMBERSEER_RUNE_1, GO_EMBERSEER_RUNE_2, GO_EMBERSEER_RUNE_3, GO_EMBERSEER_RUNE_4, GO_EMBERSEER_RUNE_5, GO_EMBERSEER_RUNE_6, GO_EMBERSEER_RUNE_7, BossAI::instance, and ScriptedAI::me.

Referenced by JustDied().