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

Public Member Functions

 boss_festergutAI (Creature *creature)
 
void Reset () override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged.
 
void JustDied (Unit *) override
 
void JustReachedHome () override
 
void EnterEvadeMode (EvadeReason why) override
 
void KilledUnit (Unit *victim) override
 
void SpellHitTarget (Unit *target, SpellInfo const *spell) override
 
void RemoveBlight ()
 
void UpdateAI (uint32 diff) override
 
void SetData (uint32 type, uint32 data) override
 
uint32 GetData (uint32 type) const override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void DamageTaken (Unit *attacker, uint32 &damage, DamageEffectType damagetype, SpellSchoolMask damageSchoolMask) override
 
void JustSummoned (Creature *summon) override
 
void SummonedCreatureDespawn (Creature *summon) override
 
void SummonedCreatureDespawnAll () override
 
void UpdateAI (uint32 diff) override
 
void ScheduleHealthCheckEvent (uint32 healthPct, std::function< void()> exec)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
void Reset () override
 
void JustEngagedWith (Unit *) override
 Called for reaction when initially engaged.
 
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
 
void UpdateAI (uint32 diff) override
 
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 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=0s, uint32 uniqueId=0)
 
void ScheduleTimedEvent (Milliseconds timerMax, std::function< void()> exec, Milliseconds repeatMin, Milliseconds repeatMax=0s, 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)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr, Milliseconds delay=0s)
 Causes the creature to talk/say the text assigned to their entry in the creature_text database table.
 
void Talk (uint8 id, Milliseconds delay)
 
 CreatureAI (Creature *creature)
 
 ~CreatureAI () override
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void JustEngagedWith (Unit *)
 Called for reaction when initially engaged.
 
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 SummonedCreatureDespawnAll ()
 
virtual void SpellHit (Unit *, SpellInfo const *)
 
virtual void SpellHitTarget (Unit *, SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void MovementInform (uint32, uint32)
 
virtual void PathEndReached (uint32)
 
void OnCharmed (bool apply) override
 
virtual void JustReachedHome ()
 
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 ()
 
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 *)
 
- 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)=0
 
virtual void InitializeAI ()
 
virtual void Reset ()
 
virtual void OnCharmed (bool apply)=0
 
virtual void DoAction (int32)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void SetGUID (ObjectGuid, 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)
 
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 (NOTE: Creature engage logic should NOT be here, but in JustEngagedWith, which happens once threat is established!)
 
virtual void JustExitedCombat ()
 Called when the unit leaves combat.
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void OnPowerUpdate (Powers, int32, int32, uint32)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void OnCalculateMeleeDamageReceived (uint32 &, Unit *)
 
virtual void OnCalculateSpellDamageReceived (int32 &, Unit *)
 
virtual void OnCalculatePeriodicTickReceived (uint32 &, Unit *)
 
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)
 
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)
 
SpellCastResult DoCastMaxThreat (uint32 spellId, uint32 threatTablePosition=0, float dist=0.0f, bool playerOnly=true, bool triggered=false)
 Cast spell on the max threat target, which may not always 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)
 
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
 

Public Attributes

ObjectGuid _gasDummyGUID
 
uint32 _maxInoculatedStack
 
uint32 _inhaleCounter
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
Creatureme
 
bool IsFleeing
 

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 ()
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _JustEngagedWith ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
bool _ProccessHealthCheckEvent (uint8 healthPct, uint32 damage, std::function< void()> exec) const
 
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)
 
virtual void MoveInLineOfSight (Unit *)
 
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_festergutAI()

boss_festergut::boss_festergutAI::boss_festergutAI ( Creature creature)
inline
90 : BossAI(creature, DATA_FESTERGUT)
91 {
93 }
@ DATA_FESTERGUT
Definition: icecrown_citadel.h:98
Definition: ScriptedCreature.h:469
void Clear()
Definition: ObjectGuid.h:140
ObjectGuid _gasDummyGUID
Definition: boss_festergut.cpp:95

References _gasDummyGUID, and ObjectGuid::Clear().

Member Function Documentation

◆ EnterEvadeMode()

void boss_festergut::boss_festergutAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

157 {
160 professor->AI()->EnterEvadeMode(why);
161 }
@ DATA_PROFESSOR_PUTRICIDE
Definition: icecrown_citadel.h:100
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:213
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:196
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript *const instance
Definition: ScriptedCreature.h:474
Definition: Creature.h:46
ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:94

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

Referenced by JustEngagedWith().

