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

Public Member Functions

 boss_harbinger_skyrissAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void MoveInLineOfSight (Unit *who) override
 
void EnterCombat (Unit *) override
 
void JustDied (Unit *) override
 
void JustSummoned (Creature *summon) override
 
void KilledUnit (Unit *victim) override
 
void DoSplit (uint32 val)
 
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 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

bool Intro
 
bool IsImage33
 
bool IsImage66
 
uint32 Intro_Phase
 
uint32 Intro_Timer
 
uint32 MindRend_Timer
 
uint32 Fear_Timer
 
uint32 Domination_Timer
 
uint32 ManaBurn_Timer
 
- 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)
 
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_harbinger_skyriss::boss_harbinger_skyrissAI::boss_harbinger_skyrissAI ( Creature creature)
inline
68  : BossAI(creature, DATA_HARBINGER_SKYRISS)
69  {
70  Initialize();
71  Intro = false;
72  }
void Initialize()
Definition: boss_harbinger_skyriss.cpp:74
bool Intro
Definition: boss_harbinger_skyriss.cpp:87
Definition: arcatraz.h:32
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444

+ Here is the call graph for this function:

Member Function Documentation

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::DoSplit ( uint32  val)
inline
145  {
146  if (me->IsNonMeleeSpellCast(false))
147  me->InterruptNonMeleeSpells(false);
148 
149  Talk(SAY_IMAGE);
150 
151  if (val == 66)
153  else
155  }
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Definition: boss_harbinger_skyriss.cpp:55
Creature *const me
Definition: CreatureAI.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_harbinger_skyriss.cpp:42
Definition: boss_harbinger_skyriss.cpp:54
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
Definition: Unit.cpp:2916

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

114 { }
void boss_harbinger_skyriss::boss_harbinger_skyrissAI::Initialize ( void  )
inline
75  {
76  IsImage33 = false;
77  IsImage66 = false;
78 
79  Intro_Phase = 1;
80  Intro_Timer = 5000;
81  MindRend_Timer = 3000;
82  Fear_Timer = 15000;
83  Domination_Timer = 30000;
84  ManaBurn_Timer = 25000;
85  }
bool IsImage66
Definition: boss_harbinger_skyriss.cpp:89
uint32 MindRend_Timer
Definition: boss_harbinger_skyriss.cpp:93
uint32 Intro_Phase
Definition: boss_harbinger_skyriss.cpp:91
bool IsImage33
Definition: boss_harbinger_skyriss.cpp:88
uint32 ManaBurn_Timer
Definition: boss_harbinger_skyriss.cpp:96
uint32 Fear_Timer
Definition: boss_harbinger_skyriss.cpp:94
uint32 Intro_Timer
Definition: boss_harbinger_skyriss.cpp:92
uint32 Domination_Timer
Definition: boss_harbinger_skyriss.cpp:95

+ Here is the caller graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

117  {
118  Talk(SAY_DEATH);
119  _JustDied();
120  }
void _JustDied()
Definition: ScriptedCreature.cpp:471
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_harbinger_skyriss.cpp:43

+ Here is the call graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from BossAI.

123  {
124  if (!summon)
125  return;
126  if (IsImage66)
127  summon->SetHealth(summon->CountPctFromMaxHealth(33));
128  else
129  summon->SetHealth(summon->CountPctFromMaxHealth(66));
130  if (me->GetVictim())
131  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
132  summon->AI()->AttackStart(target);
133  }
bool IsImage66
Definition: boss_harbinger_skyriss.cpp:89
Creature *const me
Definition: CreatureAI.h:71
Definition: UnitAI.h:35
Unit * GetVictim() const
Definition: Unit.h:1379
CreatureAI * AI() const
Definition: Creature.h:525
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
void SetHealth(uint32 val)
Definition: Unit.cpp:11537
Definition: Unit.h:1305
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
uint32 CountPctFromMaxHealth(int32 pct) const
Definition: Unit.h:1435

+ Here is the call graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

136  {
137  //won't yell killing pet/other unit
138  if (victim->GetEntry() == NPC_ALPHA_POD_TARGET)
139  return;
140 
141  Talk(SAY_KILL);
142  }
Definition: boss_harbinger_skyriss.cpp:39
Definition: arcatraz.h:50
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint32 GetEntry() const
Definition: Object.h:107

+ Here is the call graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

107  {
108  if (!Intro)
109  return;
110 
112  }
bool Intro
Definition: boss_harbinger_skyriss.cpp:87
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:128

+ Here is the call graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

99  {
100  if (!Intro)
102 
103  Initialize();
104  }
void Initialize()
Definition: boss_harbinger_skyriss.cpp:74
bool Intro
Definition: boss_harbinger_skyriss.cpp:87
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
Definition: Unit.h:681
Creature *const me
Definition: CreatureAI.h:71
Definition: UpdateFields.h:109

+ Here is the call graph for this function:

void boss_harbinger_skyriss::boss_harbinger_skyrissAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

