TrinityCore
Loading...
Searching...
No Matches
boss_sartharion Struct Reference

Public Member Functions

 boss_sartharion (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void JustReachedHome () override
 
void JustEngagedWith (Unit *who) override
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *who) override
 
void AddDrakeLootMode ()
 
void DrakeRespawn ()
 
void FetchDragons ()
 
void CallDragon (uint32 dataId)
 
uint32 GetData (uint32 type) const override
 
void CastLavaStrikeOnTarget (Unit *target)
 
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 UpdateAI (uint32 diff) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
bool CanAIAttack (Unit const *target) const override
 
uint32 GetBossId () const
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ScriptedAI (Creature *creature, uint32 scriptId)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
virtual void UpdateAI (uint32 diff) override
 
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 AddThreat (Unit *victim, float amount, Unit *who=nullptr)
 
void ModifyThreatByPercent (Unit *victim, int32 pct, Unit *who=nullptr)
 
void ResetThreat (Unit *victim, Unit *who=nullptr)
 
void ResetThreatList (Unit *who=nullptr)
 
float GetThreat (Unit const *victim, Unit const *who=nullptr)
 
void ForceCombatStop (Creature *who, bool reset=true)
 
void ForceCombatStopForCreatureEntry (uint32 entry, float maxSearchRange=250.0f, bool samePhase=true, bool reset=true)
 
void ForceCombatStopForCreatureEntry (std::vector< uint32 > creatureEntries, float maxSearchRange=250.0f, bool samePhase=true, bool reset=true)
 
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)
 
UnitDoSelectBelowHpPctFriendlyWithEntry (uint32 entry, float range, uint8 hpPct=1, bool excludeSelf=true)
 
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, Milliseconds despawntime)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (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 >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
- Public Member Functions inherited from CreatureAI
 CreatureAI (Creature *creature, uint32 scriptId={})
 
virtual ~CreatureAI ()
 
uint32 GetId () const
 
bool IsEngaged () const
 
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual void EnterEvadeMode (EvadeReason why=EvadeReason::Other)
 
void JustEnteredCombat (Unit *) override
 
virtual void JustStartedThreateningMe (Unit *who)
 
virtual void JustEngagedWith (Unit *)
 
virtual void OnHealthDepleted (Unit *, bool)
 
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 JustSummonedGameobject (GameObject *)
 
virtual void SummonedGameobjectDespawn (GameObject *)
 
virtual void JustRegisteredDynObject (DynamicObject *)
 
virtual void JustUnregisteredDynObject (DynamicObject *)
 
virtual void JustRegisteredAreaTrigger (AreaTrigger *)
 
virtual void JustUnregisteredAreaTrigger (AreaTrigger *)
 
virtual void SpellHit (WorldObject *, SpellInfo const *)
 
virtual void SpellHitTarget (WorldObject *, SpellInfo const *)
 
virtual void OnSpellCast (SpellInfo const *)
 
virtual void OnSpellFailed (SpellInfo const *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void OnChannelFinished (SpellInfo const *)
 
virtual bool IsEscorted () const
 
virtual void JustAppeared ()
 
virtual void MovementInform (uint32, uint32)
 
void OnCharmed (bool isNew) override
 
virtual void JustReachedHome ()
 
void DoZoneInCombat ()
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual Optional< QuestGiverStatusGetDialogStatus (Player const *player)
 == Gossip system ================================
 
virtual bool OnGossipHello (Player *)
 
virtual bool OnGossipSelect (Player *, uint32, uint32)
 
virtual bool OnGossipSelectCode (Player *, uint32, uint32, char const *)
 
virtual void OnQuestAccept (Player *, Quest const *)
 
virtual void OnQuestReward (Player *, Quest const *, LootItemType, uint32)
 
virtual void WaypointStarted (uint32, uint32)
 == Waypoints system =============================
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, uint32)
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual void OnSpellClick (Unit *, bool)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual PlayerAIGetAIForCharmedPlayer (Player *)
 
int32 VisualizeBoundary (Seconds duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
- 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 diff)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool isNew)
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 offset, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset=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 offset, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 
virtual void JustExitedCombat ()
 
