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

Public Member Functions

 boss_professor_putricideAI (Creature *creature)
 
void Reset () override
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 id, uint32 data) override
 
bool CanAIAttack (Unit const *target) const override
 
void MoveInLineOfSight (Unit *who) override
 
void JustEngagedWith (Unit *who) override
 Called for reaction when initially engaged - this happens after JustEnteredCombat.
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void JustDied (Unit *) override
 
void JustSummoned (Creature *summon) override
 
void DamageTaken (Unit *, uint32 &, DamageEffectType, SpellSchoolMask) override
 Called at any Damage from any attacker (before damage apply)
 
void MovementInform (uint32 type, uint32 id) override
 
void DoAction (int32 action) override
 
void UpdateAI (uint32 diff) override
 Use to start attacking a target. Called just before JustEngagedWith()
 
void EnterEvadeMode (EvadeReason why) override
 
void ChangePhase ()
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
 ~BossAI () override
 
bool CanRespawn () override
 
void OnSpellCast (SpellInfo const *spell) override
 
void OnChannelFinished (SpellInfo const *spell) override
 
void OnSpellFailed (SpellInfo const *spell) 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 - this happens after JustEnteredCombat.
 
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 - this happens after JustEnteredCombat.
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoRewardPlayersInArea ()
 
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
 
bool IsEngaged () const
 Check if creature is currently engaged in combat.
 
void MoveCircleChecks ()
 
void MoveBackwardsChecks ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At =================================
 
void TriggerAlert (Unit const *who) const
 
virtual bool IsEscortNPC (bool=true) const
 
void JustEnteredCombat (Unit *who) override
 Called when the unit enters combat.
 
virtual void JustStartedThreateningMe (Unit *who)
 
void EngagementStart (Unit *who)
 
void EngagementOver ()
 
void JustExitedCombat () override
 Called when the unit leaves combat.
 
