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

Public Member Functions

 boss_deathbringer_saurfangAI (Creature *creature)
 
void Initialize ()
 
void Reset () override
 
void EnterCombat (Unit *who) override
 
void JustDied (Unit *) override
 
void AttackStart (Unit *victim) override
 
void EnterEvadeMode (EvadeReason why) override
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void DamageTaken (Unit *, uint32 &damage) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDies (Creature *summon, Unit *) override
 
void MovementInform (uint32 type, uint32 id) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void SpellHit (Unit *, SpellInfo const *spell) override
 
void UpdateAI (uint32 diff) override
 
uint32 GetData (uint32 type) const override
 
void DoAction (int32 action) override
 
bool CanAIAttack (Unit const *target) const 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 ()
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void OnPossess (bool)
 
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 IsSummonedBy (Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
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 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)
 

Static Public Attributes

static uint32 const FightWonValue = 100000
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 

Private Attributes

uint32 _fallenChampionCastCount
 
bool _introDone
 
bool _frenzied
 
bool _dead
 

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
 
- 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_deathbringer_saurfang::boss_deathbringer_saurfangAI::boss_deathbringer_saurfangAI ( Creature creature)
inline
255  {
256  Initialize();
257  ASSERT(creature->GetVehicleKit()); // we dont actually use it, just check if exists
258  _introDone = false;
260  }
Definition: icecrown_citadel.h:78
uint32 _fallenChampionCastCount
Definition: boss_deathbringer_saurfang.cpp:607
bool _introDone
Definition: boss_deathbringer_saurfang.cpp:608
#define ASSERT
Definition: Errors.h:55
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444
void Initialize()
Definition: boss_deathbringer_saurfang.cpp:262
Vehicle * GetVehicleKit() const
Definition: Unit.h:2165

+ Here is the call graph for this function:

Member Function Documentation

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

Reimplemented from ScriptedAI.

328  {
330  return;
331 
332  ScriptedAI::AttackStart(victim);
333  }
Definition: Unit.h:681
Creature *const me
Definition: CreatureAI.h:71
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
Definition: UpdateFields.h:109
bool HasFlag(uint16 index, uint32 flag) const
Definition: Object.cpp:1239

+ Here is the call graph for this function:

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

Reimplemented from BossAI.

597  {
598  if (target->GetTransport())
599  return false;
600 
601  return BossAI::CanAIAttack(target);
602  }
bool CanAIAttack(Unit const *target) const override
Definition: ScriptedCreature.h:360

