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.
 
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 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 HealDone (Unit *, uint32 &)
 
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
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
EventMap events
 
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
88 : BossAI(creature, DATA_FESTERGUT)
89 {
91 }
@ DATA_FESTERGUT
Definition: icecrown_citadel.h:97
Definition: ScriptedCreature.h:456
void Clear()
Definition: ObjectGuid.h:140
ObjectGuid _gasDummyGUID
Definition: boss_festergut.cpp:93

References _gasDummyGUID, and ObjectGuid::Clear().

Member Function Documentation

◆ EnterEvadeMode()

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

Reimplemented from CreatureAI.

155 {
158 professor->AI()->EnterEvadeMode(why);
159 }
@ DATA_PROFESSOR_PUTRICIDE
Definition: icecrown_citadel.h:99
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Definition: ObjectAccessor.cpp:215
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:197
Creature * me
Definition: ScriptedCreature.h:282
InstanceScript *const instance
Definition: ScriptedCreature.h:461
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.

271 {
272 if (type == DATA_INOCULATED_STACK)
273 return _maxInoculatedStack;
274
275 return 0;
276 }
#define DATA_INOCULATED_STACK
Definition: boss_festergut.cpp:63
uint32 _maxInoculatedStack
Definition: boss_festergut.cpp:94

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ JustDied()

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

Reimplemented from BossAI.

139 {
140 _JustDied();
143 professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
144
145 RemoveBlight();
146 }
@ SAY_DEATH
Definition: boss_festergut.cpp:35
@ ACTION_FESTERGUT_DEATH
Definition: icecrown_citadel.h:517
Talk
Definition: boss_fathomlord_karathress.cpp:23
void _JustDied()
Definition: ScriptedCreature.cpp:585
void RemoveBlight()
Definition: boss_festergut.cpp:180

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.

112 {
113 if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
114 {
117 return;
118 }
119
120 events.ScheduleEvent(EVENT_BERSERK, 5min);
121 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 25s, 30s);
122 events.ScheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
123 events.ScheduleEvent(EVENT_VILE_GAS, 30s, 40s, 1);
124 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 12s + 500ms, 15s);
125 if (IsHeroic())
126 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
127
128 me->setActive(true);
131
132 if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
133 _gasDummyGUID = gasDummy->GetGUID();
135 professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
136 }
events
Definition: boss_sartura.cpp:43
@ SAY_AGGRO
Definition: boss_festergut.cpp:27
@ EVENT_VILE_GAS
Definition: boss_festergut.cpp:71
@ EVENT_GASTRIC_BLOAT
Definition: boss_festergut.cpp:73
@ EVENT_BERSERK
Definition: boss_festergut.cpp:69
@ EVENT_GAS_SPORE
Definition: boss_festergut.cpp:72
@ EVENT_INHALE_BLIGHT
Definition: boss_festergut.cpp:70
@ EVENT_FESTERGUT_GOO
Definition: boss_festergut.cpp:74
@ NPC_GAS_DUMMY
Definition: icecrown_citadel.h:252
@ ACTION_FESTERGUT_COMBAT
Definition: icecrown_citadel.h:515
@ LIGHT_S_HAMMER_TELEPORT
Definition: icecrown_citadel.h:81
@ EVADE_REASON_OTHER
Definition: CreatureAI.h:92
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition: CreatureAI.cpp:95
bool IsHeroic() const
Definition: ScriptedCreature.h:379
void setActive(bool isActiveObject)
Definition: Object.cpp:1085
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2409
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:605
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:243
void EnterEvadeMode(EvadeReason why) override
Definition: boss_festergut.cpp:154

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.

149 {
152 }
@ FAIL
Definition: InstanceScript.h:58
void _JustReachedHome()
Definition: ScriptedCreature.h:491
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:317

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

◆ KilledUnit()

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

Reimplemented from ScriptedAI.

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

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

◆ RemoveBlight()

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

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.

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

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.

265 {
266 if (type == DATA_INOCULATED_STACK && data > _maxInoculatedStack)
267 _maxInoculatedStack = data;
268 }

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ SpellHitTarget()

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