virtual void OnDespawn ()
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellInfo const *)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastSelf (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastVictim (uint32 spellId, CastSpellExtraArgs const &args={})
 
SpellCastResult DoCastAOE (uint32 spellId, CastSpellExtraArgs const &args={})
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
virtual void OnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

bool _isBerserk
 
bool _isSoftEnraged
 
bool _isHardEnraged
 
uint8 drakeCount
 

Additional Inherited Members

- Static Public Member Functions inherited from CreatureAI
static void DoZoneInCombat (Creature *creature)
 
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- 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 std::unordered_map< std::pair< uint32, Difficulty >, AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith (Unit *who)
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade (Seconds delayToRespawn=30s, Creature *who=nullptr)
 
void TeleportCheaters ()
 
- Protected Member Functions inherited from CreatureAI
bool UpdateVictim ()
 
CreatureDoSummon (uint32 entry, Position const &pos, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
CreatureDoSummonFlyer (uint32 entry, WorldObject *obj, float flightZ, float radius=5.0f, Milliseconds despawnTime=30s, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EvadeReason::Other)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Definition at line 129 of file boss_sartharion.cpp.

Constructor & Destructor Documentation

◆ boss_sartharion()

boss_sartharion::boss_sartharion ( Creature creature)
inline

Definition at line 131 of file boss_sartharion.cpp.

131 : BossAI(creature, DATA_SARTHARION)
132 {
133 Initialize();
134 }
@ DATA_SARTHARION
+ Here is the call graph for this function:

Member Function Documentation

◆ AddDrakeLootMode()

void boss_sartharion::AddDrakeLootMode ( )
inline

Definition at line 206 of file boss_sartharion.cpp.

207 {
208 if (me->HasLootMode(LOOT_MODE_HARD_MODE_2)) // Has two Drake loot modes
209 me->AddLootMode(LOOT_MODE_HARD_MODE_3); // Add 3rd Drake loot mode
210 else if (me->HasLootMode(LOOT_MODE_HARD_MODE_1)) // Has one Drake loot mode
211 me->AddLootMode(LOOT_MODE_HARD_MODE_2); // Add 2nd Drake loot mode
212 else // Has no Drake loot modes
213 me->AddLootMode(LOOT_MODE_HARD_MODE_1); // Add 1st Drake loot mode
214 }
@ LOOT_MODE_HARD_MODE_3
Definition: SharedDefines.h:80
@ LOOT_MODE_HARD_MODE_1
Definition: SharedDefines.h:78
@ LOOT_MODE_HARD_MODE_2
Definition: SharedDefines.h:79
Creature *const me
Definition: CreatureAI.h:61
void AddLootMode(uint16 lootMode)
Definition: Creature.h:265
bool HasLootMode(uint16 lootMode)
Definition: Creature.h:263
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CallDragon()

void boss_sartharion::CallDragon ( uint32  dataId)
inline

Definition at line 339 of file boss_sartharion.cpp.

340 {
342 {
343 if (temp->IsAlive() && !temp->GetVictim())
344 {
345 temp->SetWalk(false);
346
347 temp->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
348
349 uint8 textId = 0;
350
351 switch (temp->GetEntry())
352 {
353 case NPC_TENEBRON:
355 temp->AddAura(SPELL_POWER_OF_TENEBRON, temp);
356 temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, TenebronPositions[1]);
357 break;
358 case NPC_SHADRON:
360 temp->AddAura(SPELL_POWER_OF_SHADRON, temp);
361 temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, ShadronPositions[1]);
362 break;
363 case NPC_VESPERON:
365 temp->AddAura(SPELL_POWER_OF_VESPERON, temp);
366 temp->GetMotionMaster()->MovePoint(POINT_ID_LAND, VesperonPositions[1]);
367 break;
368 }
369
370 Talk(textId);
371 }
372 }
373 }
uint8_t uint8
Definition: Define.h:145
@ UNIT_FLAG_NON_ATTACKABLE
Definition: UnitDefines.h:140
@ SPELL_POWER_OF_VESPERON
@ SPELL_POWER_OF_SHADRON
@ POINT_ID_LAND
@ SAY_SARTHARION_CALL_TENEBRON
@ SPELL_POWER_OF_TENEBRON
@ SAY_SARTHARION_CALL_VESPERON
@ SAY_SARTHARION_CALL_SHADRON
Position const VesperonPositions[]
Position const TenebronPositions[]
Position const ShadronPositions[]
InstanceScript *const instance
virtual ObjectGuid GetGuidData(uint32 type) const override
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
@ NPC_VESPERON
@ NPC_SHADRON
@ NPC_TENEBRON
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CastLavaStrikeOnTarget()