virtual void IsSummonedBy (WorldObject *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void SummonedCreatureEvade (Creature *)
 
virtual void OnSpellStart (SpellInfo const *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted ()
 
virtual void JustRespawned ()
 
virtual void PathEndReached (uint32)
 
virtual void WaypointPathStarted (uint32)
 == Waypoints system =============================
 
virtual void WaypointStarted (uint32, uint32)
 
virtual void WaypointReached (uint32, uint32)
 
virtual void WaypointPathEnded (uint32, 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 *attacker)
 
virtual void OwnerAttacked (Unit *target)
 
void OnOwnerCombatInteraction (Unit *target)
 
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 void InitializeAI ()
 
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 EvadeTimerExpired ()
 Called when evade timer expires (target unreachable for too long)
 
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

uint16 sayFestergutDeathTimer
 
uint16 sayRotfaceDeathTimer
 
bool bCallEvade
 
uint8 _experimentState
 
uint8 _phase
 
bool bChangePhase
 
bool bEnteredCombat
 
- 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)
 
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
 
bool _isEngaged
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Detailed Description

Constructor & Destructor Documentation

◆ boss_professor_putricideAI()

boss_professor_putricide::boss_professor_putricideAI::boss_professor_putricideAI ( Creature creature)
inline
233 {
234 bCallEvade = false;
235 bEnteredCombat = false;
236 }
Definition ScriptedCreature.h:485
@ DATA_PROFESSOR_PUTRICIDE
Definition icecrown_citadel.h:92
bool bEnteredCombat
Definition boss_professor_putricide.cpp:244
bool bCallEvade
Definition boss_professor_putricide.cpp:240

References bCallEvade, and bEnteredCombat.

Member Function Documentation

◆ CanAIAttack()

bool boss_professor_putricide::boss_professor_putricideAI::CanAIAttack ( Unit const *  target) const
inlineoverridevirtual

Reimplemented from UnitAI.

283 {
284 return me->IsVisible() && target->GetPositionZ() > 388.0f && target->GetPositionZ() < 410.0f && target->GetPositionY() > 3157.1f && target->GetExactDist2dSq(4356.0f, 3211.0f) < 80.0f * 80.0f;
285 }
bool IsVisible() const
Definition Unit.h:2014
Creature * me
Definition ScriptedCreature.h:281

References Position::GetExactDist2dSq(), Position::GetPositionY(), Position::GetPositionZ(), Unit::IsVisible(), and ScriptedAI::me.

◆ ChangePhase()

void boss_professor_putricide::boss_professor_putricideAI::ChangePhase ( )
inline
678 {
679 Milliseconds heroicDelay = (IsHeroic() ? 25s : 0ms);
680 events.DelayEvents(24s + heroicDelay, EVENT_GROUP_ABILITIES);
681 me->AttackStop();
682 if (!IsHeroic())
683 {
684 me->CastSpell(me, SPELL_TEAR_GAS, false);
685 events.ScheduleEvent(EVENT_GO_TO_TABLE, 2500ms);
686 }
687 else
688 {
692 // cast variables
693 if (Is25ManRaid())
694 {
695 std::list<Unit*> targetList;
696
697 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
698 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
699 if (Player* p = itr->GetSource())
700 if (!p->IsGameMaster())
701 targetList.push_back(p);
702
703 std::size_t half = targetList.size() / 2;
704 // half gets ooze variable
705 while (half < targetList.size())
706 {
707 std::list<Unit*>::iterator itr = targetList.begin();
708 advance(itr, urand(0, targetList.size() - 1));
709 (*itr)->CastSpell(*itr, SPELL_OOZE_VARIABLE, true);
710 targetList.erase(itr);
711 }
712 // and half gets gas
713 for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
714 (*itr)->CastSpell(*itr, SPELL_GAS_VARIABLE, true);
715 }
716
718 }
719
720 switch (_phase)
721 {
722 case 1:
723 _phase = 2;
724 events.ScheduleEvent(EVENT_MALLEABLE_GOO, randtime(25s, 28s) + heroicDelay, EVENT_GROUP_ABILITIES);
725 events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, randtime(35s, 40s) + heroicDelay, EVENT_GROUP_ABILITIES);
726 break;
727 case 2:
728 _phase = 3;
731 break;
732 default:
733 break;
734 }
735 }
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
Definition Duration.h:27
Milliseconds randtime(Milliseconds min, Milliseconds max)
Definition Random.cpp:64
uint32 urand(uint32 min, uint32 max)
Definition Random.cpp:44
#define EVENT_GROUP_ABILITIES
Definition boss_professor_putricide.cpp:139
@ POINT_TABLE_COMBAT
Definition boss_professor_putricide.cpp:146
@ SPELL_UNSTABLE_EXPERIMENT
Definition boss_professor_putricide.cpp:66
@ SPELL_OOZE_VARIABLE
Definition boss_professor_putricide.cpp:75
@ SPELL_GAS_VARIABLE
Definition boss_professor_putricide.cpp:76
@ SPELL_TEAR_GAS
Definition boss_professor_putricide.cpp:67
Position const tablePos
Definition boss_professor_putricide.cpp:151
@ SAY_PHASE_TRANSITION_HEROIC
Definition boss_professor_putricide.cpp:42
@ EVENT_CHOKING_GAS_BOMB
Definition boss_professor_putricide.cpp:135
@ EVENT_MUTATED_PLAGUE
Definition boss_professor_putricide.cpp:136
@ EVENT_GO_TO_TABLE
Definition boss_professor_putricide.cpp:129
@ EVENT_MALLEABLE_GOO
Definition boss_professor_putricide.cpp:134
@ EVENT_UNSTABLE_EXPERIMENT
Definition boss_professor_putricide.cpp:128
events
Definition boss_sartura.cpp:43
Definition LinkedList.h:139
Definition MapRefMgr.h:26
iterator begin()
Definition MapRefMgr.h:36
iterator end()
Definition MapRefMgr.h:37
PlayerList const & GetPlayers() const
Definition Map.h:329
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, const Movement::PointsArray *path=nullptr, bool generatePath=false, float orientation=0.0f, ObjectGuid targetGUID=ObjectGuid::Empty)
The unit will charge the target. Doesn't work with UNIT_FLAG_DISABLE_MOVE.
Definition MotionMaster.cpp:731
Definition Player.h:1084
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:178
MotionMaster * GetMotionMaster()
Definition Unit.h:1759
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:1378
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7456
Map * GetMap() const
Definition Object.h:625
Talk
Definition hyjal.cpp:82
float GetPositionZ() const
Definition Position.h:123
float GetPositionX() const
Definition Position.h:121
float GetPositionY() const
Definition Position.h:122
bool IsHeroic() const
Definition ScriptedCreature.h:383
bool Is25ManRaid() const
Definition ScriptedCreature.h:389
uint8 _phase
Definition boss_professor_putricide.cpp:242