◆ GetData()

uint32 boss_festergut::boss_festergutAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

273 {
274 if (type == DATA_INOCULATED_STACK)
275 return _maxInoculatedStack;
276
277 return 0;
278 }
#define DATA_INOCULATED_STACK
Definition: boss_festergut.cpp:65
uint32 _maxInoculatedStack
Definition: boss_festergut.cpp:96

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ JustDied()

void boss_festergut::boss_festergutAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from BossAI.

141 {
142 _JustDied();
145 professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
146
147 RemoveBlight();
148 }
@ SAY_DEATH
Definition: boss_festergut.cpp:37
@ ACTION_FESTERGUT_DEATH
Definition: icecrown_citadel.h:525
Talk
Definition: boss_fathomlord_karathress.cpp:25
void _JustDied()
Definition: ScriptedCreature.cpp:620
void RemoveBlight()
Definition: boss_festergut.cpp:182

References BossAI::_JustDied(), ACTION_FESTERGUT_DEATH, DATA_PROFESSOR_PUTRICIDE, ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), BossAI::instance, ScriptedAI::me, RemoveBlight(), and SAY_DEATH.

◆ JustEngagedWith()

void boss_festergut::boss_festergutAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged.

Reimplemented from BossAI.

114 {
115 if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
116 {
119 return;
120 }
121
122 events.ScheduleEvent(EVENT_BERSERK, 5min);
123 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 25s, 30s);
124 events.ScheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
125 events.ScheduleEvent(EVENT_VILE_GAS, 30s, 40s, 1);
126 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 12s + 500ms, 15s);
127 if (IsHeroic())
128 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
129
130 me->setActive(true);
133
134 if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
135 _gasDummyGUID = gasDummy->GetGUID();
137 professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
138 }
events
Definition: boss_sartura.cpp:43
@ SAY_AGGRO
Definition: boss_festergut.cpp:29
@ EVENT_VILE_GAS
Definition: boss_festergut.cpp:73
@ EVENT_GASTRIC_BLOAT
Definition: boss_festergut.cpp:75
@ EVENT_BERSERK
Definition: boss_festergut.cpp:71
@ EVENT_GAS_SPORE
Definition: boss_festergut.cpp:74
@ EVENT_INHALE_BLIGHT
Definition: boss_festergut.cpp:72
@ EVENT_FESTERGUT_GOO
Definition: boss_festergut.cpp:76
@ NPC_GAS_DUMMY
Definition: icecrown_citadel.h:260
@ ACTION_FESTERGUT_COMBAT
Definition: icecrown_citadel.h:523
@ LIGHT_S_HAMMER_TELEPORT
Definition: icecrown_citadel.h:82
@ EVADE_REASON_OTHER
Definition: CreatureAI.h:94
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:94
bool IsHeroic() const
Definition: ScriptedCreature.h:391
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2434
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:649
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:244
void EnterEvadeMode(EvadeReason why) override
Definition: boss_festergut.cpp:156

References _gasDummyGUID, ACTION_FESTERGUT_COMBAT, InstanceScript::CheckRequiredBosses(), DATA_FESTERGUT, DATA_PROFESSOR_PUTRICIDE, InstanceScript::DoCastSpellOnPlayers(), CreatureAI::DoZoneInCombat(), EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, EVENT_BERSERK, EVENT_FESTERGUT_GOO, EVENT_GAS_SPORE, EVENT_GASTRIC_BLOAT, EVENT_INHALE_BLIGHT, EVENT_VILE_GAS, WorldObject::FindNearestCreature(), ObjectAccessor::GetCreature(), InstanceScript::GetGuidData(), BossAI::instance, ScriptedAI::IsHeroic(), LIGHT_S_HAMMER_TELEPORT, ScriptedAI::me, NPC_GAS_DUMMY, SAY_AGGRO, WorldObject::setActive(), and Object::ToPlayer().

◆ JustReachedHome()

void boss_festergut::boss_festergutAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

151 {
154 }
@ FAIL
Definition: InstanceScript.h:59
void _JustReachedHome()
Definition: ScriptedCreature.h:505
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:350

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

◆ KilledUnit()

void boss_festergut::boss_festergutAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from ScriptedAI.

164 {
165 if (victim->GetTypeId() == TYPEID_PLAYER)
166 Talk(SAY_KILL);
167 }
@ TYPEID_PLAYER
Definition: ObjectGuid.h:38
@ SAY_KILL
Definition: boss_festergut.cpp:35
TypeID GetTypeId() const
Definition: Object.h:121