+ Here is the call graph for this function:

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::DamageTaken ( Unit ,
uint32 damage 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

357  {
358  if (damage >= me->GetHealth())
359  damage = me->GetHealth() - 1;
360 
361  if (!_frenzied && HealthBelowPct(31)) // AT 30%, not below
362  {
363  _frenzied = true;
365  Talk(SAY_FRENZY);
366  }
367 
368  if (!_dead && me->GetHealth() < FightWonValue)
369  {
370  _dead = true;
371  _JustDied();
372  _EnterEvadeMode();
374 
376  DoCast(me, SPELL_ACHIEVEMENT, true);
377  Talk(SAY_DEATH);
378 
379  //instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
382  creature->AI()->DoAction(ACTION_START_OUTRO);
383  }
384  }
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: boss_deathbringer_saurfang.cpp:42
bool HealthBelowPct(uint32 pct) const
Definition: ScriptedCreature.h:247
bool _frenzied
Definition: boss_deathbringer_saurfang.cpp:609
Definition: icecrown_citadel.h:90
Definition: boss_deathbringer_saurfang.cpp:196
Definition: boss_deathbringer_saurfang.cpp:115
void _JustDied()
Definition: ScriptedCreature.cpp:471
Definition: Creature.h:467
void SetFlag(uint16 index, uint32 newFlag)
Definition: Object.cpp:1199
bool _dead
Definition: boss_deathbringer_saurfang.cpp:610
Definition: Unit.h:681
bool _EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:255
Creature *const me
Definition: CreatureAI.h:71
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
static uint32 const FightWonValue
Definition: boss_deathbringer_saurfang.cpp:604
Definition: boss_deathbringer_saurfang.cpp:117
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
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_deathbringer_saurfang.cpp:116
Definition: boss_deathbringer_saurfang.cpp:99
Definition: UpdateFields.h:109
Definition: boss_deathbringer_saurfang.cpp:40
uint32 GetHealth() const
Definition: Unit.h:1426
Definition: Unit.h:698
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

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

Reimplemented from UnitAI.

548  {
549  switch (action)
550  {
551  case PHASE_INTRO_A:
552  case PHASE_INTRO_H:
553  {
554  // controls what events will execute
555  events.SetPhase(uint32(action));
556 
559 
562 
564  break;
565  }
567  {
568  if (_introDone)
569  return;
570 
573 
577  break;
578  }
580  {
582  {
585  me->SetPower(POWER_ENERGY, 0);
586  if (Aura* bloodPower = me->GetAura(SPELL_BLOOD_POWER))
587  bloodPower->RecalculateAmountOfEffects();
588  }
589  break;
590  }
591  default:
592  break;
593  }
594  }
Definition: boss_deathbringer_saurfang.cpp:186
Definition: boss_deathbringer_saurfang.cpp:141
Definition: boss_deathbringer_saurfang.cpp:127
Definition: boss_deathbringer_saurfang.cpp:143
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4151
Definition: boss_deathbringer_saurfang.cpp:130
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: boss_deathbringer_saurfang.cpp:187
void SetHomePosition(float x, float y, float z, float o)
Definition: Creature.h:670
Definition: boss_deathbringer_saurfang.cpp:134
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
float GetOrientation() const
Definition: Position.h:107
uint32 _fallenChampionCastCount
Definition: boss_deathbringer_saurfang.cpp:607
Definition: UnitAI.h:35
float GetPositionY() const
Definition: Position.h:105
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
float GetPositionZ() const
Definition: Position.h:106
Definition: boss_deathbringer_saurfang.cpp:126
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 SetPower(Powers power, int32 val)
Definition: Unit.cpp:11607
Definition: boss_deathbringer_saurfang.cpp:105
Definition: boss_deathbringer_saurfang.cpp:136
bool _introDone
Definition: boss_deathbringer_saurfang.cpp:608
Definition: SharedDefines.h:251
Definition: boss_deathbringer_saurfang.cpp:194
EventMap events
Definition: ScriptedCreature.h:371
Position const deathbringerPos
Definition: boss_deathbringer_saurfang.cpp:222
uint32_t uint32
Definition: g3dmath.h:168
Definition: SpellAuras.h:116
float GetPositionX() const
Definition: Position.h:104
Definition: Unit.h:1305
Definition: boss_deathbringer_saurfang.cpp:102
Definition: boss_deathbringer_saurfang.cpp:199
Definition: boss_deathbringer_saurfang.cpp:213

+ Here is the call graph for this function:

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::EnterCombat ( Unit who)
inlineoverridevirtual

Reimplemented from BossAI.

284  {
285  if (_dead)
286  return;
287 
289  {
292  return;
293  }
294 
295  // oh just screw intro, enter combat - no exploits please
296  me->setActive(true);
297  DoZoneInCombat();
298 
299  events.Reset();
302  if (!_introDone)
303  {
306  creature->AI()->DoAction(ACTION_INTERRUPT_INTRO);
307  }
308 
309  _introDone = true;
310 
311  Talk(SAY_AGGRO);
313  events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 360000 : 480000, 0, PHASE_COMBAT);
317 
321  }
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:558
Definition: boss_deathbringer_saurfang.cpp:145
Definition: boss_deathbringer_saurfang.cpp:146
Definition: boss_deathbringer_saurfang.cpp:198
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
void Reset()
Definition: EventMap.cpp:20
Definition: icecrown_citadel.h:78
Definition: boss_deathbringer_saurfang.cpp:147
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: icecrown_citadel.h:90
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: Creature.h:467
Definition: boss_deathbringer_saurfang.cpp:148
bool _dead
Definition: boss_deathbringer_saurfang.cpp:610
Definition: Unit.h:681
Definition: boss_deathbringer_saurfang.cpp:188
Player * ToPlayer()
Definition: Object.h:191
void EnterEvadeMode(EvadeReason why) override
Definition: boss_deathbringer_saurfang.cpp:335
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_deathbringer_saurfang.cpp:36
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
uint32 _fallenChampionCastCount
Definition: boss_deathbringer_saurfang.cpp:607
Definition: CreatureAI.h:90
Definition: InstanceScript.h:59
Definition: boss_deathbringer_saurfang.cpp:92
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
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: boss_deathbringer_saurfang.cpp:149
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_deathbringer_saurfang.cpp:105
bool _introDone
Definition: boss_deathbringer_saurfang.cpp:608
Definition: UpdateFields.h:109
EventMap events
Definition: ScriptedCreature.h:371
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:236
Definition: icecrown_citadel.h:63
InstanceScript *const instance
Definition: ScriptedCreature.h:340
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:540

