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

Public Member Functions

 boss_kelidan_the_breakerAI (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void KilledUnit (Unit *) override
 
void DoAction (int32 param) override
 
void CheckChannelers ()
 
void SummonChannelers ()
 
void JustDied (Unit *) override
 
void ApplyImmunities (bool apply)
 
void UpdateAI (uint32 diff) 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
 

Public Attributes

InstanceScriptinstance
 
EventMap events
 
ObjectGuid channelers [5]
 
uint32 checkTimer
 
bool addYell
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

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 ()
 
- 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

◆ boss_kelidan_the_breakerAI()

boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::boss_kelidan_the_breakerAI ( Creature creature)
inline
76 : ScriptedAI(creature)
77 {
78 instance = creature->GetInstanceScript();
79 }
Definition: ScriptedCreature.h:192
InstanceScript * GetInstanceScript() const
Definition: Object.cpp:1192
InstanceScript * instance
Definition: boss_kelidan_the_breaker.cpp:81

References WorldObject::GetInstanceScript(), and instance.

Member Function Documentation

◆ ApplyImmunities()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::ApplyImmunities ( bool  apply)
inline
207 {
226 }
@ MECHANIC_FEAR
Definition: SharedDefines.h:1302
@ MECHANIC_DISORIENTED
Definition: SharedDefines.h:1299
@ MECHANIC_KNOCKOUT
Definition: SharedDefines.h:1311
@ MECHANIC_CHARM
Definition: SharedDefines.h:1298
@ MECHANIC_TURN
Definition: SharedDefines.h:1320
@ MECHANIC_STUN
Definition: SharedDefines.h:1309
@ MECHANIC_FREEZE
Definition: SharedDefines.h:1310
@ MECHANIC_ROOT
Definition: SharedDefines.h:1304
@ MECHANIC_SLEEP
Definition: SharedDefines.h:1307
@ MECHANIC_POLYMORPH
Definition: SharedDefines.h:1314
@ MECHANIC_BANISH
Definition: SharedDefines.h:1315
@ MECHANIC_DAZE
Definition: SharedDefines.h:1324
@ MECHANIC_SNARE
Definition: SharedDefines.h:1308
@ MECHANIC_SILENCE
Definition: SharedDefines.h:1306
@ MECHANIC_SHACKLE
Definition: SharedDefines.h:1317
@ MECHANIC_SAPPED
Definition: SharedDefines.h:1327
@ MECHANIC_DISTRACT
Definition: SharedDefines.h:1301
@ MECHANIC_HORROR
Definition: SharedDefines.h:1321
@ IMMUNITY_MECHANIC
Definition: SharedDefines.h:1371
Creature * me
Definition: ScriptedCreature.h:282
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply, SpellImmuneBlockType blockType=SPELL_BLOCK_TYPE_ALL)
Definition: Unit.cpp:13300

References Unit::ApplySpellImmune(), IMMUNITY_MECHANIC, ScriptedAI::me, MECHANIC_BANISH, MECHANIC_CHARM, MECHANIC_DAZE, MECHANIC_DISORIENTED, MECHANIC_DISTRACT, MECHANIC_FEAR, MECHANIC_FREEZE, MECHANIC_HORROR, MECHANIC_KNOCKOUT, MECHANIC_POLYMORPH, MECHANIC_ROOT, MECHANIC_SAPPED, MECHANIC_SHACKLE, MECHANIC_SILENCE, MECHANIC_SLEEP, MECHANIC_SNARE, MECHANIC_STUN, and MECHANIC_TURN.

Referenced by Reset(), and UpdateAI().

