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

Public Member Functions

 boss_auriayaAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterCombat (Unit *) override
 
void KilledUnit (Unit *who) override
 
void JustSummoned (Creature *summoned) override
 
void DoAction (int32 action) override
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 id, uint32 data) override
 
void JustDied (Unit *) 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 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 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

ObjectGuid DefenderGUID
 
uint8 defenderLives
 
bool crazyCatLady
 
bool nineLives
 

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 ()
 
- 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_auriaya::boss_auriayaAI::boss_auriayaAI ( Creature creature)
inline
108  : BossAI(creature, BOSS_AURIAYA)
109  {
110  Initialize();
111  }
Definition: ulduar.h:38
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444
void Initialize()
Definition: boss_auriaya.cpp:113

+ Here is the call graph for this function:

Member Function Documentation

void boss_auriaya::boss_auriayaAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

168  {
169  switch (action)
170  {
173  break;
175  --defenderLives;
176  if (!defenderLives)
177  {
179  break;
180  }
182  break;
183  default:
184  break;
185  }
186  }
Definition: boss_auriaya.cpp:90
Definition: boss_auriaya.cpp:65
Definition: boss_auriaya.cpp:89
Definition: boss_auriaya.cpp:97
uint8 defenderLives
Definition: boss_auriaya.cpp:283
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_auriaya.cpp:98
void SetData(uint32 id, uint32 data) override
Definition: boss_auriaya.cpp:201

+ Here is the call graph for this function:

void boss_auriaya::boss_auriayaAI::EnterCombat ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

128  {
129  _EnterCombat();
130  Talk(SAY_AGGRO);
131 
132  events.ScheduleEvent(EVENT_SCREECH, urand(45000, 65000));
133  events.ScheduleEvent(EVENT_BLAST, urand(20000, 25000));
134  events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
135  events.ScheduleEvent(EVENT_DEFENDER, urand(40000, 55000));
136  events.ScheduleEvent(EVENT_SUMMON, urand(45000, 55000));
138  }
void _EnterCombat()
Definition: ScriptedCreature.cpp:480
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_auriaya.cpp:60
Definition: boss_auriaya.cpp:66
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_auriaya.cpp:62
Definition: boss_auriaya.cpp:61
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_auriaya.cpp:59
Definition: boss_auriaya.cpp:63
Definition: boss_auriaya.cpp:79

+ Here is the call graph for this function:

uint32 boss_auriaya::boss_auriayaAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

189  {
190  switch (type)
191  {
192  case DATA_NINE_LIVES:
193  return nineLives ? 1 : 0;
194  case DATA_CRAZY_CAT_LADY:
195  return crazyCatLady ? 1 : 0;
196  }
197 
198  return 0;
199  }
bool nineLives
Definition: boss_auriaya.cpp:285
bool crazyCatLady
Definition: boss_auriaya.cpp:284
Definition: boss_auriaya.cpp:97
Definition: boss_auriaya.cpp:98
void boss_auriaya::boss_auriayaAI::Initialize ( void  )
inline
114  {
116  defenderLives = 8;
117  crazyCatLady = true;
118  nineLives = false;
119  }
ObjectGuid DefenderGUID
Definition: boss_auriaya.cpp:282
bool nineLives
Definition: boss_auriaya.cpp:285
bool crazyCatLady
Definition: boss_auriaya.cpp:284
uint8 defenderLives
Definition: boss_auriaya.cpp:283
void Clear()
Definition: ObjectGuid.h:215

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void boss_auriaya::boss_auriayaAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

215  {
216  _JustDied();
217  Talk(SAY_DEATH);
218  }
Definition: boss_auriaya.cpp:81
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_auriaya::boss_auriayaAI::JustSummoned ( Creature summoned)
inlineoverridevirtual

Reimplemented from BossAI.

147  {
148  summons.Summon(summoned);
149 
150  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
151  {
152  summoned->AI()->AttackStart(target);
153  summoned->AddThreat(target, 250.0f);
154  DoZoneInCombat(summoned);
155  }
156 
157  if (summoned->GetEntry() == NPC_FERAL_DEFENDER)
158  {
159  if (!summoned->IsInCombat() && me->GetVictim())
160  summoned->AI()->AttackStart(me->GetVictim());
161  summoned->SetAuraStack(SPELL_FERAL_ESSENCE, summoned, 9);
162  DefenderGUID = summoned->GetGUID();
163  DoZoneInCombat(summoned);
164  }
165  }
ObjectGuid DefenderGUID
Definition: boss_auriaya.cpp:282
void AddThreat(Unit *victim, float fThreat, SpellSchoolMask schoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *threatSpell=NULL)
Definition: Unit.cpp:10691
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
bool IsInCombat() const
Definition: Unit.h:1584
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
Definition: boss_auriaya.cpp:40
Definition: boss_auriaya.cpp:51
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
SummonList summons
Definition: ScriptedCreature.h:372
ObjectGuid const & GetGUID() const
Definition: Object.h:105
uint32 GetEntry() const
Definition: Object.h:107
void SetAuraStack(uint32 spellId, Unit *target, uint32 stack)
Definition: Unit.cpp:14502
Definition: Unit.h:1305
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