+ Here is the call graph for this function:

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

Reimplemented from CreatureAI.

336  {
338  if (_introDone)
340  }
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
Definition: Unit.h:681
Creature *const me
Definition: CreatureAI.h:71
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
bool _introDone
Definition: boss_deathbringer_saurfang.cpp:608
Definition: UpdateFields.h:109

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from UnitAI.

538  {
539  if (type == DATA_MADE_A_MESS)
540  if (_fallenChampionCastCount < RAID_MODE<uint32>(3, 5, 3, 5))
541  return 1;
542 
543  return 0;
544  }
Definition: boss_deathbringer_saurfang.cpp:204
uint32 _fallenChampionCastCount
Definition: boss_deathbringer_saurfang.cpp:607
void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::Initialize ( void  )
inline
263  {
264  _frenzied = false;
265  _dead = false;
266  }
bool _frenzied
Definition: boss_deathbringer_saurfang.cpp:609
bool _dead
Definition: boss_deathbringer_saurfang.cpp:610

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

324  {
325  }
void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

343  {
345  Reset();
348  }
Definition: icecrown_citadel.h:78
Definition: InstanceScript.h:60
void _JustReachedHome()
Definition: ScriptedCreature.h:366
void Reset() override
Definition: boss_deathbringer_saurfang.cpp:268
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: boss_deathbringer_saurfang.cpp:105
InstanceScript *const instance
Definition: ScriptedCreature.h:340
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:540

+ Here is the call graph for this function:

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

Reimplemented from BossAI.

387  {
388  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
389  {
390  if (target->GetTransport())
391  {
392  summon->DespawnOrUnsummon(1);
394  return;
395  }
396 
397  summon->AI()->AttackStart(target);
398  }
399 
400  summon->CastSpell(summon, SPELL_BLOOD_LINK_BEAST, true);
401  summon->CastSpell(summon, SPELL_RESISTANT_SKIN, true);
402  summons.Summon(summon);
403  DoZoneInCombat(summon);
404  }
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
Definition: Creature.cpp:1774
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
void EnterEvadeMode(EvadeReason why) override
Definition: boss_deathbringer_saurfang.cpp:335
Definition: UnitAI.h:35
Definition: CreatureAI.h:90
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
Definition: boss_deathbringer_saurfang.cpp:110
Definition: boss_deathbringer_saurfang.cpp:111
Definition: Unit.h:1305
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