◆ CheckChannelers()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::CheckChannelers ( )
inline
155 {
156 if (addYell)
157 {
158 if (!SelectTargetFromPlayerList(100.0f))
160 return;
161 }
162
164 for (uint8 i = 0; i < 5; ++i)
165 {
167 if (channeler && !channeler->HasUnitState(UNIT_STATE_CASTING) && !channeler->IsInCombat())
168 {
169 Creature* target = ObjectAccessor::GetCreature(*me, channelers[(i + 2) % 5]);
170 if (target)
171 channeler->CastSpell(target, SPELL_CHANNELING, false);
172 }
173 }
174 }
std::uint8_t uint8
Definition: Define.h:110
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELL_CHANNELING
Definition: boss_kelidan_the_breaker.cpp:43
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
Player * SelectTargetFromPlayerList(float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
Definition: ScriptedCreature.cpp:526
Definition: Creature.h:46
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
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398
bool IsInCombat() const
Definition: Unit.h:1688
void SummonChannelers()
Definition: boss_kelidan_the_breaker.cpp:176
bool addYell
Definition: boss_kelidan_the_breaker.cpp:85
ObjectGuid channelers[5]
Definition: boss_kelidan_the_breaker.cpp:83

References addYell, Unit::CastSpell(), channelers, CreatureAI::EnterEvadeMode(), ObjectAccessor::GetCreature(), Unit::HasUnitState(), Unit::IsInCombat(), ScriptedAI::me, ScriptedAI::SelectTargetFromPlayerList(), SPELL_CHANNELING, SummonChannelers(), and UNIT_STATE_CASTING.

Referenced by UpdateAI().

◆ DoAction()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::DoAction ( int32  param)
inlineoverridevirtual

Reimplemented from UnitAI.

122 {
123 if (param == ACTION_CHANNELER_ENGAGED)
124 {
125 if (!addYell)
126 {
127 addYell = true;
129
130 for (uint8 i = 0; i < 5; ++i)
131 {
133 if (channeler && !channeler->IsInCombat())
134 channeler->SetInCombatWithZone();
135 }
136 }
137 }
138 else if (param == ACTION_CHANNELER_DIED)
139 {
140 for (uint8 i = 0; i < 5; ++i)
141 {
143 if (channeler && channeler->IsAlive())
144 return;
145 }
148 me->SetImmuneToAll(false);
149 if (Unit* target = me->SelectNearestPlayer(100.0f))
150 AttackStart(target);
151 }
152 }
@ REACT_AGGRESSIVE
Definition: Unit.h:1025
@ UNIT_FLAG_NON_ATTACKABLE
Definition: Unit.h:449
Talk
Definition: boss_fathomlord_karathress.cpp:23
@ ACTION_CHANNELER_DIED
Definition: boss_kelidan_the_breaker.cpp:55
@ ACTION_CHANNELER_ENGAGED
Definition: boss_kelidan_the_breaker.cpp:54
@ SAY_ADD_AGGRO
Definition: boss_kelidan_the_breaker.cpp:26
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:206
void SetInCombatWithZone()
Definition: Creature.cpp:2723
void SetReactState(ReactStates st)
Definition: Creature.h:89
Player * SelectNearestPlayer(float distance=0) const
Definition: Object.cpp:2436
Definition: Unit.h:1290
bool IsAlive() const
Definition: Unit.h:1808
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition: Unit.h:1678
void RemoveUnitFlag(UnitFlags flags)
Definition: Unit.h:1482

References ACTION_CHANNELER_DIED, ACTION_CHANNELER_ENGAGED, addYell, ScriptedAI::AttackStart(), channelers, ObjectAccessor::GetCreature(), Unit::IsAlive(), Unit::IsInCombat(), ScriptedAI::me, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), SAY_ADD_AGGRO, WorldObject::SelectNearestPlayer(), Unit::SetImmuneToAll(), Creature::SetInCombatWithZone(), Creature::SetReactState(), and UNIT_FLAG_NON_ATTACKABLE.

◆ JustDied()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

194 {
195 Talk(SAY_DIE);
196 if (instance)
197 {
198 // Xinef: load grid with start doors
199 me->GetMap()->LoadGrid(0, -111.0f);
203 }
204 }
@ DONE
Definition: InstanceScript.h:59
@ DATA_DOOR6
Definition: blood_furnace.h:42
@ DATA_DOOR1
Definition: blood_furnace.h:37
@ DATA_KELIDAN
Definition: blood_furnace.h:34
@ SAY_DIE
Definition: boss_kelidan_the_breaker.cpp:29
Map * GetMap() const
Definition: Object.h:517
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:109
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94
void LoadGrid(float x, float y)
Definition: Map.cpp:494
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:53