References _phase, Unit::AttackStop(), MapRefMgr::begin(), Unit::CastSpell(), UnitAI::DoCast(), MapRefMgr::end(), EVENT_CHOKING_GAS_BOMB, EVENT_GO_TO_TABLE, EVENT_GROUP_ABILITIES, EVENT_MALLEABLE_GOO, EVENT_MUTATED_PLAGUE, EVENT_UNSTABLE_EXPERIMENT, WorldObject::GetMap(), Unit::GetMotionMaster(), Map::GetPlayers(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ScriptedAI::Is25ManRaid(), ScriptedAI::IsHeroic(), ScriptedAI::me, MotionMaster::MoveCharge(), POINT_TABLE_COMBAT, randtime(), SAY_PHASE_TRANSITION_HEROIC, SPELL_GAS_VARIABLE, SPELL_OOZE_VARIABLE, SPELL_TEAR_GAS, SPELL_UNSTABLE_EXPERIMENT, tablePos, and urand().

Referenced by UpdateAI().

◆ DamageTaken()

void boss_professor_putricide::boss_professor_putricideAI::DamageTaken ( Unit ,
uint32 ,
DamageEffectType  ,
SpellSchoolMask   
)
inlineoverridevirtual

Called at any Damage from any attacker (before damage apply)

Note
It use for recalculation damage or special reaction at damage for attack reaction use AttackedBy called for non DOT damage in Unit::DealDamage also

Reimplemented from UnitAI.

395 {
396 if (bChangePhase)
397 return;
398
399 switch (_phase)
400 {
401 case 1:
402 if (HealthAbovePct(80))
403 return;
405 bChangePhase = true;
406 break;
407 case 2:
408 if (HealthAbovePct(35))
409 return;
411 bChangePhase = true;
412 break;
413 default:
414 break;
415 }
416 }
@ REACT_PASSIVE
Definition Unit.h:566
void SetReactState(ReactStates state)
A creature can have 3 ReactStates : Agressive, Passive, Neutral.
Definition Creature.h:100
bool HealthAbovePct(uint32 pct) const
Definition ScriptedCreature.h:369
bool bChangePhase
Definition boss_professor_putricide.cpp:243

References _phase, bChangePhase, ScriptedAI::HealthAbovePct(), ScriptedAI::me, REACT_PASSIVE, and Creature::SetReactState().

◆ DoAction()

void boss_professor_putricide::boss_professor_putricideAI::DoAction ( int32  action)
inlineoverridevirtual

Reimplemented from UnitAI.

468 {
469 switch (action)
470 {
473 break;
476 break;
480 break;
483 break;
486 break;
487 default:
488 break;
489 }
490 }
Position const festergutWatchPos
Definition boss_professor_putricide.cpp:149
@ POINT_ROTFACE
Definition boss_professor_putricide.cpp:144
@ POINT_FESTERGUT
Definition boss_professor_putricide.cpp:143
@ SPELL_RELEASE_GAS_VISUAL
Definition boss_professor_putricide.cpp:55
Position const rotfaceWatchPos
Definition boss_professor_putricide.cpp:150
@ SAY_FESTERGUT_GASEOUS_BLIGHT
Definition boss_professor_putricide.cpp:32
@ ACTION_ROTFACE_COMBAT
Definition icecrown_citadel.h:522
@ ACTION_FESTERGUT_DEATH
Definition icecrown_citadel.h:519
@ ACTION_ROTFACE_DEATH
Definition icecrown_citadel.h:524
@ ACTION_FESTERGUT_GAS
Definition icecrown_citadel.h:518
@ ACTION_FESTERGUT_COMBAT
Definition icecrown_citadel.h:517
uint16 sayFestergutDeathTimer
Definition boss_professor_putricide.cpp:238
uint16 sayRotfaceDeathTimer
Definition boss_professor_putricide.cpp:239

References ACTION_FESTERGUT_COMBAT, ACTION_FESTERGUT_DEATH, ACTION_FESTERGUT_GAS, ACTION_ROTFACE_COMBAT, ACTION_ROTFACE_DEATH, UnitAI::DoCast(), festergutWatchPos, Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), ScriptedAI::me, MotionMaster::MoveCharge(), POINT_FESTERGUT, POINT_ROTFACE, rotfaceWatchPos, SAY_FESTERGUT_GASEOUS_BLIGHT, sayFestergutDeathTimer, sayRotfaceDeathTimer, and SPELL_RELEASE_GAS_VISUAL.

Referenced by MovementInform().

◆ EnterEvadeMode()

void boss_professor_putricide::boss_professor_putricideAI::EnterEvadeMode ( EvadeReason  why)
inlineoverridevirtual

Reimplemented from CreatureAI.

670 {
672 if (!me->IsInCombat() && me->GetExactDist2d(&p) > 10.0f)
675 }
@ POINT_TABLE
Definition boss_professor_putricide.cpp:145
void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER) override
Definition ScriptedCreature.h:526
void GetHomePosition(float &x, float &y, float &z, float &ori) const
Definition Creature.h:349
bool IsInCombat() const
Definition Unit.h:935
Definition Position.h:27
float GetExactDist2d(const float x, const float y) const
Definition Position.h:170

References BossAI::EnterEvadeMode(), Position::GetExactDist2d(), Creature::GetHomePosition(), Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::IsInCombat(), ScriptedAI::me, MotionMaster::MoveCharge(), POINT_TABLE, and tablePos.

Referenced by UpdateAI().

◆ GetData()

uint32 boss_professor_putricide::boss_professor_putricideAI::GetData ( uint32  type) const
inlineoverridevirtual

Reimplemented from UnitAI.

262 {
263 switch (type)
264 {
266 return (uint32)_experimentState;
267 case DATA_PHASE:
268 return (uint32)_phase;
269 case DATA_ABOMINATION:
270 return (uint32)(const_cast<SummonList*>(&summons)->HasEntry(NPC_MUTATED_ABOMINATION_10) || const_cast<SummonList*>(&summons)->HasEntry(NPC_MUTATED_ABOMINATION_25));
271 }
272
273 return 0;
274 }
std::uint32_t uint32
Definition Define.h:107
@ DATA_PHASE
Definition boss_professor_putricide.cpp:119
@ DATA_ABOMINATION
Definition boss_professor_putricide.cpp:120
@ DATA_EXPERIMENT_STAGE
Definition boss_professor_putricide.cpp:118
SummonList summons
Definition ScriptedCreature.h:539
Definition ScriptedCreature.h:33
@ NPC_MUTATED_ABOMINATION_25
Definition icecrown_citadel.h:271
@ NPC_MUTATED_ABOMINATION_10
Definition icecrown_citadel.h:270
uint8 _experimentState
Definition boss_professor_putricide.cpp:241