158  {
159  if (!Intro)
160  {
161  if (Intro_Timer <= diff)
162  {
163  switch (Intro_Phase)
164  {
165  case 1:
166  Talk(SAY_INTRO);
168  ++Intro_Phase;
169  Intro_Timer = 25000;
170  break;
171  case 2:
172  Talk(SAY_AGGRO);
174  {
175  //should have a better way to do this. possibly spell exist.
176  mellic->setDeathState(JUST_DIED);
177  mellic->SetHealth(0);
179  }
180  ++Intro_Phase;
181  Intro_Timer = 3000;
182  break;
183  case 3:
185  Intro = true;
186  break;
187  }
188  }
189  else
190  Intro_Timer -=diff;
191  }
192  if (!UpdateVictim())
193  return;
194 
195  if (!IsImage66 && !HealthAbovePct(66))
196  {
197  DoSplit(66);
198  IsImage66 = true;
199  }
200  if (!IsImage33 && !HealthAbovePct(33))
201  {
202  DoSplit(33);
203  IsImage33 = true;
204  }
205 
206  if (MindRend_Timer <= diff)
207  {
208  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
209  DoCast(target, SPELL_MIND_REND);
210  else
212 
213  MindRend_Timer = 8000;
214  }
215  else
216  MindRend_Timer -=diff;
217 
218  if (Fear_Timer <= diff)
219  {
220  if (me->IsNonMeleeSpellCast(false))
221  return;
222 
223  Talk(SAY_FEAR);
224 
225  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
226  DoCast(target, SPELL_FEAR);
227  else
229 
230  Fear_Timer = 25000;
231  }
232  else
233  Fear_Timer -=diff;
234 
235  if (Domination_Timer <= diff)
236  {
237  if (me->IsNonMeleeSpellCast(false))
238  return;
239 
240  Talk(SAY_MIND);
241 
242  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
243  DoCast(target, SPELL_DOMINATION);
244  else
246 
247  Domination_Timer = 16000 + rand32() % 16000;
248  }
249  else
250  Domination_Timer -=diff;
251 
252  if (IsHeroic())
253  {
254  if (ManaBurn_Timer <= diff)
255  {
256  if (me->IsNonMeleeSpellCast(false))
257  return;
258 
259  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
260  DoCast(target, H_SPELL_MANA_BURN);
261 
262  ManaBurn_Timer = 16000 + rand32() % 16000;
263  }
264  else
265  ManaBurn_Timer -=diff;
266  }
268  }
bool Intro
Definition: boss_harbinger_skyriss.cpp:87
bool IsImage66
Definition: boss_harbinger_skyriss.cpp:89
Definition: boss_harbinger_skyriss.cpp:40
uint32 MindRend_Timer
Definition: boss_harbinger_skyriss.cpp:93
bool UpdateVictim()
Definition: CreatureAI.cpp:233
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:163
Definition: arcatraz.h:41
Definition: boss_harbinger_skyriss.cpp:38
uint32 Intro_Phase
Definition: boss_harbinger_skyriss.cpp:91
Definition: Unit.h:542
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
Definition: boss_harbinger_skyriss.cpp:41
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: boss_harbinger_skyriss.cpp:37
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
Definition: Unit.cpp:2886
Definition: Unit.h:681
bool IsImage33
Definition: boss_harbinger_skyriss.cpp:88
uint32 ManaBurn_Timer
Definition: boss_harbinger_skyriss.cpp:96
uint32 Fear_Timer
Definition: boss_harbinger_skyriss.cpp:94
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: UnitAI.h:35
Definition: arcatraz.h:42
Definition: boss_harbinger_skyriss.cpp:51
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
Definition: boss_harbinger_skyriss.cpp:48
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_harbinger_skyriss.cpp:53
Definition: UpdateFields.h:109
uint32 Intro_Timer
Definition: boss_harbinger_skyriss.cpp:92
uint32 rand32()
Definition: Random.cpp:64
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
void DoSplit(uint32 val)
Definition: boss_harbinger_skyriss.cpp:144
Definition: boss_harbinger_skyriss.cpp:49
Definition: Unit.h:1305
InstanceScript *const instance
Definition: ScriptedCreature.h:340
uint32 Domination_Timer
Definition: boss_harbinger_skyriss.cpp:95

+ Here is the call graph for this function:

Member Data Documentation

uint32 boss_harbinger_skyriss::boss_harbinger_skyrissAI::Domination_Timer
uint32 boss_harbinger_skyriss::boss_harbinger_skyrissAI::Fear_Timer
bool boss_harbinger_skyriss::boss_harbinger_skyrissAI::Intro
uint32 boss_harbinger_skyriss::boss_harbinger_skyrissAI::Intro_Phase
uint32 boss_harbinger_skyriss::boss_harbinger_skyrissAI::Intro_Timer
bool boss_harbinger_skyriss::boss_harbinger_skyrissAI::IsImage33
bool boss_harbinger_skyriss::boss_harbinger_skyrissAI::IsImage66
uint32 boss_harbinger_skyriss::boss_harbinger_skyrissAI::ManaBurn_Timer
uint32 boss_harbinger_skyriss::boss_harbinger_skyrissAI::MindRend_Timer

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