References DATA_DOOR1, DATA_DOOR6, DATA_KELIDAN, DONE, InstanceScript::GetGuidData(), WorldObject::GetMap(), InstanceScript::HandleGameObject(), instance, Map::LoadGrid(), ScriptedAI::me, SAY_DIE, and ZoneScript::SetData().

◆ JustEngagedWith()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from ScriptedAI.

103 {
104 events.ScheduleEvent(EVENT_SPELL_VOLLEY, 1000);
105 events.ScheduleEvent(EVENT_SPELL_CORRUPTION, 5000);
106 events.ScheduleEvent(EVENT_SPELL_BURNING_NOVA, 15000);
107
109 Talk(SAY_WAKE);
110
111 if (instance)
113 }
@ IN_PROGRESS
Definition: InstanceScript.h:57
events
Definition: boss_sartura.cpp:43
@ EVENT_SPELL_BURNING_NOVA
Definition: boss_kelidan_the_breaker.cpp:48
@ EVENT_SPELL_CORRUPTION
Definition: boss_kelidan_the_breaker.cpp:47
@ SAY_WAKE
Definition: boss_kelidan_the_breaker.cpp:25
@ EVENT_SPELL_VOLLEY
Definition: boss_kelidan_the_breaker.cpp:46
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
Definition: Unit.cpp:4069

References DATA_KELIDAN, EVENT_SPELL_BURNING_NOVA, EVENT_SPELL_CORRUPTION, EVENT_SPELL_VOLLEY, IN_PROGRESS, instance, Unit::InterruptNonMeleeSpells(), ScriptedAI::me, SAY_WAKE, and ZoneScript::SetData().

◆ KilledUnit()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::KilledUnit ( Unit )
inlineoverridevirtual

Reimplemented from ScriptedAI.

116 {
117 if (urand(0, 1))
118 Talk(SAY_KILL);
119 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:44
@ SAY_KILL
Definition: boss_kelidan_the_breaker.cpp:27

References SAY_KILL, and urand().

◆ Reset()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Reset ( )
inlineoverridevirtual

Reimplemented from ScriptedAI.

88 {
89 addYell = false;
90 checkTimer = 5000;
91
92 events.Reset();
93 ApplyImmunities(true);
97 me->SetImmuneToAll(true);
98 if (instance)
100 }
@ REACT_PASSIVE
Definition: Unit.h:1023
@ NOT_STARTED
Definition: InstanceScript.h:56
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:1481
void ApplyImmunities(bool apply)
Definition: boss_kelidan_the_breaker.cpp:206
uint32 checkTimer
Definition: boss_kelidan_the_breaker.cpp:84

References addYell, ApplyImmunities(), checkTimer, DATA_KELIDAN, instance, ScriptedAI::me, NOT_STARTED, REACT_PASSIVE, ZoneScript::SetData(), Unit::SetImmuneToAll(), Creature::SetReactState(), Unit::SetUnitFlag(), SummonChannelers(), and UNIT_FLAG_NON_ATTACKABLE.

◆ SummonChannelers()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::SummonChannelers ( )
inline
177 {
178 for (uint8 i = 0; i < 5; ++i)
179 {
181 if (channeler && channeler->isDead())
182 {
183 channeler->DespawnOrUnsummon(1);
184 channeler = nullptr;
185 }
186 if (!channeler)
188
189 channelers[i] = channeler ? channeler->GetGUID() : ObjectGuid::Empty;
190 }
191 }
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
Definition: Object.h:47
@ NPC_CHANNELER
Definition: blood_furnace.h:59
const float ShadowmoonChannelers[5][4]
Definition: boss_kelidan_the_breaker.cpp:58
void DespawnOrUnsummon(Milliseconds msTimeToDespawn, Seconds forcedRespawnTimer)
Definition: Creature.cpp:2108
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr, bool visibleBySummonerOnly=false) const
Definition: Object.cpp:2318
static ObjectGuid const Empty
Definition: ObjectGuid.h:122
bool isDead() const
Definition: Unit.h:1810

References channelers, Creature::DespawnOrUnsummon(), ObjectGuid::Empty, ObjectAccessor::GetCreature(), Object::GetGUID(), Unit::isDead(), ScriptedAI::me, NPC_CHANNELER, ShadowmoonChannelers, WorldObject::SummonCreature(), and TEMPSUMMON_CORPSE_TIMED_DESPAWN.

Referenced by CheckChannelers(), and Reset().

◆ UpdateAI()

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from ScriptedAI.

229 {
230 if (!UpdateVictim())
231 {
232 checkTimer += diff;
233 if (checkTimer >= 5000)
234 {
235 checkTimer = 0;
238 me->CastSpell(me, SPELL_EVOCATION, false);
239 }
240 return;
241 }
242
243 events.Update(diff);
245 return;
246
247 switch (events.ExecuteEvent())
248 {
251 events.RepeatEvent(urand(8000, 13000));
252 break;
255 events.RepeatEvent(urand(30000, 50000));
256 break;
258 Talk(SAY_NOVA);
259
260 ApplyImmunities(false);
262 ApplyImmunities(true);
263
264 if (IsHeroic())
266
267 events.DelayEvents(6000, 0);
268 events.RepeatEvent(urand(25000, 32000));
269 events.ScheduleEvent(EVENT_SPELL_FIRE_NOVA, 5000);
270 break;
273 break;
274 }
275
277 }
@ SPELL_SHADOW_BOLT_VOLLEY
Definition: boss_kelidan_the_breaker.cpp:35
@ SPELL_FIRE_NOVA
Definition: boss_kelidan_the_breaker.cpp:34
@ SPELL_EVOCATION
Definition: boss_kelidan_the_breaker.cpp:33
@ EVENT_SPELL_FIRE_NOVA
Definition: boss_kelidan_the_breaker.cpp:49
@ SAY_NOVA
Definition: boss_kelidan_the_breaker.cpp:28
@ SPELL_CORRUPTION
Definition: boss_kelidan_the_breaker.cpp:32
@ SPELL_BURNING_NOVA
Definition: boss_kelidan_the_breaker.cpp:36
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
bool UpdateVictim()
Definition: CreatureAI.cpp:269
bool IsHeroic() const
Definition: ScriptedCreature.h:379
void DoTeleportAll(float x, float y, float z, float o)
Definition: ScriptedCreature.cpp:442
float GetPositionZ() const
Definition: Position.h:119
float GetOrientation() const
Definition: Position.h:120
float GetPositionX() const
Definition: Position.h:117
float GetPositionY() const
Definition: Position.h:118
Aura * AddAura(uint32 spellId, Unit *target)
Definition: Unit.cpp:19031
void CheckChannelers()
Definition: boss_kelidan_the_breaker.cpp:154

References Unit::AddAura(), ApplyImmunities(), Unit::CastSpell(), CheckChannelers(), checkTimer, UnitAI::DoMeleeAttackIfReady(), ScriptedAI::DoTeleportAll(), EVENT_SPELL_BURNING_NOVA, EVENT_SPELL_CORRUPTION, EVENT_SPELL_FIRE_NOVA, EVENT_SPELL_VOLLEY, Position::GetOrientation(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::HasUnitState(), ScriptedAI::IsHeroic(), ScriptedAI::me, SAY_NOVA, SPELL_BURNING_NOVA, SPELL_CORRUPTION, SPELL_EVOCATION, SPELL_FIRE_NOVA, SPELL_SHADOW_BOLT_VOLLEY, UNIT_STATE_CASTING, CreatureAI::UpdateVictim(), and urand().

Member Data Documentation

◆ addYell

bool boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::addYell

Referenced by CheckChannelers(), DoAction(), and Reset().

◆ channelers

ObjectGuid boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::channelers[5]

◆ checkTimer

uint32 boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::checkTimer

Referenced by Reset(), and UpdateAI().

◆ events

EventMap boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::events

◆ instance

InstanceScript* boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::instance