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
 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 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)
 Executes a function once the creature reaches the defined health point percent.
 
void ScheduleHealthCheckEvent (std::initializer_list< uint8 > healthPct, std::function< void()> exec)
 
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=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)
 
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=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)
 
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 ()
 
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)
 
- 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, 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
92 : BossAI(creature, DATA_FESTERGUT)
93 {
95 }
Definition ScriptedCreature.h:467
void Clear()
Definition ObjectGuid.h:138
@ DATA_FESTERGUT
Definition icecrown_citadel.h:90
ObjectGuid _gasDummyGUID
Definition boss_festergut.cpp:97

References _gasDummyGUID, and ObjectGuid::Clear().

Member Function Documentation

◆ EnterEvadeMode()

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

Reimplemented from CreatureAI.

159 {
162 professor->AI()->EnterEvadeMode(why);
163 }
InstanceScript *const instance
Definition ScriptedCreature.h:474
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition CreatureAI.cpp:208
Definition Creature.h:43
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.

275 {
276 if (type == DATA_INOCULATED_STACK)
277 return _maxInoculatedStack;
278
279 return 0;
280 }
#define DATA_INOCULATED_STACK
Definition boss_festergut.cpp:67
uint32 _maxInoculatedStack
Definition boss_festergut.cpp:98

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ JustDied()

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

Reimplemented from CreatureAI.

143 {
144 _JustDied();
147 professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
148
149 RemoveBlight();
150 }
@ SAY_DEATH
Definition boss_festergut.cpp:39
void _JustDied()
Definition ScriptedCreature.cpp:644
Talk
Definition hyjal.cpp:82
@ ACTION_FESTERGUT_DEATH
Definition icecrown_citadel.h:519
void RemoveBlight()
Definition boss_festergut.cpp:184

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.

116 {
117 if (!instance->CheckRequiredBosses(DATA_FESTERGUT, who->ToPlayer()))
118 {
121 return;
122 }
123
124 events.ScheduleEvent(EVENT_BERSERK, 5min);
125 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 25s, 30s);
126 events.ScheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
127 events.ScheduleEvent(EVENT_VILE_GAS, 30s, 40s, 1);
128 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 12s + 500ms, 15s);
129 if (IsHeroic())
130 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
131
132 me->setActive(true);
135
136 if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
137 _gasDummyGUID = gasDummy->GetGUID();
139 professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
140 }
@ SAY_AGGRO
Definition boss_festergut.cpp:31
@ EVENT_VILE_GAS
Definition boss_festergut.cpp:75
@ EVENT_GASTRIC_BLOAT
Definition boss_festergut.cpp:77
@ EVENT_BERSERK
Definition boss_festergut.cpp:73
@ EVENT_GAS_SPORE
Definition boss_festergut.cpp:76
@ EVENT_INHALE_BLIGHT
Definition boss_festergut.cpp:74
@ EVENT_FESTERGUT_GOO
Definition boss_festergut.cpp:78
events
Definition boss_sartura.cpp:43
@ EVADE_REASON_OTHER
Definition CreatureAI.h:93
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:106
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:1094
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2459
@ 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:158

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.

153 {
156 }
@ FAIL
Definition InstanceScript.h:60
void _JustReachedHome()
Definition ScriptedCreature.h:512
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.

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

References Object::IsPlayer(), and SAY_KILL.

◆ RemoveBlight()

void boss_festergut::boss_festergutAI::RemoveBlight ( )
inline
185 {
187 for (uint8 i = 0; i < 3; ++i)
188 {
190 gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
191 }
192 }
std::uint8_t uint8
Definition Define.h:109
uint32 const gaseousBlight[3]
Definition boss_festergut.cpp:64
uint32 const gaseousBlightVisual[3]
Definition boss_festergut.cpp:65
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4941

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.

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

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.

269 {
270 if (type == DATA_INOCULATED_STACK && data > _maxInoculatedStack)
271 _maxInoculatedStack = data;
272 }

References _maxInoculatedStack, and DATA_INOCULATED_STACK.

◆ SpellHitTarget()

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

Reimplemented from CreatureAI.