void boss_sartharion::CastLavaStrikeOnTarget ( Unit target)
inline

Definition at line 385 of file boss_sartharion.cpp.

386 {
387 std::list<Creature*> fireCyclonesList;
390 Cell::VisitAllObjects(me, searcher, 200.0f);
391
392 if (fireCyclonesList.empty())
393 return;
394
395 Trinity::Containers::SelectRandomContainerElement(fireCyclonesList)->CastSpell(target, SPELL_LAVA_STRIKE, true);
396 }
@ SPELL_LAVA_STRIKE
@ NPC_FIRE_CYCLONE
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
Definition: Containers.h:109
static void VisitAllObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
Definition: CellImpl.h:203
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrakeRespawn()

void boss_sartharion::DrakeRespawn ( )
inline

Definition at line 216 of file boss_sartharion.cpp.

217 {
219 {
220 tenebron->SetHomePosition(3239.07f, 657.235f, 86.8775f, 4.74729f);
221 if (tenebron->IsAlive())
222 {
223 tenebron->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
224 tenebron->GetMotionMaster()->MoveTargetedHome();
225 }
226 else
227 {
229 {
230 tenebron->Respawn();
231 tenebron->GetMotionMaster()->MoveTargetedHome();
232 tenebron->AI()->SetData(DATA_CAN_LOOT, 0);
233 }
234 }
235 }
236
238 {
239 shadron->SetHomePosition(3363.06f, 525.28f, 98.362f, 4.76475f);
240 if (shadron->IsAlive())
241 {
242 shadron->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
243 shadron->GetMotionMaster()->MoveTargetedHome();
244 }
245 else
246 {
248 {
249 shadron->Respawn();
250 shadron->GetMotionMaster()->MoveTargetedHome();
251 shadron->AI()->SetData(DATA_CAN_LOOT, 0);
252 }
253 }
254 }
255
257 {
258 vesperon->SetHomePosition(3145.68f, 520.71f, 89.7f, 4.64258f);
259 if (vesperon->IsAlive())
260 {
261 vesperon->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
262 vesperon->GetMotionMaster()->MoveTargetedHome();
263 }
264 else
265 {
267 {
268 vesperon->Respawn();
269 vesperon->GetMotionMaster()->MoveTargetedHome();
270 vesperon->AI()->SetData(DATA_CAN_LOOT, 0);
271 }
272 }
273 }
274 }
@ DONE
@ DATA_CAN_LOOT
EncounterState GetBossState(uint32 id) const
@ DATA_VESPERON
@ DATA_TENEBRON
@ DATA_SHADRON
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FetchDragons()

void boss_sartharion::FetchDragons ( )
inline

Definition at line 276 of file boss_sartharion.cpp.