References _experimentState, _phase, DATA_ABOMINATION, DATA_EXPERIMENT_STAGE, DATA_PHASE, NPC_MUTATED_ABOMINATION_10, NPC_MUTATED_ABOMINATION_25, and BossAI::summons.

◆ JustDied()

void boss_professor_putricide::boss_professor_putricideAI::JustDied ( Unit )
inlineoverridevirtual

Reimplemented from CreatureAI.

342 {
343 _JustDied();
345
347 DoCastAOE(SPELL_UNHOLY_INFUSION_CREDIT, true); // ReqTargetAura in dbc
348
349 me->CastSpell((Unit*)nullptr, SPELL_MUTATED_PLAGUE_CLEAR, true);
350 }
@ SPELL_UNHOLY_INFUSION_CREDIT
Definition boss_professor_putricide.cpp:113
@ SPELL_MUTATED_PLAGUE_CLEAR
Definition boss_professor_putricide.cpp:82
@ SAY_DEATH
Definition boss_professor_putricide.cpp:49
void _JustDied()
Definition ScriptedCreature.cpp:664
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:285
Definition Unit.h:664
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:6002
@ SPELL_SHADOWS_FATE
Definition icecrown_citadel.h:63

References BossAI::_JustDied(), Unit::CastSpell(), UnitAI::DoCastAOE(), Unit::HasAura(), ScriptedAI::Is25ManRaid(), ScriptedAI::me, SAY_DEATH, SPELL_MUTATED_PLAGUE_CLEAR, SPELL_SHADOWS_FATE, and SPELL_UNHOLY_INFUSION_CREDIT.

◆ JustEngagedWith()

void boss_professor_putricide::boss_professor_putricideAI::JustEngagedWith ( Unit )
inlineoverridevirtual

Called for reaction when initially engaged - this happens after JustEnteredCombat.

Reimplemented from CreatureAI.

294 {
296 if (!instance->CheckRequiredBosses(DATA_PROFESSOR_PUTRICIDE, who->ToPlayer()) || me->GetExactDist2d(&homePos) > 10.0f || !me->IsVisible()) // check home position because during festergut/rotface fight, trigger missile after their death can trigger putricide combat
297 {
298 me->CombatStop();
300 return;
301 }
302
303 bEnteredCombat = true;
305 events.Reset();
306 events.ScheduleEvent(EVENT_BERSERK, 10min);
309 if (IsHeroic())
311
314
315 me->setActive(true);
320 }
@ IN_PROGRESS
Definition InstanceScript.h:59
Position const homePos
Definition boss_chromaggus.cpp:71
@ SPELL_OOZE_TANK_PROTECTION
Definition boss_professor_putricide.cpp:73
@ SAY_AGGRO
Definition boss_professor_putricide.cpp:40
@ EVENT_SLIME_PUDDLE
Definition boss_professor_putricide.cpp:127
@ EVENT_UNBOUND_PLAGUE
Definition boss_professor_putricide.cpp:133
@ EVENT_BERSERK
Definition boss_professor_putricide.cpp:126
InstanceScript *const instance
Definition ScriptedCreature.h:492
void DoZoneInCombat(Creature *creature=nullptr, float maxRangeToNearestTarget=250.0f)
Definition CreatureAI.cpp:117
virtual bool SetBossState(uint32 id, EncounterState state)
Definition InstanceScript.cpp:396
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:694
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition InstanceScript.h:265
void RemoveAllAuras()
Definition Unit.cpp:5597
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition Unit.cpp:7489
void setActive(bool isActiveObject)
Definition Object.cpp:1082
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ DATA_NAUSEA_ACHIEVEMENT
Definition icecrown_citadel.h:108

References bEnteredCombat, Unit::CastSpell(), InstanceScript::CheckRequiredBosses(), Unit::CombatStop(), DATA_NAUSEA_ACHIEVEMENT, DATA_PROFESSOR_PUTRICIDE, InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), CreatureAI::DoZoneInCombat(), EVENT_BERSERK, EVENT_GROUP_ABILITIES, EVENT_SLIME_PUDDLE, EVENT_UNBOUND_PLAGUE, EVENT_UNSTABLE_EXPERIMENT, Position::GetExactDist2d(), Creature::GetHomePosition(), homePos, IN_PROGRESS, BossAI::instance, ScriptedAI::IsHeroic(), Unit::IsVisible(), ScriptedAI::me, Unit::RemoveAllAuras(), SAY_AGGRO, WorldObject::setActive(), InstanceScript::SetBossState(), ZoneScript::SetData(), SPELL_GAS_VARIABLE, SPELL_OOZE_TANK_PROTECTION, SPELL_OOZE_VARIABLE, and Object::ToPlayer().

