TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boss_kelidan_the_breaker::boss_kelidan_the_breakerAI Struct Reference

Public Member Functions

 boss_kelidan_the_breakerAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterCombat (Unit *who) override
 
void KilledUnit (Unit *) override
 
void ChannelerEngaged (Unit *who)
 
void ChannelerDied (Unit *killer)
 
ObjectGuid GetChanneled (Creature *channeler1)
 
void SummonChannelers ()
 
void JustDied (Unit *) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
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 SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (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 IsSummonedBy (Unit *)
 
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)
 

Public Attributes

uint32 ShadowVolley_Timer
 
uint32 BurningNova_Timer
 
uint32 Firenova_Timer
 
uint32 Corruption_Timer
 
uint32 check_Timer
 
bool Firenova
 
bool addYell
 
ObjectGuid Channelers [5]
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- 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_kelidan_the_breaker::boss_kelidan_the_breakerAI::boss_kelidan_the_breakerAI ( Creature creature)
inline
66  : BossAI(creature, DATA_KELIDAN_THE_BREAKER)
67  {
68  Initialize();
69  Firenova_Timer = 0;
70  }
Definition: blood_furnace.h:31
uint32 Firenova_Timer
Definition: boss_kelidan_the_breaker.cpp:84
void Initialize()
Definition: boss_kelidan_the_breaker.cpp:72
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::ChannelerDied ( Unit killer)
inline
133  {
134  for (uint8 i = 0; i < 5; ++i)
135  {
137  if (channeler && channeler->IsAlive())
138  return;
139  }
142  if (killer)
143  AttackStart(killer);
144  }
Definition: Unit.h:674
Definition: Unit.h:1131
Definition: Creature.h:467
ObjectGuid Channelers[5]
Definition: boss_kelidan_the_breaker.cpp:89
Definition: Unit.h:681
Creature *const me
Definition: CreatureAI.h:71
bool IsAlive() const
Definition: Unit.h:1692
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: Unit.h:682
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
Definition: UpdateFields.h:109
uint8_t uint8
Definition: Define.h:152
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::ChannelerEngaged ( Unit who)
inline
118  {
119  if (who && !addYell)
120  {
121  addYell = true;
123  }
124  for (uint8 i = 0; i<5; ++i)
125  {
127  if (who && channeler && !channeler->IsInCombat())
128  channeler->AI()->AttackStart(who);
129  }
130  }
bool addYell
Definition: boss_kelidan_the_breaker.cpp:88
bool IsInCombat() const
Definition: Unit.h:1584
Definition: Creature.h:467
ObjectGuid Channelers[5]
Definition: boss_kelidan_the_breaker.cpp:89
Definition: boss_kelidan_the_breaker.cpp:27
Creature *const me
Definition: CreatureAI.h:71
CreatureAI * AI() const
Definition: Creature.h:525
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
uint8_t uint8
Definition: Define.h:152
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::EnterCombat ( Unit who)
inlineoverridevirtual

Reimplemented from BossAI.

101  {
102  _EnterCombat();
103  Talk(SAY_WAKE);
104  if (me->IsNonMeleeSpellCast(false))
106  DoStartMovement(who);
107  }
void _EnterCombat()
Definition: ScriptedCreature.cpp:480
Definition: boss_kelidan_the_breaker.cpp:26
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Creature *const me
Definition: CreatureAI.h:71
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
void DoStartMovement(Unit *target, float distance=0.0f, float angle=0.0f)
Definition: ScriptedCreature.cpp:134

+ Here is the call graph for this function:

ObjectGuid boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::GetChanneled ( Creature channeler1)
inline
147  {
149  if (!channeler1)
150  return ObjectGuid::Empty;
151 
152  uint8 i;
153  for (i = 0; i < 5; ++i)
154  {
156  if (channeler && channeler->GetGUID() == channeler1->GetGUID())
157  break;
158  }
159  return Channelers[(i + 2) % 5];
160  }
static ObjectGuid const Empty
Definition: ObjectGuid.h:196
Definition: Creature.h:467
ObjectGuid Channelers[5]
Definition: boss_kelidan_the_breaker.cpp:89
void SummonChannelers()
Definition: boss_kelidan_the_breaker.cpp:162
Creature *const me
Definition: CreatureAI.h:71
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint8_t uint8
Definition: Define.h:152

+ Here is the call graph for this function:

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Initialize ( void  )
inline
73  {
74  ShadowVolley_Timer = 1000;
75  BurningNova_Timer = 15000;
76  Corruption_Timer = 5000;
77  check_Timer = 0;
78  Firenova = false;
79  addYell = false;
80  }
bool addYell
Definition: boss_kelidan_the_breaker.cpp:88
bool Firenova
Definition: boss_kelidan_the_breaker.cpp:87
uint32 ShadowVolley_Timer
Definition: boss_kelidan_the_breaker.cpp:82
uint32 check_Timer
Definition: boss_kelidan_the_breaker.cpp:86
uint32 Corruption_Timer
Definition: boss_kelidan_the_breaker.cpp:85
uint32 BurningNova_Timer
Definition: boss_kelidan_the_breaker.cpp:83

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

177  {
178  _JustDied();
179  Talk(SAY_DIE);
180  }
Definition: boss_kelidan_the_breaker.cpp:30
void _JustDied()
Definition: ScriptedCreature.cpp:471
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

110  {
111  if (rand32() % 2)
112  return;
113 
114  Talk(SAY_KILL);
115  }
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_kelidan_the_breaker.cpp:28
uint32 rand32()
Definition: Random.cpp:64