277 {
278 me->ResetLootMode();
279 drakeCount = 0;
280
281 //if at least one of the dragons are alive and are being called
282 bool _canUseWill = false;
283
285 {
286 if (fetchTene->IsAlive() && !fetchTene->GetVictim())
287 {
288 _canUseWill = true;
289 if (!fetchTene->IsInCombat())
290 {
293 ++drakeCount;
294 }
295 fetchTene->GetMotionMaster()->MovePoint(POINT_ID_INIT, TenebronPositions[0]);
296
297 fetchTene->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
298 }
299 }
300
302 {
303 if (fetchShad->IsAlive() && !fetchShad->GetVictim())
304 {
305 _canUseWill = true;
306 if (!fetchShad->IsInCombat())
307 {
310 ++drakeCount;
311 }
312 fetchShad->GetMotionMaster()->MovePoint(POINT_ID_INIT, ShadronPositions[0]);
313
314 fetchShad->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
315 }
316 }
317
319 {
320 if (fetchVesp->IsAlive() && !fetchVesp->GetVictim())
321 {
322 _canUseWill = true;
323 if (!fetchVesp->IsInCombat())
324 {
327 ++drakeCount;
328 }
329 fetchVesp->GetMotionMaster()->MovePoint(POINT_ID_INIT, VesperonPositions[0]);
330
331 fetchVesp->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
332 }
333 }
334
335 if (_canUseWill)
337 }
@ POINT_ID_INIT
@ SPELL_WILL_OF_SARTHARION
void ResetLootMode()
Definition: Creature.h:267
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:124
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetData()

uint32 boss_sartharion::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

Definition at line 375 of file boss_sartharion.cpp.

376 {
377 if (type == TWILIGHT_ACHIEVEMENTS)
378 return drakeCount;
379
380 return 0;
381 }
@ TWILIGHT_ACHIEVEMENTS

◆ Initialize()

void boss_sartharion::Initialize ( )
inline

Definition at line 136 of file boss_sartharion.cpp.

137 {
138 _isBerserk = false;
139 _isSoftEnraged = false;
140 _isHardEnraged = false;
141 drakeCount = 0;
142 }
+ Here is the caller graph for this function:

◆ JustDied()

void boss_sartharion::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

Definition at line 180 of file boss_sartharion.cpp.

181 {
183 _JustDied();
184
186 if (tenebron->IsAlive())
187 tenebron->DisappearAndDie();
188
190 if (shadron->IsAlive())
191 shadron->DisappearAndDie();
192
194 if (vesperon->IsAlive())
195 vesperon->DisappearAndDie();
196 }
@ SAY_SARTHARION_DEATH
void _JustDied()
+ Here is the call graph for this function:

◆ JustEngagedWith()

void boss_sartharion::JustEngagedWith ( Unit who)
inlineoverridevirtual

Reimplemented from BossAI.

Definition at line 162 of file boss_sartharion.cpp.

163 {
167
168 FetchDragons();
169
178 }
@ SAY_SARTHARION_AGGRO
@ EVENT_CLEAVE_ATTACK
@ EVENT_CALL_VESPERON
@ EVENT_FLAME_BREATH
@ EVENT_TAIL_SWEEP
@ EVENT_LAVA_STRIKE
@ EVENT_CALL_TENEBRON
@ EVENT_CALL_SHADRON
@ EVENT_FLAME_TSUNAMI
void JustEngagedWith(Unit *who) override
EventMap events
void DoZoneInCombat()
Definition: CreatureAI.h:161
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
+ Here is the call graph for this function:

◆ JustReachedHome()

void boss_sartharion::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

Definition at line 157 of file boss_sartharion.cpp.

158 {
159 _Reset();
160 }
+ Here is the call graph for this function:

◆ KilledUnit()

void boss_sartharion::KilledUnit ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

Definition at line 198 of file boss_sartharion.cpp.