172 {
173 if (spell->Id == PUNGENT_BLIGHT_HELPER)
175 else if (Player* p = target->ToPlayer())
176 {
177 // Gaseous Blight damage
178 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) ||
179 ((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))
180 p->CastSpell(p, SPELL_ORANGE_BLIGHT_RESIDUE, true);
181 }
182 }
@ QUEST_STATUS_INCOMPLETE
Definition QuestDef.h:103
#define INOCULATED_HELPER
Definition boss_festergut.cpp:62
#define PUNGENT_BLIGHT_HELPER
Definition boss_festergut.cpp:61
Player * ToPlayer()
Definition Object.h:201
Definition Player.h:1081
@ SPELL_ORANGE_BLIGHT_RESIDUE
Definition icecrown_citadel.h:54
@ QUEST_RESIDUE_RENDEZVOUS_10
Definition icecrown_citadel.h:547
@ QUEST_RESIDUE_RENDEZVOUS_25
Definition icecrown_citadel.h:548

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  )
inlineoverridevirtual

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

Implements UnitAI.

195 {
196 if (!UpdateVictim())
197 return;
198
199 events.Update(diff);
200
202 return;
203
204 switch (events.ExecuteEvent())
205 {
206 case EVENT_BERSERK:
207 me->CastSpell(me, SPELL_BERSERK2, true);
209 break;
211 RemoveBlight();
212 if (_inhaleCounter == 3)
213 {
217 _inhaleCounter = 0;
218 events.RescheduleEvent(EVENT_GAS_SPORE, 20s, 25s);
219 }
220 else
221 {
223 // just cast and dont bother with target, conditions will handle it
225 if (_inhaleCounter < 3)
226 me->CastSpell(me, gaseousBlight[_inhaleCounter], true, nullptr, nullptr, me->GetGUID());
227 }
228
229 events.ScheduleEvent(EVENT_INHALE_BLIGHT, 34s);
230 break;
231 case EVENT_GAS_SPORE:
234 me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2, 3, 2, 3), me);
235 events.ScheduleEvent(EVENT_GAS_SPORE, 40s, 45s);
236 events.DelayEventsToMax(20000, 1); // delay EVENT_VILE_GAS
237 break;
238 case EVENT_VILE_GAS:
239 {
240 std::list<Unit*> targets;
241 uint32 minTargets = RAID_MODE<uint32>(3, 8, 3, 8);
242 SelectTargetList(targets, minTargets, SelectTargetMethod::Random, 0, -5.0f, true);
243 float minDist = 0.0f;
244 if (targets.size() >= minTargets)
245 minDist = -5.0f;
246
247 if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, minDist, true))
248 me->CastSpell(target, SPELL_VILE_GAS, false);
249 events.ScheduleEvent(EVENT_VILE_GAS, 28s, 35s, 1);
250 break;
251 }
254 events.ScheduleEvent(EVENT_GASTRIC_BLOAT, 15s, 17s + 500ms);
255 break;
259 professor->CastSpell(target, SPELL_MALLABLE_GOO_H, true);
260 events.ScheduleEvent(EVENT_FESTERGUT_GOO, 15s, 20s);
261 default:
262 break;
263 }
264
266 }
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:50
@ SPELL_INHALE_BLIGHT
Definition boss_festergut.cpp:45
@ SPELL_GAS_SPORE
Definition boss_festergut.cpp:49
@ SPELL_MALLABLE_GOO_H
Definition boss_festergut.cpp:52
@ SPELL_GASTRIC_BLOAT
Definition boss_festergut.cpp:47
@ SPELL_PUNGENT_BLIGHT
Definition boss_festergut.cpp:46
@ EMOTE_GAS_SPORE
Definition boss_festergut.cpp:32
@ SAY_PUNGENT_BLIGHT
Definition boss_festergut.cpp:34
@ EMOTE_WARN_GAS_SPORE
Definition boss_festergut.cpp:33
@ EMOTE_WARN_PUNGENT_BLIGHT
Definition boss_festergut.cpp:35
@ SAY_BERSERK
Definition boss_festergut.cpp:38
bool UpdateVictim()
Definition CreatureAI.cpp:280
static ObjectGuid GetGUID(Object const *o)
Definition Object.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)
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:636
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:1235
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:1178
Unit * GetVictim() const
Definition Unit.h:862
bool HasUnitState(const uint32 f) const
Definition Unit.h:707
@ 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: