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 RemoveBlight ()
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
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 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 bool CanAIAttack (Unit const *) const
 
virtual void InitializeAI ()
 
virtual void DoAction (int32)
 
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
 

Public Attributes

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

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 ()
 
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)
 
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
91 : BossAI(creature, DATA_FESTERGUT)
92 {
94 }
Definition ScriptedCreature.h:481
void Clear()
Definition ObjectGuid.h:138
@ DATA_FESTERGUT
Definition icecrown_citadel.h:90
ObjectGuid _gasDummyGUID
Definition boss_festergut.cpp:96

References _gasDummyGUID, and ObjectGuid::Clear().

Member Function Documentation

◆ EnterEvadeMode()

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

Reimplemented from CreatureAI.

158 {
161 professor->AI()->EnterEvadeMode(why);
162 }
InstanceScript *const instance
Definition ScriptedCreature.h:488
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:215
Definition Creature.h:47
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:110
@ DATA_PROFESSOR_PUTRICIDE
Definition icecrown_citadel.h:92
Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition ObjectAccessor.cpp:210
Creature * me
Definition ScriptedCreature.h:280

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.

261 {
262 if (type == DATA_INOCULATED_STACK)
263 return _maxInoculatedStack;
264
265 return 0;
266 }
#define DATA_INOCULATED_STACK
Definition boss_festergut.cpp:66
uint32 _maxInoculatedStack
Definition boss_festergut.cpp:97

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ JustDied()

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

Reimplemented from CreatureAI.

142 {
143 _JustDied();
146 professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
147
148 RemoveBlight();
149 }
@ SAY_DEATH
Definition boss_festergut.cpp:42
void _JustDied()
Definition ScriptedCreature.cpp:636
Talk
Definition hyjal.cpp:82
@ ACTION_FESTERGUT_DEATH
Definition icecrown_citadel.h:519
void RemoveBlight()
Definition boss_festergut.cpp:170

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 CreatureAI.

115 {
116 if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
117 {
120 return;
121 }
122
123 events.ScheduleEvent(EVENT_BERSERK, 5min);
124 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 25s, 30s);
125 events.ScheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
126 events.ScheduleEvent(EVENT_VILE_GAS, 30s, 40s, 1);
127 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 12s + 500ms, 15s);
128 if (IsHeroic())
129 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
130
131 me->setActive(true);
134
135 if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
136 _gasDummyGUID = gasDummy->GetGUID();
138 professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
139 }
@ SAY_AGGRO
Definition boss_festergut.cpp:34
@ EVENT_VILE_GAS
Definition boss_festergut.cpp:74
@ EVENT_GASTRIC_BLOAT
Definition boss_festergut.cpp:76
@ EVENT_BERSERK
Definition boss_festergut.cpp:72
@ EVENT_GAS_SPORE
Definition boss_festergut.cpp:75
@ EVENT_INHALE_BLIGHT
Definition boss_festergut.cpp:73
@ EVENT_FESTERGUT_GOO
Definition boss_festergut.cpp:77
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:113
void DoCastSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:694
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition InstanceScript.h:255
void setActive(bool isActiveObject)
Definition Object.cpp:1065
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2450
@ NPC_GAS_DUMMY
Definition icecrown_citadel.h:254
@ ACTION_FESTERGUT_COMBAT
Definition icecrown_citadel.h:517
@ LIGHT_S_HAMMER_TELEPORT
Definition icecrown_citadel.h:74
bool IsHeroic() const
Definition ScriptedCreature.h:379
void EnterEvadeMode(EvadeReason why) override
Definition boss_festergut.cpp:157

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 CreatureAI.

152 {
155 }
@ FAIL
Definition InstanceScript.h:60
void _JustReachedHome()
Definition ScriptedCreature.h:528
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:385

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

◆ KilledUnit()

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

Reimplemented from CreatureAI.

165 {
166 if (victim->IsPlayer())
167 Talk(SAY_KILL);
168 }
@ SAY_KILL
Definition boss_festergut.cpp:40
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_KILL.