Reimplemented from ScriptedAI.

168 {
169 if (spell->Id == PUNGENT_BLIGHT_HELPER)
171 else if (Player* p = target->ToPlayer())
172 {
173 // Gaseous Blight damage
174 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) ||
175 ((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))
176 p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
177 }
178 }
@ QUEST_STATUS_INCOMPLETE
Definition: QuestDef.h:103
#define INOCULATED_HELPER
Definition: boss_festergut.cpp:58
#define PUNGENT_BLIGHT_HELPER
Definition: boss_festergut.cpp:57
@ SPELL_ORANGE_BLIGHT_RESIDUE
Definition: icecrown_citadel.h:61
@ QUEST_RESIDUE_RENDEZVOUS_10
Definition: icecrown_citadel.h:545
@ QUEST_RESIDUE_RENDEZVOUS_25
Definition: icecrown_citadel.h:546
Player * ToPlayer()
Definition: Object.h:195
Definition: Player.h:1046

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.

191 {
192 if (!UpdateVictim())
193 return;
194
195 events.Update(diff);
196
198 return;
199
200 switch (events.ExecuteEvent())
201 {
202 case EVENT_BERSERK:
203 me->CastSpell(me, SPELL_BERSERK2, true);
205 break;
207 RemoveBlight();
208 if (_inhaleCounter == 3)
209 {
213 _inhaleCounter = 0;
214 events.RescheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
215 }
216 else
217 {
219 // just cast and dont bother with target, conditions will handle it
221 if (_inhaleCounter < 3)
222 me->CastSpell(me, gaseousBlight[_inhaleCounter], true, nullptr, nullptr, me->GetGUID());
223 }
224
225 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 34s);
226 break;
227 case EVENT_GAS_SPORE:
230 me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
231 events.ScheduleEvent(EVENT_GAS_SPORE, 40s, 45s);
232 events.DelayEventsToMax(20000, 1); // delay EVENT_VILE_GAS
233 break;
234 case EVENT_VILE_GAS:
235 {
236 std::list<Unit*> targets;
237 uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
238 SelectTargetList(targets, minTargets, SelectTargetMethod::Random, 0, -5.0f, true);
239 float minDist = 0.0f;
240 if (targets.size() >= minTargets)
241 minDist = -5.0f;
242
243 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, minDist, true))
244 me->CastSpell(target, SPELL_VILE_GAS, false);
245 events.ScheduleEvent(EVENT_VILE_GAS, 28s, 35s, 1);
246 break;
247 }
250 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 15s, 17s + 500ms);
251 break;
253 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, NonTankTargetSelector(me)))
255 professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
256 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
257 default:
258 break;
259 }
260
262 }
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:46
@ SPELL_INHALE_BLIGHT
Definition: boss_festergut.cpp:41
@ SPELL_GAS_SPORE
Definition: boss_festergut.cpp:45
@ SPELL_MALLABLE_GOO_H
Definition: boss_festergut.cpp:48
@ SPELL_GASTRIC_BLOAT
Definition: boss_festergut.cpp:43
@ SPELL_PUNGENT_BLIGHT
Definition: boss_festergut.cpp:42
@ EMOTE_GAS_SPORE
Definition: boss_festergut.cpp:28
@ SAY_PUNGENT_BLIGHT
Definition: boss_festergut.cpp:30
@ EMOTE_WARN_GAS_SPORE
Definition: boss_festergut.cpp:29
@ EMOTE_WARN_PUNGENT_BLIGHT
Definition: boss_festergut.cpp:31
@ SAY_BERSERK
Definition: boss_festergut.cpp:34
@ SPELL_BERSERK2
Definition: icecrown_citadel.h:55
Definition: UnitAI.h:112
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:40
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:116
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition: UnitAI.cpp:111
bool UpdateVictim()
Definition: CreatureAI.cpp:269
static ObjectGuid GetGUID(Object const *o)
Definition: Object.h:106
Definition: Unit.h:1290
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:1386
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1398

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