351  {
352  if (victim->GetTypeId() == TYPEID_PLAYER)
353  Talk(SAY_KILL);
354  }
TypeID GetTypeId() const
Definition: Object.h:113
Definition: boss_deathbringer_saurfang.cpp:39
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33

+ Here is the call graph for this function:

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

Reimplemented from CreatureAI.

412  {
413  if (type != POINT_MOTION_TYPE && id != POINT_SAURFANG)
414  return;
415 
417  }
Definition: icecrown_citadel.h:368
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
Definition: InstanceScript.cpp:397
Definition: MotionMaster.h:46
InstanceScript *const instance
Definition: ScriptedCreature.h:340
Definition: boss_deathbringer_saurfang.cpp:213

+ Here is the call graph for this function:

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

269  {
270  _Reset();
272  Initialize();
273  me->SetPower(POWER_ENERGY, 0);
274  DoCast(me, SPELL_ZERO_POWER, true);
275  DoCast(me, SPELL_BLOOD_LINK, true);
276  DoCast(me, SPELL_BLOOD_POWER, true);
281  }
Definition: boss_deathbringer_saurfang.cpp:91
Definition: boss_deathbringer_saurfang.cpp:93
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Definition: boss_deathbringer_saurfang.cpp:94
Definition: boss_deathbringer_saurfang.cpp:188
Creature *const me
Definition: CreatureAI.h:71
void _Reset()
Definition: ScriptedCreature.cpp:457
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
#define SPELL_BERSERK
Definition: boss_four_horsemen.cpp:74
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
void SetPower(Powers power, int32 val)
Definition: Unit.cpp:11607
Definition: boss_deathbringer_saurfang.cpp:99
Definition: SharedDefines.h:251
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_deathbringer_saurfang.cpp:95
Definition: boss_deathbringer_saurfang.cpp:102
void Initialize()
Definition: boss_deathbringer_saurfang.cpp:262

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from ScriptedAI.

445  {
446  if (spell->Id == SPELL_BLOOD_LINK_POWER)
447  if (Aura* bloodPower = me->GetAura(SPELL_BLOOD_POWER))
448  bloodPower->RecalculateAmountOfEffects();
449  }
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4151
Definition: boss_deathbringer_saurfang.cpp:103
Creature *const me
Definition: CreatureAI.h:71
Definition: SpellAuras.h:116
Definition: boss_deathbringer_saurfang.cpp:102

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

420  {
421  if (target->GetTransport())
422  {
424  return;
425  }
426 
427  switch (spell->Id)
428  {
431  break;
432  case 72255: // Mark of the Fallen Champion, triggered id
433  case 72444:
434  case 72445:
435  case 72446:
438  break;
439  default:
440  break;
441  }
442  }
Definition: boss_deathbringer_saurfang.cpp:37
int32 GetPower(Powers power) const
Definition: Unit.cpp:11589
void EnterEvadeMode(EvadeReason why) override
Definition: boss_deathbringer_saurfang.cpp:335
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_deathbringer_saurfang.cpp:104
Definition: CreatureAI.h:90
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_deathbringer_saurfang.cpp:105
Transport * GetTransport() const
Definition: Object.h:602
Definition: SharedDefines.h:251
int32 GetMaxPower(Powers power) const
Definition: Unit.cpp:11598
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:920
Definition: Unit.h:129

+ Here is the call graph for this function:

void boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::SummonedCreatureDies ( Creature summon,
Unit  
)
inlineoverridevirtual

Reimplemented from CreatureAI.

407  {
408  summons.Despawn(summon);
409  }
void Despawn(Creature const *summon)
Definition: ScriptedCreature.h:93
SummonList summons
Definition: ScriptedCreature.h:372

+ Here is the call graph for this function:

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

Reimplemented from BossAI.