void boss_auriaya::boss_auriayaAI::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from ScriptedAI.

141  {
142  if (who->GetTypeId() == TYPEID_PLAYER)
143  Talk(SAY_SLAY);
144  }
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33
Definition: boss_auriaya.cpp:80

+ Here is the call graph for this function:

void boss_auriaya::boss_auriayaAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

122  {
123  _Reset();
124  Initialize();
125  }
void _Reset()
Definition: ScriptedCreature.cpp:457
void Initialize()
Definition: boss_auriaya.cpp:113

+ Here is the call graph for this function:

void boss_auriaya::boss_auriayaAI::SetData ( uint32  id,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

202  {
203  switch (id)
204  {
205  case DATA_NINE_LIVES:
206  nineLives = data ? true : false;
207  break;
208  case DATA_CRAZY_CAT_LADY:
209  crazyCatLady = data ? true : false;
210  break;
211  }
212  }
bool nineLives
Definition: boss_auriaya.cpp:285
bool crazyCatLady
Definition: boss_auriaya.cpp:284
Definition: boss_auriaya.cpp:97
Definition: boss_auriaya.cpp:98

+ Here is the caller graph for this function:

void boss_auriaya::boss_auriayaAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

221  {
222  if (!UpdateVictim())
223  return;
224 
225  events.Update(diff);
226 
228  return;
229 
230  while (uint32 eventId = events.ExecuteEvent())
231  {
232  switch (eventId)
233  {
234  case EVENT_SCREECH:
236  events.ScheduleEvent(EVENT_SCREECH, urand(40000, 60000));
237  break;
238  case EVENT_TERRIFYING:
239  Talk(EMOTE_FEAR);
241  events.ScheduleEvent(EVENT_TERRIFYING, urand(20000, 30000));
242  break;
243  case EVENT_BLAST:
245  events.ScheduleEvent(EVENT_BLAST, urand(25000, 35000));
246  break;
247  case EVENT_DEFENDER:
250  if (Creature* trigger = me->FindNearestCreature(NPC_FERAL_DEFENDER_TRIGGER, 15.0f, true))
251  DoCast(trigger, SPELL_ACTIVATE_DEFENDER, true);
252  break;
255  {
256  Defender->Respawn();
257  if (defenderLives)
258  Defender->SetAuraStack(SPELL_FERAL_ESSENCE, Defender, defenderLives);
259  Defender->SetInCombatWithZone();
260  if (!Defender->IsInCombat())
261  Defender->AI()->AttackStart(me->GetVictim());
263  }
264  break;
265  case EVENT_SUMMON:
266  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
268  events.ScheduleEvent(EVENT_SUMMON, urand(30000, 45000));
269  break;
270  case EVENT_BERSERK:
271  DoCast(me, SPELL_BERSERK, true);
272  Talk(SAY_BERSERK);
274  break;
275  }
276  }
277 
279  }
ObjectGuid DefenderGUID
Definition: boss_auriaya.cpp:282
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: boss_auriaya.cpp:84
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_auriaya.cpp:82
Definition: Unit.h:565
Definition: boss_auriaya.cpp:29
Definition: boss_auriaya.cpp:27
Definition: boss_auriaya.cpp:33
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
Definition: boss_auriaya.cpp:31
Definition: boss_auriaya.cpp:40
Definition: Creature.h:467
Definition: boss_auriaya.cpp:65
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
Creature *const me
Definition: CreatureAI.h:71
Definition: UnitAI.h:35
Unit * GetVictim() const
Definition: Unit.h:1379
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_auriaya.cpp:60
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
Definition: boss_auriaya.cpp:66
uint32_t uint32
Definition: Define.h:150
Definition: boss_auriaya.cpp:30
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint8 defenderLives
Definition: boss_auriaya.cpp:283
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_auriaya.cpp:62
Definition: boss_auriaya.cpp:83
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void Update(uint32 time)
Definition: EventMap.h:54
Definition: boss_auriaya.cpp:26
Definition: boss_auriaya.cpp:61
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_auriaya.cpp:52
Definition: boss_auriaya.cpp:59
Definition: boss_auriaya.cpp:63
Definition: Unit.h:1305
Definition: boss_auriaya.cpp:28

+ Here is the call graph for this function:

Member Data Documentation

bool boss_auriaya::boss_auriayaAI::crazyCatLady
private
ObjectGuid boss_auriaya::boss_auriayaAI::DefenderGUID
private
uint8 boss_auriaya::boss_auriayaAI::defenderLives
private
bool boss_auriaya::boss_auriayaAI::nineLives
private

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