◆ JustReachedHome()

void boss_professor_putricide::boss_professor_putricideAI::JustReachedHome ( )
inlineoverridevirtual

◆ JustSummoned()

void boss_professor_putricide::boss_professor_putricideAI::JustSummoned ( Creature summon)
inlineoverridevirtual

Reimplemented from CreatureAI.

353 {
354 if (summon->GetEntry() != 38308 && summon->GetEntry() != 38309 && (!me->IsInCombat() || me->IsInEvadeMode()))
355 {
356 summon->DespawnOrUnsummon(1ms);
357 return;
358 }
359
360 summons.Summon(summon);
361
362 switch (summon->GetEntry())
363 {
365 // blizzard casts this spell 7 times initially (confirmed in sniff)
366 for (uint8 i = 0; i < 7; ++i)
367 summon->CastSpell(summon, SPELL_GROW, true);
368 return;
369 case NPC_GAS_CLOUD:
370 // no possible aura seen in sniff adding the aurastate
372 summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true);
374 break;
376 // no possible aura seen in sniff adding the aurastate
378 summon->CastSpell(summon, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, true);
380 break;
382 summon->CastSpell(summon, SPELL_CHOKING_GAS_BOMB_PERIODIC, true);
383 summon->CastSpell(summon, SPELL_CHOKING_GAS_EXPLOSION_TRIGGER, true);
384 return;
387 return;
388 }
389
390 if (me->IsInCombat())
391 summon->SetInCombatWithZone();
392 }
std::uint8_t uint8
Definition Define.h:109
@ AURA_STATE_UNKNOWN19
Definition SharedDefines.h:1299
@ AURA_STATE_UNKNOWN22
Definition SharedDefines.h:1302
@ SPELL_OOZE_ERUPTION_SEARCH_PERIODIC
Definition boss_professor_putricide.cpp:98
@ SPELL_CHOKING_GAS_BOMB_PERIODIC
Definition boss_professor_putricide.cpp:102
@ SPELL_GASEOUS_BLOAT_PROC
Definition boss_professor_putricide.cpp:90
@ SPELL_GROW
Definition boss_professor_putricide.cpp:86
@ SPELL_CHOKING_GAS_EXPLOSION_TRIGGER
Definition boss_professor_putricide.cpp:103
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2850
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2186
bool IsInEvadeMode() const
Definition Creature.h:138
uint32 GetEntry() const
Definition Object.h:117
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
void ModifyAuraState(AuraStateType flag, bool apply)
Definition Unit.cpp:7599
@ NPC_CHOKING_GAS_BOMB
Definition icecrown_citadel.h:268
@ NPC_VOLATILE_OOZE
Definition icecrown_citadel.h:267
@ NPC_GAS_CLOUD
Definition icecrown_citadel.h:266
@ NPC_GROWING_OOZE_PUDDLE
Definition icecrown_citadel.h:265

References AURA_STATE_UNKNOWN19, AURA_STATE_UNKNOWN22, Unit::CastSpell(), Creature::DespawnOrUnsummon(), Object::GetEntry(), Unit::IsInCombat(), Creature::IsInEvadeMode(), ScriptedAI::me, Unit::ModifyAuraState(), NPC_CHOKING_GAS_BOMB, NPC_GAS_CLOUD, NPC_GROWING_OOZE_PUDDLE, NPC_MUTATED_ABOMINATION_10, NPC_MUTATED_ABOMINATION_25, NPC_VOLATILE_OOZE, REACT_PASSIVE, Creature::SetInCombatWithZone(), Creature::SetReactState(), SPELL_CHOKING_GAS_BOMB_PERIODIC, SPELL_CHOKING_GAS_EXPLOSION_TRIGGER, SPELL_GASEOUS_BLOAT_PROC, SPELL_GROW, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, SummonList::Summon(), and BossAI::summons.

◆ KilledUnit()

void boss_professor_putricide::boss_professor_putricideAI::KilledUnit ( Unit victim)
inlineoverridevirtual

Reimplemented from CreatureAI.

336 {
337 if (victim->IsPlayer())
338 Talk(SAY_KILL);
339 }
@ SAY_KILL
Definition boss_professor_putricide.cpp:47
bool IsPlayer() const
Definition Object.h:201

References Object::IsPlayer(), and SAY_KILL.

◆ MoveInLineOfSight()

void boss_professor_putricide::boss_professor_putricideAI::MoveInLineOfSight ( Unit who)
inlineoverridevirtual

Reimplemented from CreatureAI.

288 {
291 }
@ UNIT_FLAG_NOT_SELECTABLE
Definition UnitDefines.h:282
virtual void MoveInLineOfSight(Unit *)
Definition CreatureAI.cpp:180
bool HasUnitFlag(UnitFlags flags) const
Definition Unit.h:747

References Unit::HasUnitFlag(), ScriptedAI::me, CreatureAI::MoveInLineOfSight(), and UNIT_FLAG_NOT_SELECTABLE.

