AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
boss_deathbringer_saurfang::boss_deathbringer_saurfangAI Struct Reference
Inheritance diagram for boss_deathbringer_saurfang::boss_deathbringer_saurfangAI:
BossAI ScriptedAI CreatureAI UnitAI

Public Member Functions

 boss_deathbringer_saurfangAI (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
bool CanAIAttack (Unit const *) const override
 
void AttackStart (Unit *victim) override
 
void MoveInLineOfSight (Unit *) override
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void MovementInform (uint32 type, uint32 id) override
 
void SpellHitTarget (Unit *, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void DoAction (int32 action) override
 
uint32 GetData (uint32 type) const override
 
void EnterEvadeMode (EvadeReason why) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCastFinished (SpellInfo const *spell, SpellFinishReason reason) override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec, bool allowedWhileCasting=true)
 
void ProcessHealthCheck ()
 
void ScheduleEnrageTimer (uint32 spellId, Milliseconds timer, uint8 textId=0)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER) override
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
 ~ScriptedAI () override
 
void AttackStartNoMove (Unit *target)
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void JustDied (Unit *) override
 
void KilledUnit (Unit *) override
 
void JustSummoned (Creature *) override
 
void SummonedCreatureDespawn (Creature *) override
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void MovementInform (uint32, uint32) override
 
void OnPossess (bool)
 
bool IsInRoom (const Position *pos, Axis axis, bool above)
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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 DoPlayMusic (uint32 soundId, bool zone)
 
void DoAddThreat (Unit *unit, float amount)
 
void DoModifyThreatByPercent (Unit *unit, int32 pct)
 
void DoResetThreat (Unit *unit)
 
void DoResetThreatList ()
 
float DoGetThreat (Unit *unit)
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportPlayer (Unit *unit, Position pos)
 
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 IsUniqueTimedEventDone (uint32 id) const
 
void SetUniqueTimedEventDone (uint32 id)
 
void ResetUniqueTimedEvent (uint32 id)
 
void ClearUniqueTimedEventsDone ()
 
void ScheduleTimedEvent (Milliseconds timerMin, Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0ms, uint32 uniqueId=0)
 
void ScheduleUniqueTimedEvent (Milliseconds timer, std::function< void()> exec, uint32 uniqueId)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo const * SelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, uint32 powerCostMin, uint32 powerCostMax, 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)
 
virtual bool CheckEvadeIfOutOfCombatArea () 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
 
PlayerSelectTargetFromPlayerList (float maxdist, uint32 excludeAura=0, bool mustBeInLOS=false) const
 
void SetInvincibility (bool apply)
 
bool IsInvincible () const
 
void SetAutoAttackAllowed (bool allow)
 
bool IsAutoAttackAllowed () const
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0ms)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
WorldObjectGetSummoner () const
 Returns the summoner creature/object, if the creature is a temporary summon.
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 Called when unit is charmed.
 
void DoZoneInCombat (Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ==================
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields =======================================
 
virtual bool BeforeSpellClick (Unit *)
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
virtual bool CanBeSeen (Player const *)
 
virtual bool CanAlwaysBeDetectable (WorldObject const *)
 
virtual void PetStopAttack ()
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false, bool checkZ=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary const * GetBoundary () const
 
void SetBoundary (CreatureBoundary const *boundary, bool negativeBoundaries=false)
 
bool IsInBoundary (Position const *who=nullptr) const
 
virtual void CalculateThreat (Unit *, float &, SpellInfo const *)
 
virtual bool OnTeleportUnreacheablePlayer (Player *)
 
virtual void OnAuraRemove (AuraApplication *, AuraRemoveMode)
 
virtual void DistancingStarted ()
 
virtual void DistancingEnded ()
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid const &, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the following:
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 position, PREDICATE const &predicate)
 
virtual void JustEnteredCombat (Unit *)
 Called when the unit enters combat.
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 Called at any Damage to any victim (before damage apply)
 
virtual void HealReceived (Unit *, uint32 &)
 Called when the creature receives heal.
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 Called when the creature power updates.
 
virtual void HealDone (Unit *, uint32 &)
 Called when the unit heals.
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 Called during damage calculations.
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 Called during calculation when receiving periodic healing or damage (DoT or HoT)
 
void AttackStartCaster (Unit *victim, float dist)
 