+ Here is the call graph for this function:

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

92  {
93  _Reset();
94  Initialize();
98  }
Definition: Unit.h:674
Definition: Unit.h:1129
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
void SummonChannelers()
Definition: boss_kelidan_the_breaker.cpp:162
Definition: Unit.h:681
Creature *const me
Definition: CreatureAI.h:71
void _Reset()
Definition: ScriptedCreature.cpp:457
Definition: Unit.h:682
void Initialize()
Definition: boss_kelidan_the_breaker.cpp:72
Definition: UpdateFields.h:109
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

void boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::SummonChannelers ( )
inline
163  {
164  for (uint8 i = 0; i < 5; ++i)
165  {
167  if (!channeler || channeler->isDead())
169  if (channeler)
170  Channelers[i] = channeler->GetGUID();
171  else
172  Channelers[i].Clear();
173  }
174  }
Definition: Creature.h:467
ObjectGuid Channelers[5]
Definition: boss_kelidan_the_breaker.cpp:89
Creature *const me
Definition: CreatureAI.h:71
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void Clear()
Definition: ObjectGuid.h:215
ObjectGuid const & GetGUID() const
Definition: Object.h:105
bool isDead() const
Definition: Unit.h:1694
Definition: Object.h:59
Definition: boss_kelidan_the_breaker.cpp:45
uint8_t uint8
Definition: Define.h:152
const float ShadowmoonChannelers[5][4]
Definition: boss_kelidan_the_breaker.cpp:50
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:

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

183  {
184  if (!UpdateVictim())
185  {
186  if (check_Timer <= diff)
187  {
188  if (!me->IsNonMeleeSpellCast(false))
190  check_Timer = 5000;
191  }
192  else
193  check_Timer -= diff;
194  return;
195  }
196 
197  if (Firenova)
198  {
199  if (Firenova_Timer <= diff)
200  {
201  DoCast(me, SPELL_FIRE_NOVA, true);
202  Firenova = false;
203  ShadowVolley_Timer = 2000;
204  }
205  else
206  Firenova_Timer -=diff;
207 
208  return;
209  }
210 
211  if (ShadowVolley_Timer <= diff)
212  {
214  ShadowVolley_Timer = 5000 + rand32() % 8000;
215  }
216  else
217  ShadowVolley_Timer -=diff;
218 
219  if (Corruption_Timer <= diff)
220  {
222  Corruption_Timer = 30000 + rand32() % 20000;
223  }
224  else
225  Corruption_Timer -=diff;
226 
227  if (BurningNova_Timer <= diff)
228  {
229  if (me->IsNonMeleeSpellCast(false))
231 
232  Talk(SAY_NOVA);
233 
234  if (SpellInfo const* nova = sSpellMgr->GetSpellInfo(SPELL_BURNING_NOVA))
235  {
237  aura->ApplyForTargets();
238  }
239 
240  if (IsHeroic())
242 
243  BurningNova_Timer = 20000 + rand32() % 8000;
244  Firenova_Timer= 5000;
245  Firenova = true;
246  }
247  else
248  BurningNova_Timer -=diff;
249 
251  }
bool UpdateVictim()
Definition: CreatureAI.cpp:233
void DoTeleportAll(float x, float y, float z, float o)
Definition: ScriptedCreature.cpp:304
Definition: SpellInfo.h:326
Definition: boss_kelidan_the_breaker.cpp:35
bool Firenova
Definition: boss_kelidan_the_breaker.cpp:87
uint32 ShadowVolley_Timer
Definition: boss_kelidan_the_breaker.cpp:82
bool IsHeroic() const
Definition: ScriptedCreature.h:268
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Definition: boss_kelidan_the_breaker.cpp:29
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_kelidan_the_breaker.cpp:32
float GetOrientation() const
Definition: Position.h:107
Definition: boss_kelidan_the_breaker.cpp:38
float GetPositionY() const
Definition: Position.h:105
#define sSpellMgr
Definition: SpellMgr.h:756
float GetPositionZ() const
Definition: Position.h:106
Definition: boss_kelidan_the_breaker.cpp:33
uint32 check_Timer
Definition: boss_kelidan_the_breaker.cpp:86
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint32 Firenova_Timer
Definition: boss_kelidan_the_breaker.cpp:84
static Aura * TryRefreshStackOrCreate(SpellInfo const *spellproto, uint32 tryEffMask, WorldObject *owner, Unit *caster, int32 *baseAmount=NULL, Item *castItem=NULL, ObjectGuid casterGUID=ObjectGuid::Empty, bool *refresh=NULL, int32 castItemLevel=-1)
Definition: SpellAuras.cpp:282
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916
uint32 rand32()
Definition: Random.cpp:64
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
Definition: SpellAuras.h:116
float GetPositionX() const
Definition: Position.h:104
uint32 Corruption_Timer
Definition: boss_kelidan_the_breaker.cpp:85
uint32 BurningNova_Timer
Definition: boss_kelidan_the_breaker.cpp:83
#define MAX_EFFECT_MASK
Definition: DBCStructure.h:1027
Definition: boss_kelidan_the_breaker.cpp:41

+ Here is the call graph for this function:

Member Data Documentation

bool boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::addYell
uint32 boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::BurningNova_Timer
ObjectGuid boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Channelers[5]
uint32 boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::check_Timer
uint32 boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Corruption_Timer
bool boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Firenova
uint32 boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::Firenova_Timer
uint32 boss_kelidan_the_breaker::boss_kelidan_the_breakerAI::ShadowVolley_Timer

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