199 {
200 if (who->GetTypeId() == TYPEID_PLAYER)
202 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:41
@ SAY_SARTHARION_SLAY
TypeID GetTypeId() const
Definition: Object.h:172
+ Here is the call graph for this function:

◆ Reset()

void boss_sartharion::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

Definition at line 144 of file boss_sartharion.cpp.

145 {
146 Initialize();
147
150
151 me->SetHomePosition(3246.57f, 551.263f, 58.6164f, 4.66003f);
152
153 DrakeRespawn();
155 }
@ NOT_STARTED
@ SPELL_TWILIGHT_REVENGE
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:330
virtual bool SetBossState(uint32 id, EncounterState state)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4568
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3735
@ DATA_PORTAL_OPEN
+ Here is the call graph for this function:

◆ UpdateAI()

void boss_sartharion::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

Definition at line 398 of file boss_sartharion.cpp.

399 {
400 if (!UpdateVictim())
401 return;
402
403 events.Update(diff);
404
405 while (uint32 eventId = events.ExecuteEvent())
406 {
407 switch (eventId)
408 {
410 if (!_isHardEnraged)
411 {
412 DoCast(me, SPELL_PYROBUFFET, true);
413 _isHardEnraged = true;
414 }
415 break;
418 switch (urand(0, 1))
419 {
420 case 0:
421 {
423 right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction);
425 right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction);
427 right3->GetMotionMaster()->MovePoint(0, FlameRight3Direction);
428 break;
429 }
430 case 1:
431 {
433 left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction);
435 left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction);
436 break;
437 }
438 }
440 break;
445 break;
446 case EVENT_TAIL_SWEEP:
449 break;
453 break;
455 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
456 {
458 if (urand(0, 5) == 0)
460 }
461 if (_isSoftEnraged)
463 else
465 break;
468 break;
471 break;
474 break;
475 default:
476 break;
477 }
478 }
479
480 // At 35% spell will target dragons, if they are still alive.
481 if (!_isBerserk && !HealthAbovePct(35))
482 {
484 {
487 _isBerserk = true;
488 }
489 }
490
491 // Soft Enrage used while determining Lava Strike cooldown.
492 if (!_isSoftEnraged && HealthBelowPct(10))
493 {
494 _isSoftEnraged = true;
495 }
496
498 }
uint32_t uint32
Definition: Define.h:143
@ TEMPSUMMON_TIMED_DESPAWN
Definition: ObjectDefines.h:65
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:42
@ SAY_SARTHARION_BERSERK
@ SPELL_CLEAVE
@ NPC_FLAME_TSUNAMI
@ SPELL_FLAME_BREATH
@ WHISPER_LAVA_CHURN
@ SAY_SARTHARION_BREATH
@ SPELL_TAIL_LASH
@ SAY_SARTHARION_SPECIAL
@ SPELL_PYROBUFFET
@ SPELL_BERSERK
Position const FlameLeft1Direction
Position const FlameRight1Direction
Position const FlameRight1Spawn
Position const FlameLeft1Spawn
Position const FlameRight3Spawn
@ EVENT_HARD_ENRAGE
Position const FlameLeft2Spawn
Position const FlameRight2Spawn
Position const FlameRight3Direction
Position const FlameRight2Direction
Position const FlameLeft2Direction
bool UpdateVictim()
Definition: CreatureAI.cpp:245
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:54
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:61
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:215
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:114
Definition: Unit.h:747
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2012
bool HealthAbovePct(uint32 pct) const
bool HealthBelowPct(uint32 pct) const
void CallDragon(uint32 dataId)
void CastLavaStrikeOnTarget(Unit *target)
+ Here is the call graph for this function:

Member Data Documentation

◆ _isBerserk

bool boss_sartharion::_isBerserk
private

Definition at line 501 of file boss_sartharion.cpp.

◆ _isHardEnraged

bool boss_sartharion::_isHardEnraged
private

Definition at line 503 of file boss_sartharion.cpp.

◆ _isSoftEnraged

bool boss_sartharion::_isSoftEnraged
private

Definition at line 502 of file boss_sartharion.cpp.

◆ drakeCount

uint8 boss_sartharion::drakeCount
private

Definition at line 504 of file boss_sartharion.cpp.


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