SpellCastResult DoAddAuraToAllHostilePlayers (uint32 spellid)
 
SpellCastResult DoCast (uint32 spellId)
 
SpellCastResult DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastSelf (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastToAllHostilePlayers (uint32 spellid, bool triggered=false)
 To specify the caster as target if the spell is self-cast.
 
SpellCastResult DoCastVictim (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastAOE (uint32 spellId, bool triggered=false)
 
SpellCastResult DoCastRandomTarget (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false, bool withTank=true)
 Cast the spell on a random unit from the threat list.
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the top threat target, which may not be the current victim.
 
float DoGetSpellMaxRange (uint32 spellId, bool positive=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spell)
 
void DoSpellAttackToRandomTargetIfReady (uint32 spell, uint32 threatTablePosition=0, float dist=0.f, bool playerOnly=true)
 
virtual void SummonMovementInform (Creature *, uint32, uint32)
 Called when a summon reaches a waypoint or point movement finished.
 
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 sQuestComplete (Player *, Quest const *)
 
virtual void sQuestReward (Player *, Quest const *, uint32)
 
virtual void sOnGameEvent (bool, uint16)
 
virtual std::string GetDebugInfo () const
 

Private Attributes

uint32 _fallenChampionCastCount
 
bool _introDone
 
bool _frenzied
 
uint16 _transportCheckTimer
 

Additional Inherited Members

- Public Types inherited from ScriptedAI
enum class  Axis {
  AXIS_X ,
  AXIS_Y
}
 
- Public Types inherited from CreatureAI
enum  EvadeReason {
  EVADE_REASON_NO_HOSTILES ,
  EVADE_REASON_BOUNDARY ,
  EVADE_REASON_SEQUENCE_BREAK ,
  EVADE_REASON_NO_PATH ,
  EVADE_REASON_OTHER
}
 
- Static Public Member Functions inherited from CreatureAI
static bool IsInBounds (CreatureBoundary const &boundary, Position const *who)
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
float callForHelpRange
 
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
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 _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
SummonList summons
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
TaskScheduler scheduler
 
CreatureBoundary const * _boundary
 
bool _negateBoundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_deathbringer_saurfangAI()

boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::boss_deathbringer_saurfangAI ( Creature creature)
inline
247 {
248 ASSERT(creature->GetVehicleKit()); // we dont actually use it, just check if exists
249 }
#define ASSERT
Definition Errors.h:68
Definition ScriptedCreature.h:482
Vehicle * GetVehicleKit() const
Definition Unit.h:1904
@ DATA_DEATHBRINGER_SAURFANG
Definition icecrown_citadel.h:89

References ASSERT, and Unit::GetVehicleKit().

Member Function Documentation

◆ AttackStart()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::AttackStart ( Unit victim)
inlineoverridevirtual

Reimplemented from UnitAI.

325 {
326 if (!_introDone || me->IsImmuneToPC())
327 return;
328
330 }
bool IsImmuneToPC() const
Definition Unit.h:917
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
Creature * me
Definition ScriptedCreature.h:281
bool _introDone
Definition boss_deathbringer_saurfang.cpp:507

References _introDone, ScriptedAI::AttackStart(), Unit::IsImmuneToPC(), and ScriptedAI::me.

◆ CanAIAttack()

bool boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::CanAIAttack ( Unit const *  ) const
inlineoverridevirtual

Reimplemented from UnitAI.

320 {
321 return _introDone;
322 }

References _introDone.

◆ DamageTaken()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from UnitAI.

347 {
348 if (!_frenzied && HealthBelowPct(31)) // AT 30%, not below
349 {
350 _frenzied = true;
351 DoCast(me, SPELL_FRENZY, true);
353 }
354 }
@ SPELL_FRENZY
Definition boss_deathbringer_saurfang.cpp:102
@ SAY_FRENZY
Definition boss_deathbringer_saurfang.cpp:43
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:177
Talk
Definition hyjal.cpp:82
bool HealthBelowPct(uint32 pct) const
Definition ScriptedCreature.h:365
bool _frenzied
Definition boss_deathbringer_saurfang.cpp:508

References _frenzied, UnitAI::DoCast(), ScriptedAI::HealthBelowPct(), ScriptedAI::me, SAY_FRENZY, and SPELL_FRENZY.

◆ DoAction()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

464 {
465 switch (action)
466 {
469 {
473 if (Aura* bloodPower = me->GetAura(SPELL_BLOOD_POWER))
474 bloodPower->RecalculateAmountOfEffects();
475 }
476 break;
478 _introDone = true;
479 break;
480 default:
481 break;
482 }
483 }
@ POWER_ENERGY
Definition SharedDefines.h:283
@ ACTION_MARK_OF_THE_FALLEN_CHAMPION
Definition boss_deathbringer_saurfang.cpp:198
@ ACTION_INTRO_DONE
Definition boss_deathbringer_saurfang.cpp:195
@ SPELL_MARK_OF_THE_FALLEN_CHAMPION
Definition boss_deathbringer_saurfang.cpp:108
@ SPELL_BLOOD_POWER
Definition boss_deathbringer_saurfang.cpp:105
Definition SpellAuras.h:87
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:110
Definition Unit.h:655
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5700
void SetPower(Powers power, uint32 val, bool withPowerUpdate=true, bool fromRegenerate=false)
Definition Unit.cpp:15801
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition Unit.cpp:1194
uint32 _fallenChampionCastCount
Definition boss_deathbringer_saurfang.cpp:506

References _fallenChampionCastCount, _introDone, ACTION_INTRO_DONE, ACTION_MARK_OF_THE_FALLEN_CHAMPION, Unit::CastSpell(), Unit::GetAura(), ScriptedAI::me, POWER_ENERGY, Random, UnitAI::SelectTarget(), Unit::SetPower(), SPELL_BLOOD_POWER, and SPELL_MARK_OF_THE_FALLEN_CHAMPION.

◆ EnterEvadeMode()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

499 {
502 creature->AI()->DoAction(ACTION_EVADE);
503 }
@ ACTION_EVADE
Definition boss_deathbringer_saurfang.cpp:196
InstanceScript *const instance
Definition ScriptedCreature.h:489
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition ScriptedCreature.h:521
Definition Creature.h:47
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
@ DATA_SAURFANG_EVENT_NPC
Definition icecrown_citadel.h:104
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210

References ACTION_EVADE, DATA_SAURFANG_EVENT_NPC, BossAI::EnterEvadeMode(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), BossAI::instance, and ScriptedAI::me.

Referenced by JustEngagedWith(), and UpdateAI().

◆ GetData()

uint32 boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

486 {
487 if (type == DATA_MADE_A_MESS)
488 {
489 if (_fallenChampionCastCount < RAID_MODE<uint32>(3, 5, 3, 5))
490 return 1;
491 }
492 else if (type == FALLEN_CHAMPION_CAST_COUNT)
494
495 return 0;
496 }
#define FALLEN_CHAMPION_CAST_COUNT
Definition boss_deathbringer_saurfang.cpp:202
#define DATA_MADE_A_MESS
Definition boss_deathbringer_saurfang.cpp:201

References _fallenChampionCastCount, DATA_MADE_A_MESS, and FALLEN_CHAMPION_CAST_COUNT.

◆ JustDied()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

309 {
310 _JustDied();
313
316 creature->AI()->DoAction(ACTION_START_OUTRO);
317 }
@ ACTION_START_OUTRO
Definition boss_deathbringer_saurfang.cpp:193
@ SPELL_ACHIEVEMENT
Definition boss_deathbringer_saurfang.cpp:118
@ SAY_DEATH
Definition boss_deathbringer_saurfang.cpp:45
void _JustDied()
Definition ScriptedCreature.cpp:654
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:683

References BossAI::_JustDied(), ACTION_START_OUTRO, DATA_SAURFANG_EVENT_NPC, UnitAI::DoCast(), InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), BossAI::instance, ScriptedAI::me, SAY_DEATH, SPELL_ACHIEVEMENT, and SPELL_MARK_OF_THE_FALLEN_CHAMPION.

◆ JustEngagedWith()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from CreatureAI.

273 {
274 if (!_introDone)
275 {
276 me->CombatStop();
277 return;
278 }
279
280 // pussywizard: without this, the aura is not recalculated the first time
283
285 {
288 return;
289 }
290
291 // oh just screw intro, enter combat - no exploits please
292 me->setActive(true);
295
296 events.Reset();
297 events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 30s);
298 events.ScheduleEvent(EVENT_BERSERK, (IsHeroic() ? 6min : 8min));
299 events.ScheduleEvent(EVENT_BOILING_BLOOD, 15s + 500ms, 0);
300 events.ScheduleEvent(EVENT_BLOOD_NOVA, 17s, 0);
301 events.ScheduleEvent(EVENT_RUNE_OF_BLOOD, 20s, 0);
302
306 }
@ IN_PROGRESS
Definition InstanceScript.h:59
@ EVENT_SUMMON_BLOOD_BEAST
Definition boss_deathbringer_saurfang.cpp:144
@ EVENT_BERSERK
Definition boss_deathbringer_saurfang.cpp:143
@ EVENT_BLOOD_NOVA
Definition boss_deathbringer_saurfang.cpp:147
@ EVENT_BOILING_BLOOD
Definition boss_deathbringer_saurfang.cpp:146
@ EVENT_RUNE_OF_BLOOD
Definition boss_deathbringer_saurfang.cpp:148
@ SAY_AGGRO
Definition boss_deathbringer_saurfang.cpp:39
events
Definition boss_sartura.cpp:43
@ EVADE_REASON_OTHER
Definition CreatureAI.h:94
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:103
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:385
void DoCastSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:694
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition InstanceScript.h:255
void CombatStop(bool includingCast=false)
Definition Unit.cpp:10640
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5028
void setActive(bool isActiveObject)
Definition Object.cpp:1058
@ LIGHT_S_HAMMER_TELEPORT
Definition icecrown_citadel.h:74
bool IsHeroic() const
Definition ScriptedCreature.h:380
void EnterEvadeMode(EvadeReason why) override
Definition boss_deathbringer_saurfang.cpp:498