◆ MovementInform()

void boss_professor_putricide::boss_professor_putricideAI::MovementInform ( uint32  type,
uint32  id 
)
inlineoverridevirtual

Reimplemented from CreatureAI.

419 {
420 if (type != POINT_MOTION_TYPE)
421 return;
422 switch (id)
423 {
424 case POINT_FESTERGUT:
426 {
427 if (c->IsInCombat())
428 {
432 c->CastSpell(c, SPELL_GASEOUS_BLIGHT_LARGE, true, nullptr, nullptr, c->GetGUID());
433 }
434 else
435 {
436 bCallEvade = true;
437 }
438 }
439 break;
440 case POINT_ROTFACE:
442 {
443 if (c->IsInCombat())
444 {
447 }
448 else
449 {
450 bCallEvade = true;
451 }
452 }
453 break;
454 case POINT_TABLE:
457 break;
460 me->GetMotionMaster()->Clear(false);
462 events.ScheduleEvent(EVENT_TABLE_DRINK_STUFF, IsHeroic() ? 25s : 0ms);
463 break;
464 }
465 }
@ POINT_MOTION_TYPE
Definition MotionMaster.h:48
@ EMOTE_STATE_USE_STANDING
Definition SharedDefines.h:1948
@ UNIT_NPC_EMOTESTATE
Definition UpdateFields.h:140
@ SPELL_GASEOUS_BLIGHT_LARGE
Definition boss_professor_putricide.cpp:56
@ EVENT_TABLE_DRINK_STUFF
Definition boss_professor_putricide.cpp:130
Definition Creature.h:47
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:111
Map * instance
Definition InstanceScript.h:149
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:2349
void MoveIdle()
Definition MotionMaster.cpp:234
void Clear(bool reset=true)
Definition MotionMaster.h:193
void SetFacingTo(float ori)
Definition Unit.cpp:16454
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:17366
@ DATA_ROTFACE
Definition icecrown_citadel.h:91
@ DATA_FESTERGUT
Definition icecrown_citadel.h:90
float GetOrientation() const
Definition Position.h:124
void DoAction(int32 action) override
Definition boss_professor_putricide.cpp:467

References ACTION_FESTERGUT_GAS, bCallEvade, MotionMaster::Clear(), DATA_FESTERGUT, DATA_ROTFACE, DoAction(), EMOTE_STATE_USE_STANDING, EVENT_TABLE_DRINK_STUFF, festergutWatchPos, Map::GetCreature(), InstanceScript::GetGuidData(), Unit::GetMotionMaster(), Position::GetOrientation(), IN_PROGRESS, BossAI::instance, InstanceScript::instance, ScriptedAI::IsHeroic(), ScriptedAI::me, MotionMaster::MoveIdle(), POINT_FESTERGUT, POINT_MOTION_TYPE, POINT_ROTFACE, POINT_TABLE, POINT_TABLE_COMBAT, rotfaceWatchPos, InstanceScript::SetBossState(), Unit::SetFacingTo(), Unit::SetUInt32Value(), SPELL_GASEOUS_BLIGHT_LARGE, tablePos, and UNIT_NPC_EMOTESTATE.

◆ Reset()

void boss_professor_putricide::boss_professor_putricideAI::Reset ( )
inlineoverridevirtual

Reimplemented from UnitAI.

247 {
251 _phase = 1;
252 bChangePhase = false;
253 _Reset();
256
259 }
@ DONE
Definition InstanceScript.h:61
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:35
@ REACT_AGGRESSIVE
Definition Unit.h:568
void _Reset()
Definition ScriptedCreature.cpp:644
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
void SetStandState(uint8 state)
Definition Unit.cpp:13123
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:749

References _experimentState, _phase, BossAI::_Reset(), bChangePhase, DATA_FESTERGUT, DATA_ROTFACE, DONE, InstanceScript::GetBossState(), BossAI::instance, ScriptedAI::me, REACT_AGGRESSIVE, Unit::RemoveUnitFlag(), sayFestergutDeathTimer, sayRotfaceDeathTimer, Creature::SetReactState(), Unit::SetStandState(), UNIT_FLAG_NOT_SELECTABLE, and UNIT_STAND_STATE_STAND.

◆ SetData()

void boss_professor_putricide::boss_professor_putricideAI::SetData ( uint32  id,
uint32  data 
)
inlineoverridevirtual

Reimplemented from UnitAI.

277 {
278 if (id == DATA_EXPERIMENT_STAGE)
279 _experimentState = (data ? 1 : 0);
280 }

References _experimentState, and DATA_EXPERIMENT_STAGE.

◆ UpdateAI()

void boss_professor_putricide::boss_professor_putricideAI::UpdateAI ( uint32  )
inlineoverridevirtual

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

Implements UnitAI.

