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

Public Member Functions

 boss_yogg_saronAI (Creature *creature)
 
void Reset () override
 
void SpellHit (Unit *, SpellInfo const *spell) override
 
void JustDied (Unit *) override
 
void UpdateAI (uint32 diff) override
 
void DoAction (int32 action) override
 
- Public Member Functions inherited from PassiveAI
 PassiveAI (Creature *c)
 
void MoveInLineOfSight (Unit *) override
 
void AttackStart (Unit *) override
 
- 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 EnterCombat (Unit *)
 
virtual void KilledUnit (Unit *)
 
virtual void JustSummoned (Creature *)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDespawn (Creature *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
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 bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
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 DamageTaken (Unit *, uint32 &)
 
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

EventMap _events
 
InstanceScript_instance
 

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 PassiveAI
static int Permissible (const Creature *)
 
- 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)
 
bool CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_yogg_saron::boss_yogg_saronAI::boss_yogg_saronAI ( Creature creature)
inline
899 : PassiveAI(creature), _instance(creature->GetInstanceScript()) { }
InstanceScript * GetInstanceScript()
Definition: Object.cpp:1540
PassiveAI(Creature *c)
Definition: PassiveAI.cpp:22
InstanceScript * _instance
Definition: boss_yogg_saron.cpp:1009

Member Function Documentation

void boss_yogg_saron::boss_yogg_saronAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

988  {
989  switch (action)
990  {
991  case ACTION_PHASE_THREE:
996  _events.ScheduleEvent(EVENT_DEAFENING_ROAR, urand(20000, 25000), 0, PHASE_THREE); // timer guessed
1001  break;
1002  default:
1003  break;
1004  }
1005  }
EventMap _events
Definition: boss_yogg_saron.cpp:1008
void ResetPlayerDamageReq()
Definition: Creature.h:696
Map * GetMap() const
Definition: Object.h:543
Definition: boss_yogg_saron.cpp:148
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
bool Is25ManRaid() const
Definition: Map.h:400
Definition: boss_yogg_saron.cpp:357
Definition: boss_yogg_saron.cpp:310
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_yogg_saron.cpp:309
Definition: boss_yogg_saron.cpp:47
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
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
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: boss_yogg_saron.cpp:311
InstanceScript * _instance
Definition: boss_yogg_saron.cpp:1009
Definition: boss_yogg_saron.cpp:146
Definition: ulduar.h:390
Definition: boss_yogg_saron.cpp:275

+ Here is the call graph for this function:

void boss_yogg_saron::boss_yogg_saronAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

928  {
930 
932  me->Kill(creature);
933 
934  for (uint8 i = DATA_SARA; i <= DATA_BRAIN_OF_YOGG_SARON; ++i)
936  creature->DisappearAndDie();
937 
938  for (uint8 i = DATA_FREYA_YS; i <= DATA_MIMIRON_YS; ++i)
940  creature->AI()->EnterEvadeMode();
941 
942  Map::PlayerList const& players = me->GetMap()->GetPlayers();
943  for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
944  if (Player* player = itr->GetSource())
945  {
946  player->RemoveAurasDueToSpell(SPELL_SANITY);
947  player->RemoveAurasDueToSpell(SPELL_INSANE);
948  }
949  }
void Kill(Unit *victim, bool durabilityLoss=true)
Definition: Unit.cpp:13513
Definition: ulduar.h:382
Map * GetMap() const
Definition: Object.h:543
Definition: ulduar.h:384
Definition: Creature.h:467
iterator begin()
Definition: MapRefManager.h:37
Definition: ulduar.h:387
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: ulduar.h:383
Definition: LinkedList.h:141
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
Definition: boss_yogg_saron.cpp:50
Definition: ulduar.h:381
PlayerList const & GetPlayers() const
Definition: Map.h:433
Definition: boss_yogg_saron.cpp:110
Definition: MapRefManager.h:26
Definition: boss_yogg_saron.cpp:108
uint8_t uint8
Definition: Define.h:152
InstanceScript * _instance
Definition: boss_yogg_saron.cpp:1009
iterator end()
Definition: MapRefManager.h:38