References _fallenChampionCastCount, _introDone, InstanceScript::CheckRequiredBosses(), Unit::CombatStop(), DATA_DEATHBRINGER_SAURFANG, UnitAI::DoCast(), InstanceScript::DoCastSpellOnPlayers(), InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), CreatureAI::DoZoneInCombat(), EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, EVENT_BERSERK, EVENT_BLOOD_NOVA, EVENT_BOILING_BLOOD, EVENT_RUNE_OF_BLOOD, EVENT_SUMMON_BLOOD_BEAST, IN_PROGRESS, BossAI::instance, ScriptedAI::IsHeroic(), LIGHT_S_HAMMER_TELEPORT, ScriptedAI::me, Unit::RemoveAurasDueToSpell(), SAY_AGGRO, WorldObject::setActive(), InstanceScript::SetBossState(), SPELL_BLOOD_POWER, SPELL_MARK_OF_THE_FALLEN_CHAMPION, and Object::ToPlayer().

◆ JustReachedHome()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from CreatureAI.

335 {
338 }
@ FAIL
Definition InstanceScript.h:60
void _JustReachedHome()
Definition ScriptedCreature.h:529

References BossAI::_JustReachedHome(), DATA_DEATHBRINGER_SAURFANG, FAIL, BossAI::instance, and InstanceScript::SetBossState().