References Object::GetTypeId(), SAY_KILL, and TYPEID_PLAYER.

◆ RemoveBlight()

void boss_festergut::boss_festergutAI::RemoveBlight ( )
inline
183 {
185 for (uint8 i = 0; i < 3; ++i)
186 {
188 gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
189 }
190 }
std::uint8_t uint8
Definition: Define.h:110
uint32 const gaseousBlight[3]
Definition: boss_festergut.cpp:62
uint32 const gaseousBlightVisual[3]
Definition: boss_festergut.cpp:63
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:4855

References _gasDummyGUID, gaseousBlight, gaseousBlightVisual, ObjectAccessor::GetCreature(), ScriptedAI::me, and Unit::RemoveAurasDueToSpell().

Referenced by JustDied(), and UpdateAI().

◆ Reset()

void boss_festergut::boss_festergutAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

100 {
102 _inhaleCounter = 0;
103 _Reset();
104 events.Reset();
105 if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
106 {
107 _gasDummyGUID = gasDummy->GetGUID();
108 for (uint8 i = 0; i < 3; ++i)
109 gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
110 }
111 }
void _Reset()
Definition: ScriptedCreature.cpp:604
uint32 _inhaleCounter
Definition: boss_festergut.cpp:97

References _gasDummyGUID, _inhaleCounter, _maxInoculatedStack, BossAI::_Reset(), WorldObject::FindNearestCreature(), gaseousBlightVisual, ScriptedAI::me, and NPC_GAS_DUMMY.

◆ SetData()

void boss_festergut::boss_festergutAI::SetData ( uint32  type,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

267 {
268 if (type == DATA_INOCULATED_STACK && data > _maxInoculatedStack)
269 _maxInoculatedStack = data;
270 }

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ SpellHitTarget()

void boss_festergut::boss_festergutAI::SpellHitTarget ( Unit target,
SpellInfo const *  spell 
)
inlineoverridevirtual

Reimplemented from ScriptedAI.

170 {
171 if (spell->Id == PUNGENT_BLIGHT_HELPER)
173 else if (Player* p = target->ToPlayer())
174 {
175 // Gaseous Blight damage
176 if (((spell->Id == 69159 || spell->Id == 70136 || spell->Id == 69161 || spell->Id == 70139 || spell->Id == 69163 || spell->Id == 70469) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) == QUEST_STATUS_INCOMPLETE) ||
177 ((spell->Id == 70135 || spell->Id == 70138 || spell->Id == 70468 || spell->Id == 70137 || spell->Id == 70140 || spell->Id == 70470) && p->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) == QUEST_STATUS_INCOMPLETE))
178 p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
179 }
180 }
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
#define INOCULATED_HELPER
Definition: boss_festergut.cpp:60
#define PUNGENT_BLIGHT_HELPER
Definition: boss_festergut.cpp:59
@ SPELL_ORANGE_BLIGHT_RESIDUE
Definition: icecrown_citadel.h:62
@ QUEST_RESIDUE_RENDEZVOUS_10
Definition: icecrown_citadel.h:553
@ QUEST_RESIDUE_RENDEZVOUS_25
Definition: icecrown_citadel.h:554
Player * ToPlayer()
Definition: Object.h:195
Definition: Player.h:1056

References SpellInfo::Id, INOCULATED_HELPER, PUNGENT_BLIGHT_HELPER, QUEST_RESIDUE_RENDEZVOUS_10, QUEST_RESIDUE_RENDEZVOUS_25, QUEST_STATUS_INCOMPLETE, Unit::RemoveAurasDueToSpell(), SPELL_ORANGE_BLIGHT_RESIDUE, and Object::ToPlayer().

◆ UpdateAI()

void boss_festergut::boss_festergutAI::UpdateAI ( uint32  diff)
inlineoverridevirtual

Reimplemented from BossAI.