+ Here is the call graph for this function:

void boss_yogg_saron::boss_yogg_saronAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

902  {
903  _events.Reset();
908 
909  me->ResetLootMode();
910  uint32 keepersCount = _instance->GetData(DATA_KEEPERS_COUNT);
911  if (keepersCount == 0)
913  if (keepersCount <= 1)
915  if (keepersCount <= 2)
917  if (keepersCount <= 3)
919  }
EventMap _events
Definition: boss_yogg_saron.cpp:1008
Definition: SharedDefines.h:73
void AddLootMode(uint16 lootMode)
Definition: Creature.h:595
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
void Reset()
Definition: EventMap.cpp:20
virtual uint32 GetData(uint32) const
Definition: ZoneScript.h:51
Definition: boss_yogg_saron.cpp:308
Definition: boss_yogg_saron.cpp:147
Definition: SharedDefines.h:70
Creature *const me
Definition: CreatureAI.h:71
Definition: SharedDefines.h:72
uint32_t uint32
Definition: Define.h:150
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void ResetLootMode()
Definition: Creature.h:597
Definition: boss_yogg_saron.cpp:274
InstanceScript * _instance
Definition: boss_yogg_saron.cpp:1009
Definition: boss_yogg_saron.cpp:146
Definition: ulduar.h:390
Definition: SharedDefines.h:71

+ Here is the call graph for this function:

void boss_yogg_saron::boss_yogg_saronAI::SpellHit ( Unit ,
SpellInfo const spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

922  {
923  if (spell->Id == SPELL_IN_THE_MAWS_OF_THE_OLD_GOD)
924  me->AddLootMode(32);
925  }
Definition: boss_yogg_saron.cpp:267
void AddLootMode(uint16 lootMode)
Definition: Creature.h:595
Creature *const me
Definition: CreatureAI.h:71

+ Here is the call graph for this function:

void boss_yogg_saron::boss_yogg_saronAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from PassiveAI.

952  {
953  _events.Update(diff);
954 
956  return;
957 
958  while (uint32 eventId = _events.ExecuteEvent())
959  {
960  switch (eventId)
961  {
962  case EVENT_YELL_BOW_DOWN:
964  break;
965  case EVENT_SHADOW_BEACON:
969  break;
970  case EVENT_LUNATIC_GAZE:
974  break;
979  _events.ScheduleEvent(EVENT_DEAFENING_ROAR, urand(20000, 25000), 0, PHASE_THREE); // timer guessed
980  break;
981  default:
982  break;
983  }
984  }
985  }
EventMap _events
Definition: boss_yogg_saron.cpp:1008
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: Unit.h:565
Definition: boss_yogg_saron.cpp:150
Definition: boss_yogg_saron.cpp:308
Definition: boss_yogg_saron.cpp:397
Definition: boss_yogg_saron.cpp:152
Definition: boss_yogg_saron.cpp:44
Definition: boss_yogg_saron.cpp:310
Definition: boss_yogg_saron.cpp:149
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_yogg_saron.cpp:309
Definition: boss_yogg_saron.cpp:49
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
uint32_t uint32
Definition: Define.h:150
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: SharedDefines.h:4245
Definition: boss_yogg_saron.cpp:51
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
void Update(uint32 time)
Definition: EventMap.h:54
Definition: boss_yogg_saron.cpp:311
Definition: boss_yogg_saron.cpp:48
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
static void SendSound(Creature *source, uint32 sound, ChatMsg msgType, WorldObject const *whisperTarget=nullptr, CreatureTextRange range=TEXT_RANGE_NORMAL, Team team=TEAM_OTHER, bool gmOnly=false)
Definition: CreatureTextMgr.cpp:296
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
Definition: boss_yogg_saron.cpp:275

+ Here is the call graph for this function:

Member Data Documentation

EventMap boss_yogg_saron::boss_yogg_saronAI::_events
private
InstanceScript* boss_yogg_saron::boss_yogg_saronAI::_instance
private

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