◆ JustSummoned()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

357 {
358 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true, false))
359 summon->AI()->AttackStart(target);
360
361 //if (IsHeroic())
362 // DoCast(summon, SPELL_SCENT_OF_BLOOD);
363
364 summon->AI()->DoCast(summon, SPELL_BLOOD_LINK_BEAST, true);
365 summon->AI()->DoCast(summon, SPELL_RESISTANT_SKIN, true);
366 summons.Summon(summon);
367 DoZoneInCombat(summon);
368 }
@ SPELL_RESISTANT_SKIN
Definition boss_deathbringer_saurfang.cpp:114
@ SPELL_BLOOD_LINK_BEAST
Definition boss_deathbringer_saurfang.cpp:113
SummonList summons
Definition ScriptedCreature.h:534
CreatureAI * AI() const
Definition Creature.h:145
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
virtual void AttackStart(Unit *)
Definition UnitAI.cpp:27

References Creature::AI(), UnitAI::AttackStart(), UnitAI::DoCast(), CreatureAI::DoZoneInCombat(), Random, UnitAI::SelectTarget(), SPELL_BLOOD_LINK_BEAST, SPELL_RESISTANT_SKIN, SummonList::Summon(), and BossAI::summons.

◆ KilledUnit()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

341 {
342 if (victim->IsPlayer())
343 Talk(SAY_KILL);
344 }
@ SAY_KILL
Definition boss_deathbringer_saurfang.cpp:42
bool IsPlayer() const
Definition Object.h:200