493 {
495 {
496 if (sayFestergutDeathTimer <= diff)
497 {
501 }
502 else
504 }
505 else if (sayRotfaceDeathTimer)
506 {
507 if (sayRotfaceDeathTimer <= diff)
508 {
512 }
513 else
514 sayRotfaceDeathTimer -= diff;
515 }
516 else if (bCallEvade)
517 {
518 bCallEvade = false;
520 return;
521 }
522
523 if (!UpdateVictim())
524 return;
525
526 events.Update(diff);
527
529 return;
530
531 if (bChangePhase)
532 {
533 ChangePhase();
534 bChangePhase = false;
535 return;
536 }
537
538 switch (events.ExecuteEvent())
539 {
540 case EVENT_BERSERK:
543 break;
545 {
546 std::list<Unit*> targets;
547 SelectTargetList(targets, 2, SelectTargetMethod::Random, 0, 0.0f, true);
548 if (!targets.empty())
549 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
552 }
553 break;
558 break;
562 break;
564 switch (_phase)
565 {
566 case 2:
567 {
568 SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_CREATE_CONCOCTION);
570 events.ScheduleEvent(EVENT_PHASE_TRANSITION, Milliseconds(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250));
571 break;
572 }
573 case 3:
574 {
575 SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_GUZZLE_POTIONS);
577 events.ScheduleEvent(EVENT_PHASE_TRANSITION, Milliseconds(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250));
578 break;
579 }
580 default:
581 break;
582 }
583 break;
585 {
586 switch (_phase)
587 {
588 case 2:
590 me->SetFacingToObject(face);
593 events.ScheduleEvent(EVENT_RESUME_ATTACK, 5500ms);
594 break;
595 case 3:
597 me->SetFacingToObject(face);
600 events.ScheduleEvent(EVENT_RESUME_ATTACK, 8500ms);
601 break;
602 default:
603 break;
604 }
605 }
606 break;
611 // remove Tear Gas
614 if (_phase == 3)
618 break;
621 {
622 me->CastSpell(target, SPELL_UNBOUND_PLAGUE, false);
625 }
626 else
627 events.ScheduleEvent(EVENT_UNBOUND_PLAGUE, 3500ms, EVENT_GROUP_ABILITIES);
628 break;
630 if (Is25ManRaid())
631 {
632 std::list<Unit*> targets;
634
635 if (!targets.empty())
636 {
638 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
639 me->CastSpell(*itr, SPELL_MALLEABLE_GOO, true);
640 }
641 }
642 else
643 {
645 {
647 me->CastSpell(target, SPELL_MALLEABLE_GOO, true);
648 }
649 }
650 events.ScheduleEvent(EVENT_MALLEABLE_GOO, 25s, 30s, EVENT_GROUP_ABILITIES);
651 break;
655 events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, 35s, 40s, EVENT_GROUP_ABILITIES);
656 break;
658 if (Unit* target = me->GetVictim())
659 me->CastSpell(target, SPELL_MUTATED_PLAGUE, false);
661 break;
662 default:
663 break;
664 }
665
667 }
#define sSpellMgr
Definition SpellMgr.h:836
SelectTargetMethod
Definition UnitAI.h:44
@ UNIT_STAND_STATE_KNEEL
Definition UnitDefines.h:43
@ UNIT_STATE_CASTING
Definition UnitDefines.h:188
@ SPELL_UNBOUND_PLAGUE_SEARCHER
Definition boss_professor_putricide.cpp:78
@ SPELL_SLIME_PUDDLE_TRIGGER
Definition boss_professor_putricide.cpp:63
@ SPELL_TEAR_GAS_PERIODIC_TRIGGER
Definition boss_professor_putricide.cpp:70
@ SPELL_MUTATED_PLAGUE
Definition boss_professor_putricide.cpp:81
@ SPELL_UNBOUND_PLAGUE
Definition boss_professor_putricide.cpp:77
@ SPELL_TEAR_GAS_CANCEL
Definition boss_professor_putricide.cpp:69
@ SPELL_CREATE_CONCOCTION
Definition boss_professor_putricide.cpp:71
@ SPELL_MALLEABLE_GOO
Definition boss_professor_putricide.cpp:65
@ SPELL_CHOKING_GAS_BOMB
Definition boss_professor_putricide.cpp:74
@ SPELL_GUZZLE_POTIONS
Definition boss_professor_putricide.cpp:72
@ EMOTE_MALLEABLE_GOO
Definition boss_professor_putricide.cpp:45
@ EMOTE_CHOKING_GAS_BOMB
Definition boss_professor_putricide.cpp:46
@ SAY_TRANSFORM_1
Definition boss_professor_putricide.cpp:43
@ SAY_FESTERGUT_DEATH
Definition boss_professor_putricide.cpp:33
@ SAY_ROTFACE_DEATH
Definition boss_professor_putricide.cpp:37
@ SAY_TRANSFORM_2
Definition boss_professor_putricide.cpp:44
@ SAY_BERSERK
Definition boss_professor_putricide.cpp:48
@ EMOTE_UNSTABLE_EXPERIMENT
Definition boss_professor_putricide.cpp:41
@ EVENT_RESUME_ATTACK
Definition boss_professor_putricide.cpp:132
@ EVENT_PHASE_TRANSITION
Definition boss_professor_putricide.cpp:131
Definition boss_professor_putricide.cpp:154
@ EVADE_REASON_OTHER
Definition CreatureAI.h:92
bool UpdateVictim()
Definition CreatureAI.cpp:350
Definition SpellInfo.h:340
void DespawnIf(T const &predicate)
Definition ScriptedCreature.h:97
Definition boss_professor_putricide.cpp:184
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)
Select the best (up to) <num> targets (in <targetType> order) from the threat list that fulfill the f...
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
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16464
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:5174
Unit * GetVictim() const
Definition Unit.h:903
bool HasUnitState(const uint32 f) const
Definition Unit.h:736
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2498
@ NPC_TEAR_GAS_TARGET_STALKER
Definition icecrown_citadel.h:269
@ SPELL_BERSERK2
Definition icecrown_citadel.h:48
Definition boss_professor_putricide.cpp:207
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
void EnterEvadeMode(EvadeReason why) override
Definition boss_professor_putricide.cpp:669
void ChangePhase()
Definition boss_professor_putricide.cpp:677