452  {
454  return;
455 
456  events.Update(diff);
457 
459  return;
460 
461  while (uint32 eventId = events.ExecuteEvent())
462  {
463  switch (eventId)
464  {
469  break;
472  break;
477  break;
478  case EVENT_INTRO_HORDE_2:
482  break;
483  case EVENT_INTRO_HORDE_4:
485  break;
486  case EVENT_INTRO_HORDE_9:
489  break;
490  case EVENT_INTRO_FINISH:
492  _introDone = true;
494  break;
496  for (uint32 i10 = 0; i10 < 2; ++i10)
498  if (Is25ManRaid())
499  for (uint32 i25 = 0; i25 < 3; ++i25)
503  if (IsHeroic())
505  break;
506  case EVENT_BLOOD_NOVA:
509  break;
510  case EVENT_RUNE_OF_BLOOD:
513  break;
514  case EVENT_BOILING_BLOOD:
517  break;
518  case EVENT_BERSERK:
520  Talk(SAY_BERSERK);
521  break;
523  if (!summons.empty())
524  {
527  }
528  break;
529  default:
530  break;
531  }
532  }
533 
535  }
Definition: boss_deathbringer_saurfang.cpp:43
Definition: boss_deathbringer_saurfang.cpp:145
Definition: boss_deathbringer_saurfang.cpp:186
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: boss_deathbringer_saurfang.cpp:141
Definition: boss_deathbringer_saurfang.cpp:127
Definition: boss_deathbringer_saurfang.cpp:146
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: boss_deathbringer_saurfang.cpp:143
Definition: Unit.h:565
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Definition: boss_deathbringer_saurfang.cpp:147
Definition: boss_deathbringer_saurfang.cpp:33
Definition: boss_deathbringer_saurfang.cpp:130
Definition: boss_deathbringer_saurfang.cpp:187
Definition: boss_deathbringer_saurfang.cpp:205
Definition: boss_deathbringer_saurfang.cpp:100
Definition: boss_deathbringer_saurfang.cpp:150
Definition: boss_deathbringer_saurfang.cpp:31
Definition: boss_deathbringer_saurfang.cpp:30
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: boss_deathbringer_saurfang.cpp:106
Definition: boss_deathbringer_saurfang.cpp:97
Definition: boss_deathbringer_saurfang.cpp:134
Definition: boss_deathbringer_saurfang.cpp:148
Definition: boss_deathbringer_saurfang.cpp:38
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: Unit.h:681
Definition: boss_deathbringer_saurfang.cpp:188
Definition: boss_deathbringer_saurfang.cpp:29
void setFaction(uint32 faction)
Definition: Unit.h:1467
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_deathbringer_saurfang.cpp:41
Definition: boss_deathbringer_saurfang.cpp:107
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Definition: boss_deathbringer_saurfang.cpp:92
uint32_t uint32
Definition: Define.h:150
Definition: boss_deathbringer_saurfang.cpp:112
Definition: boss_deathbringer_saurfang.cpp:126
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
#define SPELL_BERSERK
Definition: boss_four_horsemen.cpp:74
Definition: boss_deathbringer_saurfang.cpp:32
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
Definition: boss_deathbringer_saurfang.cpp:98
Definition: boss_deathbringer_saurfang.cpp:35
Definition: boss_deathbringer_saurfang.cpp:149
SummonList summons
Definition: ScriptedCreature.h:372
void Update(uint32 time)
Definition: EventMap.h:54
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: boss_deathbringer_saurfang.cpp:136
bool _introDone
Definition: boss_deathbringer_saurfang.cpp:608
Definition: UpdateFields.h:109
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
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: boss_deathbringer_saurfang.cpp:34
bool empty() const
Definition: ScriptedCreature.h:82
Definition: Unit.h:698
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

Member Data Documentation

bool boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_dead
private
uint32 boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_fallenChampionCastCount
private
bool boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_frenzied
private
bool boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::_introDone
private
uint32 const boss_deathbringer_saurfang::boss_deathbringer_saurfangAI::FightWonValue = 100000
static

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