References Object::IsPlayer(), and SAY_KILL.

◆ MoveInLineOfSight()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::MoveInLineOfSight ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

332{}

◆ MovementInform()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

376 {
377 if (type != POINT_MOTION_TYPE && id != POINT_SAURFANG)
378 return;
379
381 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ POINT_SAURFANG
Definition boss_deathbringer_saurfang.cpp:206
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition InstanceScript.cpp:125
@ GO_SAURFANG_S_DOOR
Definition icecrown_citadel.h:412

References InstanceScript::GetGuidData(), GO_SAURFANG_S_DOOR, InstanceScript::HandleGameObject(), BossAI::instance, POINT_MOTION_TYPE, and POINT_SAURFANG.

◆ Reset()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

252 {
253 _Reset();
254 me->SetImmuneToAll(true);
256 events.Reset();
257 _introDone = false;
258 _frenzied = false;
262 DoCast(me, SPELL_ZERO_POWER, true);
263 DoCast(me, SPELL_BLOOD_LINK, true);
270 }
@ REACT_DEFENSIVE
Definition Unit.h:556
@ SPELL_ZERO_POWER
Definition boss_deathbringer_saurfang.cpp:94
@ SPELL_BLOOD_LINK
Definition boss_deathbringer_saurfang.cpp:96
@ SPELL_RUNE_OF_BLOOD_S
Definition boss_deathbringer_saurfang.cpp:98
@ SPELL_MARK_OF_THE_FALLEN_CHAMPION_S
Definition boss_deathbringer_saurfang.cpp:97
@ SPELL_BERSERK
Definition boss_maiden_of_virtue.cpp:36
void _Reset()
Definition ScriptedCreature.cpp:634
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:99
void SetImmuneToAll(bool apply, bool keepCombat=false)
Definition Unit.h:914
uint16 _transportCheckTimer
Definition boss_deathbringer_saurfang.cpp:509

References _fallenChampionCastCount, _frenzied, _introDone, BossAI::_Reset(), _transportCheckTimer, UnitAI::DoCast(), InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), BossAI::instance, ScriptedAI::me, POWER_ENERGY, REACT_DEFENSIVE, Unit::RemoveAurasDueToSpell(), Unit::SetImmuneToAll(), Unit::SetPower(), Creature::SetReactState(), SPELL_BERSERK, SPELL_BLOOD_LINK, SPELL_BLOOD_POWER, SPELL_FRENZY, SPELL_MARK_OF_THE_FALLEN_CHAMPION, SPELL_MARK_OF_THE_FALLEN_CHAMPION_S, SPELL_RUNE_OF_BLOOD_S, and SPELL_ZERO_POWER.