193 {
194 if (!UpdateVictim())
195 return;
196
197 events.Update(diff);
198
200 return;
201
202 switch (events.ExecuteEvent())
203 {
204 case EVENT_BERSERK:
205 me->CastSpell(me, SPELL_BERSERK2, true);
207 break;
209 RemoveBlight();
210 if (_inhaleCounter == 3)
211 {
215 _inhaleCounter = 0;
216 events.RescheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
217 }
218 else
219 {
221 // just cast and dont bother with target, conditions will handle it
223 if (_inhaleCounter < 3)
224 me->CastSpell(me, gaseousBlight[_inhaleCounter], true, nullptr, nullptr, me->GetGUID());
225 }
226
227 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 34s);
228 break;
229 case EVENT_GAS_SPORE:
232 me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
233 events.ScheduleEvent(EVENT_GAS_SPORE, 40s, 45s);
234 events.DelayEventsToMax(20000, 1); // delay EVENT_VILE_GAS
235 break;
236 case EVENT_VILE_GAS:
237 {
238 std::list<Unit*> targets;
239 uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
240 SelectTargetList(targets, minTargets, SelectTargetMethod::Random, 0, -5.0f, true);
241 float minDist = 0.0f;
242 if (targets.size() >= minTargets)
243 minDist = -5.0f;
244
245 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, minDist, true))
246 me->CastSpell(target, SPELL_VILE_GAS, false);
247 events.ScheduleEvent(EVENT_VILE_GAS, 28s, 35s, 1);
248 break;
249 }
252 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 15s, 17s + 500ms);
253 break;
255 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NonTankTargetSelector(me)))
257 professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
258 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
259 default:
260 break;
261 }
262
264 }
std::uint32_t uint32
Definition: Define.h:108
@ UNIT_STATE_CASTING
Definition: Unit.h:340
@ SPELLVALUE_MAX_TARGETS
Definition: SpellDefines.h:118
@ SPELL_VILE_GAS
Definition: boss_festergut.cpp:48
@ SPELL_INHALE_BLIGHT
Definition: boss_festergut.cpp:43
@ SPELL_GAS_SPORE
Definition: boss_festergut.cpp:47
@ SPELL_MALLABLE_GOO_H
Definition: boss_festergut.cpp:50
@ SPELL_GASTRIC_BLOAT
Definition: boss_festergut.cpp:45
@ SPELL_PUNGENT_BLIGHT
Definition: boss_festergut.cpp:44
@ EMOTE_GAS_SPORE
Definition: boss_festergut.cpp:30
@ SAY_PUNGENT_BLIGHT
Definition: boss_festergut.cpp:32
@ EMOTE_WARN_GAS_SPORE
Definition: boss_festergut.cpp:31
@ EMOTE_WARN_PUNGENT_BLIGHT
Definition: boss_festergut.cpp:33
@ SAY_BERSERK
Definition: boss_festergut.cpp:36
@ SPELL_BERSERK2
Definition: icecrown_citadel.h:56
Definition: UnitAI.h:112
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:39
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)
Definition: UnitAI.cpp:115
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:110
bool UpdateVictim()
Definition: CreatureAI.cpp:268
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Unit.h:1302
SpellCastResult CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:1226
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:1169
Unit * GetVictim() const
Definition: Unit.h:1398
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1410

References _inhaleCounter, Unit::CastCustomSpell(), Unit::CastSpell(), DATA_PROFESSOR_PUTRICIDE, UnitAI::DoMeleeAttackIfReady(), EMOTE_GAS_SPORE, EMOTE_WARN_GAS_SPORE, EMOTE_WARN_PUNGENT_BLIGHT, EVENT_BERSERK, EVENT_FESTERGUT_GOO, EVENT_GAS_SPORE, EVENT_GASTRIC_BLOAT, EVENT_INHALE_BLIGHT, EVENT_VILE_GAS, gaseousBlight, ObjectAccessor::GetCreature(), Object::GetGUID(), InstanceScript::GetGuidData(), Unit::GetVictim(), Unit::HasUnitState(), BossAI::instance, ScriptedAI::me, RemoveBlight(), SAY_BERSERK, SAY_PUNGENT_BLIGHT, UnitAI::SelectTarget(), UnitAI::SelectTargetList(), SPELL_BERSERK2, SPELL_GAS_SPORE, SPELL_GASTRIC_BLOAT, SPELL_INHALE_BLIGHT, SPELL_MALLABLE_GOO_H, SPELL_PUNGENT_BLIGHT, SPELL_VILE_GAS, SPELLVALUE_MAX_TARGETS, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _gasDummyGUID

ObjectGuid boss_festergut::boss_festergutAI::_gasDummyGUID

◆ _inhaleCounter

uint32 boss_festergut::boss_festergutAI::_inhaleCounter

Referenced by Reset(), and UpdateAI().

◆ _maxInoculatedStack

uint32 boss_festergut::boss_festergutAI::_maxInoculatedStack

Referenced by GetData(), Reset(), and SetData().