References _phase, ScriptedAI::AttackStart(), bCallEvade, bChangePhase, Unit::CastSpell(), ChangePhase(), SummonList::DespawnIf(), UnitAI::DoCast(), UnitAI::DoCastAOE(), UnitAI::DoMeleeAttackIfReady(), InstanceScript::DoRemoveAurasDueToSpellOnPlayers(), EMOTE_CHOKING_GAS_BOMB, EMOTE_MALLEABLE_GOO, EMOTE_UNSTABLE_EXPERIMENT, EnterEvadeMode(), CreatureAI::EVADE_REASON_OTHER, EVENT_BERSERK, EVENT_CHOKING_GAS_BOMB, EVENT_GO_TO_TABLE, EVENT_GROUP_ABILITIES, EVENT_MALLEABLE_GOO, EVENT_MUTATED_PLAGUE, EVENT_PHASE_TRANSITION, EVENT_RESUME_ATTACK, EVENT_SLIME_PUDDLE, EVENT_TABLE_DRINK_STUFF, EVENT_UNBOUND_PLAGUE, EVENT_UNSTABLE_EXPERIMENT, WorldObject::FindNearestCreature(), Unit::GetMotionMaster(), Position::GetPositionX(), Position::GetPositionY(), Position::GetPositionZ(), Unit::GetVictim(), Unit::HasUnitState(), BossAI::instance, ScriptedAI::Is25ManRaid(), ScriptedAI::IsHeroic(), ScriptedAI::me, MotionMaster::MoveCharge(), NPC_TEAR_GAS_TARGET_STALKER, POINT_TABLE_COMBAT, Random, REACT_AGGRESSIVE, Unit::RemoveAurasDueToSpell(), SAY_BERSERK, SAY_FESTERGUT_DEATH, SAY_ROTFACE_DEATH, SAY_TRANSFORM_1, SAY_TRANSFORM_2, sayFestergutDeathTimer, sayRotfaceDeathTimer, UnitAI::SelectTarget(), UnitAI::SelectTargetList(), Unit::SetFacingToObject(), Creature::SetReactState(), Unit::SetStandState(), SPELL_BERSERK2, SPELL_CHOKING_GAS_BOMB, SPELL_CREATE_CONCOCTION, SPELL_GAS_VARIABLE, SPELL_GUZZLE_POTIONS, SPELL_MALLEABLE_GOO, SPELL_MUTATED_PLAGUE, SPELL_OOZE_VARIABLE, SPELL_SLIME_PUDDLE_TRIGGER, SPELL_TEAR_GAS_CANCEL, SPELL_TEAR_GAS_PERIODIC_TRIGGER, SPELL_UNBOUND_PLAGUE, SPELL_UNBOUND_PLAGUE_SEARCHER, SPELL_UNSTABLE_EXPERIMENT, sSpellMgr, BossAI::summons, tablePos, UNIT_STAND_STATE_KNEEL, UNIT_STAND_STATE_STAND, UNIT_STATE_CASTING, and CreatureAI::UpdateVictim().

Member Data Documentation

◆ _experimentState

uint8 boss_professor_putricide::boss_professor_putricideAI::_experimentState

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

◆ _phase

uint8 boss_professor_putricide::boss_professor_putricideAI::_phase

◆ bCallEvade

bool boss_professor_putricide::boss_professor_putricideAI::bCallEvade

◆ bChangePhase

bool boss_professor_putricide::boss_professor_putricideAI::bChangePhase

Referenced by DamageTaken(), Reset(), and UpdateAI().

◆ bEnteredCombat

bool boss_professor_putricide::boss_professor_putricideAI::bEnteredCombat

◆ sayFestergutDeathTimer

uint16 boss_professor_putricide::boss_professor_putricideAI::sayFestergutDeathTimer

Referenced by DoAction(), Reset(), and UpdateAI().

◆ sayRotfaceDeathTimer

uint16 boss_professor_putricide::boss_professor_putricideAI::sayRotfaceDeathTimer

Referenced by DoAction(), Reset(), and UpdateAI().


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