◆ RemoveBlight()

void boss_festergut::boss_festergutAI::RemoveBlight ( )
inline
171 {
173 for (uint8 i = 0; i < 3; ++i)
174 {
176 gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
177 }
178 }
std::uint8_t uint8
Definition Define.h:109
uint32 const gaseousBlight[3]
Definition boss_festergut.cpp:63
uint32 const gaseousBlightVisual[3]
Definition boss_festergut.cpp:64
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4977

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 UnitAI.

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

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.

255 {
256 if (type == DATA_INOCULATED_STACK && data > _maxInoculatedStack)
257 _maxInoculatedStack = data;
258 }

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ UpdateAI()

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

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

Implements UnitAI.

181 {
182 if (!UpdateVictim())
183 return;
184
185 events.Update(diff);
186
188 return;
189
190 switch (events.ExecuteEvent())
191 {
192 case EVENT_BERSERK:
193 me->CastSpell(me, SPELL_BERSERK2, true);
195 break;
197 RemoveBlight();
198 if (_inhaleCounter == 3)
199 {
203 _inhaleCounter = 0;
204 events.RescheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
205 }
206 else
207 {
209 // just cast and dont bother with target, conditions will handle it
211 if (_inhaleCounter < 3)
212 me->CastSpell(me, gaseousBlight[_inhaleCounter], true, nullptr, nullptr, me->GetGUID());
213 }
214
215 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 34s);
216 break;
217 case EVENT_GAS_SPORE:
220 me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
221 events.ScheduleEvent(EVENT_GAS_SPORE, 40s, 45s);
222 events.DelayEventsToMax(20s, 1); // delay EVENT_VILE_GAS
223 break;
224 case EVENT_VILE_GAS:
225 {
226 std::list<Unit*> targets;
227 uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
228 SelectTargetList(targets, minTargets, SelectTargetMethod::Random, 0, -5.0f, true);
229 float minDist = 0.0f;
230 if (targets.size() >= minTargets)
231 minDist = -5.0f;
232
233 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, minDist, true))
234 me->CastSpell(target, SPELL_VILE_GAS, false);
235 events.ScheduleEvent(EVENT_VILE_GAS, 28s, 35s, 1);
236 break;
237 }
240 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 15s, 17s + 500ms);
241 break;
245 professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
246 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
247 default:
248 break;
249 }
250
252 }
std::uint32_t uint32
Definition Define.h:107
@ SPELLVALUE_MAX_TARGETS
Definition SpellDefines.h:117
@ UNIT_STATE_CASTING
Definition UnitDefines.h:185
@ SPELL_VILE_GAS
Definition boss_festergut.cpp:53
@ SPELL_INHALE_BLIGHT
Definition boss_festergut.cpp:48
@ SPELL_GAS_SPORE
Definition boss_festergut.cpp:52
@ SPELL_MALLABLE_GOO_H
Definition boss_festergut.cpp:55
@ SPELL_GASTRIC_BLOAT
Definition boss_festergut.cpp:50
@ SPELL_PUNGENT_BLIGHT
Definition boss_festergut.cpp:49
@ EMOTE_GAS_SPORE
Definition boss_festergut.cpp:35
@ SAY_PUNGENT_BLIGHT
Definition boss_festergut.cpp:37
@ EMOTE_WARN_GAS_SPORE
Definition boss_festergut.cpp:36
@ EMOTE_WARN_PUNGENT_BLIGHT
Definition boss_festergut.cpp:38
@ SAY_BERSERK
Definition boss_festergut.cpp:41
bool UpdateVictim()
Definition CreatureAI.cpp:287
static ObjectGuid GetGUID(Object const *o)
Definition Object.h:113
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)
Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the f...
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
Definition Unit.h:650
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:1251
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
Unit * GetVictim() const
Definition Unit.h:886
bool HasUnitState(const uint32 f) const
Definition Unit.h:721
@ SPELL_BERSERK2
Definition icecrown_citadel.h:48
Definition UnitAI.h:123

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, Random, 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().


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