◆ SpellHitTarget()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::SpellHitTarget ( Unit ,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

384 {
385 switch (spell->Id)
386 {
389 break;
390 }
391 }
@ SAY_MARK_OF_THE_FALLEN_CHAMPION
Definition boss_deathbringer_saurfang.cpp:40

References SpellInfo::Id, SAY_MARK_OF_THE_FALLEN_CHAMPION, and SPELL_MARK_OF_THE_FALLEN_CHAMPION.

◆ SummonedCreatureDespawn()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::SummonedCreatureDespawn ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

371 {
372 summons.Despawn(summon);
373 }
void Despawn(Creature const *summon)
Definition ScriptedCreature.h:89

References SummonList::Despawn(), and BossAI::summons.

◆ UpdateAI()

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::UpdateAI ( uint32  )
inlineoverridevirtual

Use to start attacking a target. Called just before JustEngagedWith()

Implements UnitAI.

394 {
395 if (!UpdateVictim())
396 return;
397
398 events.Update(diff);
399
400 if (_transportCheckTimer <= diff)
401 {
403 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
404 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
405 if (Player* p = itr->GetSource())
406 if (p->GetTransport())
407 {
409 return;
410 }
411 }
412 else
413 _transportCheckTimer -= diff;
414
416 return;
417
418 if (uint32 eventId = events.ExecuteEvent())
419 {
420 switch (eventId)
421 {
423 for (uint32 i10 = 0; i10 < 2; ++i10)
425 if (Is25ManRaid())
426 for (uint32 i25 = 0; i25 < 3; ++i25)
429 events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 40s);
430 if (IsHeroic())
431 events.ScheduleEvent(EVENT_BLOOD_BEAST_SCENT_OF_BLOOD, 10s);
432 break;
436 break;
437 case EVENT_BLOOD_NOVA:
438 {
439 me->CastSpell((Unit*)nullptr, SPELL_BLOOD_NOVA_TRIGGER, false);
440 events.ScheduleEvent(EVENT_BLOOD_NOVA, 20s, 25s);
441 break;
442 }
445 events.ScheduleEvent(EVENT_RUNE_OF_BLOOD, 20s, 25s);
446 break;
448 me->CastSpell((Unit*)nullptr, SPELL_BOILING_BLOOD, false);
449 events.ScheduleEvent(EVENT_BOILING_BLOOD, 15s, 20s);
450 break;
451 case EVENT_BERSERK:
454 break;
455 default:
456 break;
457 }
458 }
459
461 }
std::uint32_t uint32
Definition Define.h:107
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ ACTION_GAIN_SCENT_OF_BLOOD
Definition boss_deathbringer_saurfang.cpp:197
@ SPELL_BOILING_BLOOD
Definition boss_deathbringer_saurfang.cpp:109
@ SPELL_BLOOD_NOVA_TRIGGER
Definition boss_deathbringer_saurfang.cpp:103
@ SPELL_SUMMON_BLOOD_BEAST
Definition boss_deathbringer_saurfang.cpp:100
@ SPELL_RUNE_OF_BLOOD
Definition boss_deathbringer_saurfang.cpp:110
@ SPELL_SUMMON_BLOOD_BEAST_25_MAN
Definition boss_deathbringer_saurfang.cpp:101
@ EVENT_BLOOD_BEAST_SCENT_OF_BLOOD
Definition boss_deathbringer_saurfang.cpp:145
@ EMOTE_SCENT_OF_BLOOD
Definition boss_deathbringer_saurfang.cpp:46
@ SAY_BLOOD_BEASTS
Definition boss_deathbringer_saurfang.cpp:41
@ SAY_BERSERK
Definition boss_deathbringer_saurfang.cpp:44
bool UpdateVictim()
Definition CreatureAI.cpp:277
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:326
Definition Player.h:1071
void DoAction(int32 info, uint16 max=0)
Definition ScriptedCreature.h:102
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:39
SpellCastResult DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:276
bool HasUnitState(const uint32 f) const
Definition Unit.h:726
Map * GetMap() const
Definition Object.h:620
bool Is25ManRaid() const
Definition ScriptedCreature.h:386

References _transportCheckTimer, ACTION_GAIN_SCENT_OF_BLOOD, MapRefMgr::begin(), Unit::CastSpell(), SummonList::DoAction(), UnitAI::DoCast(), UnitAI::DoCastVictim(), UnitAI::DoMeleeAttackIfReady(), EMOTE_SCENT_OF_BLOOD, MapRefMgr::end(), EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, EVENT_BERSERK, EVENT_BLOOD_BEAST_SCENT_OF_BLOOD, EVENT_BLOOD_NOVA, EVENT_BOILING_BLOOD, EVENT_RUNE_OF_BLOOD, EVENT_SUMMON_BLOOD_BEAST, WorldObject::GetMap(), Map::GetPlayers(), Unit::HasUnitState(), ScriptedAI::Is25ManRaid(), ScriptedAI::IsHeroic(), ScriptedAI::me, SAY_BERSERK, SAY_BLOOD_BEASTS, SPELL_BERSERK, SPELL_BLOOD_NOVA_TRIGGER, SPELL_BOILING_BLOOD, SPELL_RUNE_OF_BLOOD, SPELL_SUMMON_BLOOD_BEAST, SPELL_SUMMON_BLOOD_BEAST_25_MAN, BossAI::summons, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _fallenChampionCastCount

uint32 boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_fallenChampionCastCount
private

◆ _frenzied

bool boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_frenzied
private

Referenced by DamageTaken(), and Reset().

◆ _introDone

bool boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_introDone
private

◆ _transportCheckTimer

uint16 boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_transportCheckTimer
private

Referenced by Reset(), and UpdateAI().


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