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 (Position const *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)
 
Unit * DoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
Player * GetPlayerAtMinimumRange (float minRange)
 
Creature * DoSpawnCreature (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 >
T const & DUNGEON_MODE (T const &normal5, T const &heroic10) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25) const
 
template<class T >
T const & RAID_MODE (T const &normal10, T const &normal25, T const &heroic10, T const &heroic25) const
 
Player * SelectTargetFromPlayerList (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)
 
WorldObject * GetSummoner () 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
 
Unit * SelectTarget (SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
 
template<class PREDICATE >
Unit * SelectTarget (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 OnDespawn ()
 Called when the unit is about to be removed from the world (despawn, grid unload, corpse disappearing, player logging out etc.)
 
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, int32 aura=0)
 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
Creature * me
 

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 AISpellInfoType * AISpellInfo
 
- 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)
 
Creature * DoSummon (uint32 entry, Position const &pos, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummon (uint32 entry, WorldObject *obj, float radius=5.0f, uint32 despawnTime=30000, TempSummonType summonType=TEMPSUMMON_CORPSE_TIMED_DESPAWN)
 
Creature * DoSummonFlyer (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
234 {
235 bCallEvade = false;
236 bEnteredCombat = false;
237 }
Definition ScriptedCreature.h:485
@ DATA_PROFESSOR_PUTRICIDE
Definition icecrown_citadel.h:95
bool bEnteredCombat
Definition boss_professor_putricide.cpp:245
bool bCallEvade
Definition boss_professor_putricide.cpp:241

References bCallEvade, and bEnteredCombat.

Member Function Documentation

◆ CanAIAttack()

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

Reimplemented from UnitAI.

284 {
285 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;
286 }
bool IsVisible() const
Definition Unit.h:2019
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
679 {
680 Milliseconds heroicDelay = (IsHeroic() ? 25s : 0ms);
681 events.DelayEvents(24s + heroicDelay, EVENT_GROUP_ABILITIES);
682 me->AttackStop();
683 if (!IsHeroic())
684 {
685 me->CastSpell(me, SPELL_TEAR_GAS, false);
686 events.ScheduleEvent(EVENT_GO_TO_TABLE, 2500ms);
687 }
688 else
689 {
693 // cast variables
694 if (Is25ManRaid())
695 {
696 std::list<Unit*> targetList;
697
698 Map::PlayerList const& pl = me->GetMap()->GetPlayers();
699 for (Map::PlayerList::const_iterator itr = pl.begin(); itr != pl.end(); ++itr)
700 if (Player* p = itr->GetSource())
701 if (!p->IsGameMaster())
702 targetList.push_back(p);
703
704 std::size_t half = targetList.size() / 2;
705 // half gets ooze variable
706 while (half < targetList.size())
707 {
708 std::list<Unit*>::iterator itr = targetList.begin();
709 advance(itr, urand(0, targetList.size() - 1));
710 (*itr)->CastSpell(*itr, SPELL_OOZE_VARIABLE, true);
711 targetList.erase(itr);
712 }
713 // and half gets gas
714 for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
715 (*itr)->CastSpell(*itr, SPELL_GAS_VARIABLE, true);
716 }
717
719 }
720
721 switch (_phase)
722 {
723 case 1:
724 _phase = 2;
725 events.ScheduleEvent(EVENT_MALLEABLE_GOO, randtime(25s, 28s) + heroicDelay, EVENT_GROUP_ABILITIES);
726 events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, randtime(35s, 40s) + heroicDelay, EVENT_GROUP_ABILITIES);
727 break;
728 case 2:
729 _phase = 3;
732 break;
733 default:
734 break;
735 }
736 }
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:140
@ POINT_TABLE_COMBAT
Definition boss_professor_putricide.cpp:147
@ SPELL_UNSTABLE_EXPERIMENT
Definition boss_professor_putricide.cpp:67
@ SPELL_OOZE_VARIABLE
Definition boss_professor_putricide.cpp:76
@ SPELL_GAS_VARIABLE
Definition boss_professor_putricide.cpp:77
@ SPELL_TEAR_GAS
Definition boss_professor_putricide.cpp:68
Position const tablePos
Definition boss_professor_putricide.cpp:152
@ SAY_PHASE_TRANSITION_HEROIC
Definition boss_professor_putricide.cpp:43
@ EVENT_CHOKING_GAS_BOMB
Definition boss_professor_putricide.cpp:136
@ EVENT_MUTATED_PLAGUE
Definition boss_professor_putricide.cpp:137
@ EVENT_GO_TO_TABLE
Definition boss_professor_putricide.cpp:130
@ EVENT_MALLEABLE_GOO
Definition boss_professor_putricide.cpp:135
@ EVENT_UNSTABLE_EXPERIMENT
Definition boss_professor_putricide.cpp:129
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:335
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, Movement::PointsArray const *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:822
Definition Player.h:1086
SpellCastResult DoCast(uint32 spellId)
Definition UnitAI.cpp:179
MotionMaster * GetMotionMaster()
Definition Unit.h:1761
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:1372
bool AttackStop()
Force the unit to stop attacking. This will clear UNIT_STATE_MELEE_ATTACKING, Interrupt current spell...
Definition Unit.cpp:7240
Map * GetMap() const
Definition Object.h:637
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:243

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.

396 {
397 if (bChangePhase)
398 return;
399
400 switch (_phase)
401 {
402 case 1:
403 if (HealthAbovePct(80))
404 return;
406 bChangePhase = true;
407 break;
408 case 2:
409 if (HealthAbovePct(35))
410 return;
412 bChangePhase = true;
413 break;
414 default:
415 break;
416 }
417 }
@ REACT_PASSIVE
Definition Unit.h:567
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:244

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.

469 {
470 switch (action)
471 {
474 break;
477 break;
481 break;
484 break;
487 break;
488 default:
489 break;
490 }
491 }
Position const festergutWatchPos
Definition boss_professor_putricide.cpp:150
@ POINT_ROTFACE
Definition boss_professor_putricide.cpp:145
@ POINT_FESTERGUT
Definition boss_professor_putricide.cpp:144
@ SPELL_RELEASE_GAS_VISUAL
Definition boss_professor_putricide.cpp:56
Position const rotfaceWatchPos
Definition boss_professor_putricide.cpp:151
@ SAY_FESTERGUT_GASEOUS_BLIGHT
Definition boss_professor_putricide.cpp:33
@ ACTION_ROTFACE_COMBAT
Definition icecrown_citadel.h:557
@ ACTION_FESTERGUT_DEATH
Definition icecrown_citadel.h:554
@ ACTION_ROTFACE_DEATH
Definition icecrown_citadel.h:559
@ ACTION_FESTERGUT_GAS
Definition icecrown_citadel.h:553
@ ACTION_FESTERGUT_COMBAT
Definition icecrown_citadel.h:552
uint16 sayFestergutDeathTimer
Definition boss_professor_putricide.cpp:239
uint16 sayRotfaceDeathTimer
Definition boss_professor_putricide.cpp:240

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.

671 {
673 if (!me->IsInCombat() && me->GetExactDist2d(&p) > 10.0f)
676 }
@ POINT_TABLE
Definition boss_professor_putricide.cpp:146
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:941
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.

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

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.

343 {
344 _JustDied();
346
348 DoCastAOE(SPELL_UNHOLY_INFUSION_CREDIT, true); // ReqTargetAura in dbc
349
350 me->CastSpell((Unit*)nullptr, SPELL_MUTATED_PLAGUE_CLEAR, true);
351 }
@ SPELL_UNHOLY_INFUSION_CREDIT
Definition boss_professor_putricide.cpp:114
@ SPELL_MUTATED_PLAGUE_CLEAR
Definition boss_professor_putricide.cpp:83
@ SAY_DEATH
Definition boss_professor_putricide.cpp:50
void _JustDied()
Definition ScriptedCreature.cpp:664
SpellCastResult DoCastAOE(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:286
Definition Unit.h:665
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Definition Unit.cpp:5764
@ 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.

295 {
297 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
298 {
299 me->CombatStop();
301 return;
302 }
303
304 bEnteredCombat = true;
306 events.Reset();
307 events.ScheduleEvent(EVENT_BERSERK, 10min);
310 if (IsHeroic())
312
315
316 me->setActive(true);
321 }
@ IN_PROGRESS
Definition InstanceScript.h:59
Position const homePos
Definition boss_chromaggus.cpp:71
@ SPELL_OOZE_TANK_PROTECTION
Definition boss_professor_putricide.cpp:74
@ SAY_AGGRO
Definition boss_professor_putricide.cpp:41
@ EVENT_SLIME_PUDDLE
Definition boss_professor_putricide.cpp:128
@ EVENT_UNBOUND_PLAGUE
Definition boss_professor_putricide.cpp:134
@ EVENT_BERSERK
Definition boss_professor_putricide.cpp:127
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:400
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition InstanceScript.cpp:701
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition InstanceScript.h:265
void RemoveAllAuras()
Definition Unit.cpp:5359
void CombatStop(bool includingCast=false, bool mutualPvP=true)
Definition Unit.cpp:7273
void setActive(bool isActiveObject)
Definition Object.cpp:1091
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:52
@ DATA_NAUSEA_ACHIEVEMENT
Definition icecrown_citadel.h:111

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.

354 {
355 if (summon->GetEntry() != 38308 && summon->GetEntry() != 38309 && (!me->IsInCombat() || me->IsInEvadeMode()))
356 {
357 summon->DespawnOrUnsummon(1ms);
358 return;
359 }
360
361 summons.Summon(summon);
362
363 switch (summon->GetEntry())
364 {
366 // blizzard casts this spell 7 times initially (confirmed in sniff)
367 for (uint8 i = 0; i < 7; ++i)
368 summon->CastSpell(summon, SPELL_GROW, true);
369 return;
370 case NPC_GAS_CLOUD:
371 // no possible aura seen in sniff adding the aurastate
373 summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true);
375 break;
377 // no possible aura seen in sniff adding the aurastate
379 summon->CastSpell(summon, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, true);
381 break;
383 summon->CastSpell(summon, SPELL_CHOKING_GAS_BOMB_PERIODIC, true);
384 summon->CastSpell(summon, SPELL_CHOKING_GAS_EXPLOSION_TRIGGER, true);
385 return;
388 return;
389 }
390
391 if (me->IsInCombat())
392 summon->SetInCombatWithZone();
393 }
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:99
@ SPELL_CHOKING_GAS_BOMB_PERIODIC
Definition boss_professor_putricide.cpp:103
@ SPELL_GASEOUS_BLOAT_PROC
Definition boss_professor_putricide.cpp:91
@ SPELL_GROW
Definition boss_professor_putricide.cpp:87
@ SPELL_CHOKING_GAS_EXPLOSION_TRIGGER
Definition boss_professor_putricide.cpp:104
void SetInCombatWithZone()
Set in combat all units in the dungeon/raid. Affect only units with IsAIEnabled.
Definition Creature.cpp:2882
void DespawnOrUnsummon(Milliseconds msTimeToDespawn=0ms, Seconds forcedRespawnTimer=0s)
Definition Creature.cpp:2216
bool IsInEvadeMode() const
Definition Creature.h:138
uint32 GetEntry() const
Definition Object.h:123
void Summon(Creature const *summon)
Definition ScriptedCreature.h:88
void ModifyAuraState(AuraStateType flag, bool apply)
Definition Unit.cpp:7384
@ NPC_CHOKING_GAS_BOMB
Definition icecrown_citadel.h:281
@ NPC_VOLATILE_OOZE
Definition icecrown_citadel.h:280
@ NPC_GAS_CLOUD
Definition icecrown_citadel.h:279
@ NPC_GROWING_OOZE_PUDDLE
Definition icecrown_citadel.h:278

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.

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

References Object::IsPlayer(), and SAY_KILL.

◆ MoveInLineOfSight()

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

Reimplemented from CreatureAI.

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

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.

420 {
421 if (type != POINT_MOTION_TYPE)
422 return;
423 switch (id)
424 {
425 case POINT_FESTERGUT:
427 {
428 if (c->IsInCombat())
429 {
433 c->CastSpell(c, SPELL_GASEOUS_BLIGHT_LARGE, true, nullptr, nullptr, c->GetGUID());
434 }
435 else
436 {
437 bCallEvade = true;
438 }
439 }
440 break;
441 case POINT_ROTFACE:
443 {
444 if (c->IsInCombat())
445 {
448 }
449 else
450 {
451 bCallEvade = true;
452 }
453 }
454 break;
455 case POINT_TABLE:
458 break;
461 me->GetMotionMaster()->Clear(false);
463 events.ScheduleEvent(EVENT_TABLE_DRINK_STUFF, IsHeroic() ? 25s : 0ms);
464 break;
465 }
466 }
@ 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:57
@ EVENT_TABLE_DRINK_STUFF
Definition boss_professor_putricide.cpp:131
Definition Creature.h:47
ObjectGuid GetGuidData(uint32 type) const override
Definition InstanceScript.cpp:115
Map * instance
Definition InstanceScript.h:149
Creature * GetCreature(ObjectGuid const &guid)
Definition Map.cpp:2442
void MoveIdle()
Definition MotionMaster.cpp:235
void Clear(bool reset=true)
Definition MotionMaster.h:194
void SetFacingTo(float ori)
Definition Unit.cpp:16068
void SetUInt32Value(uint16 index, uint32 value)
Definition Unit.cpp:16980
@ DATA_ROTFACE
Definition icecrown_citadel.h:94
@ DATA_FESTERGUT
Definition icecrown_citadel.h:93
float GetOrientation() const
Definition Position.h:124
void DoAction(int32 action) override
Definition boss_professor_putricide.cpp:468

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.

248 {
252 _phase = 1;
253 bChangePhase = false;
254 _Reset();
257
260 }
@ DONE
Definition InstanceScript.h:61
@ UNIT_STAND_STATE_STAND
Definition UnitDefines.h:35
@ REACT_AGGRESSIVE
Definition Unit.h:569
void _Reset()
Definition ScriptedCreature.cpp:644
EncounterState GetBossState(uint32 id) const
Definition InstanceScript.h:252
void SetStandState(uint8 state)
Definition Unit.cpp:12731
void RemoveUnitFlag(UnitFlags flags)
UnitFlags available in UnitDefines.h.
Definition Unit.h:750

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.

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

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.

494 {
496 {
497 if (sayFestergutDeathTimer <= diff)
498 {
502 }
503 else
505 }
506 else if (sayRotfaceDeathTimer)
507 {
508 if (sayRotfaceDeathTimer <= diff)
509 {
513 }
514 else
515 sayRotfaceDeathTimer -= diff;
516 }
517 else if (bCallEvade)
518 {
519 bCallEvade = false;
521 return;
522 }
523
524 if (!UpdateVictim())
525 return;
526
527 events.Update(diff);
528
530 return;
531
532 if (bChangePhase)
533 {
534 ChangePhase();
535 bChangePhase = false;
536 return;
537 }
538
539 switch (events.ExecuteEvent())
540 {
541 case EVENT_BERSERK:
544 break;
546 {
547 std::list<Unit*> targets;
548 SelectTargetList(targets, 2, SelectTargetMethod::Random, 0, 0.0f, true);
549 if (!targets.empty())
550 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
553 }
554 break;
559 break;
563 break;
565 switch (_phase)
566 {
567 case 2:
568 {
569 SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_CREATE_CONCOCTION);
571 events.ScheduleEvent(EVENT_PHASE_TRANSITION, Milliseconds(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250));
572 break;
573 }
574 case 3:
575 {
576 SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_GUZZLE_POTIONS);
578 events.ScheduleEvent(EVENT_PHASE_TRANSITION, Milliseconds(sSpellMgr->GetSpellForDifficultyFromSpell(spell, me)->CalcCastTime() + 2250));
579 break;
580 }
581 default:
582 break;
583 }
584 break;
586 {
587 switch (_phase)
588 {
589 case 2:
591 me->SetFacingToObject(face);
594 events.ScheduleEvent(EVENT_RESUME_ATTACK, 5500ms);
595 break;
596 case 3:
598 me->SetFacingToObject(face);
601 events.ScheduleEvent(EVENT_RESUME_ATTACK, 8500ms);
602 break;
603 default:
604 break;
605 }
606 }
607 break;
612 // remove Tear Gas
615 if (_phase == 3)
619 break;
622 {
623 me->CastSpell(target, SPELL_UNBOUND_PLAGUE, false);
626 }
627 else
628 events.ScheduleEvent(EVENT_UNBOUND_PLAGUE, 3500ms, EVENT_GROUP_ABILITIES);
629 break;
631 if (Is25ManRaid())
632 {
633 std::list<Unit*> targets;
635
636 if (!targets.empty())
637 {
639 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
640 me->CastSpell(*itr, SPELL_MALLEABLE_GOO, true);
641 }
642 }
643 else
644 {
646 {
648 me->CastSpell(target, SPELL_MALLEABLE_GOO, true);
649 }
650 }
651 events.ScheduleEvent(EVENT_MALLEABLE_GOO, 25s, 30s, EVENT_GROUP_ABILITIES);
652 break;
656 events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, 35s, 40s, EVENT_GROUP_ABILITIES);
657 break;
659 if (Unit* target = me->GetVictim())
660 me->CastSpell(target, SPELL_MUTATED_PLAGUE, false);
662 break;
663 default:
664 break;
665 }
666
668 }
#define sSpellMgr
Definition SpellMgr.h:847
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:79
@ SPELL_SLIME_PUDDLE_TRIGGER
Definition boss_professor_putricide.cpp:64
@ SPELL_TEAR_GAS_PERIODIC_TRIGGER
Definition boss_professor_putricide.cpp:71
@ SPELL_MUTATED_PLAGUE
Definition boss_professor_putricide.cpp:82
@ SPELL_UNBOUND_PLAGUE
Definition boss_professor_putricide.cpp:78
@ SPELL_TEAR_GAS_CANCEL
Definition boss_professor_putricide.cpp:70
@ SPELL_CREATE_CONCOCTION
Definition boss_professor_putricide.cpp:72
@ SPELL_MALLEABLE_GOO
Definition boss_professor_putricide.cpp:66
@ SPELL_CHOKING_GAS_BOMB
Definition boss_professor_putricide.cpp:75
@ SPELL_GUZZLE_POTIONS
Definition boss_professor_putricide.cpp:73
@ EMOTE_MALLEABLE_GOO
Definition boss_professor_putricide.cpp:46
@ EMOTE_CHOKING_GAS_BOMB
Definition boss_professor_putricide.cpp:47
@ SAY_TRANSFORM_1
Definition boss_professor_putricide.cpp:44
@ SAY_FESTERGUT_DEATH
Definition boss_professor_putricide.cpp:34
@ SAY_ROTFACE_DEATH
Definition boss_professor_putricide.cpp:38
@ SAY_TRANSFORM_2
Definition boss_professor_putricide.cpp:45
@ SAY_BERSERK
Definition boss_professor_putricide.cpp:49
@ EMOTE_UNSTABLE_EXPERIMENT
Definition boss_professor_putricide.cpp:42
@ EVENT_RESUME_ATTACK
Definition boss_professor_putricide.cpp:133
@ EVENT_PHASE_TRANSITION
Definition boss_professor_putricide.cpp:132
Definition boss_professor_putricide.cpp:155
@ 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:185
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:41
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:117
Unit * SelectTarget(SelectTargetMethod targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Definition UnitAI.cpp:112
void SetFacingToObject(WorldObject *object, Milliseconds timed=0ms)
Definition Unit.cpp:16078
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:4936
Unit * GetVictim() const
Definition Unit.h:904
bool HasUnitState(const uint32 f) const
Definition Unit.h:737
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition Object.cpp:2558
@ NPC_TEAR_GAS_TARGET_STALKER
Definition icecrown_citadel.h:282
@ SPELL_BERSERK2
Definition icecrown_citadel.h:48
Definition boss_professor_putricide.cpp:208
void AttackStart(Unit *) override
Definition ScriptedCreature.cpp:228
void EnterEvadeMode(EvadeReason why) override
Definition boss_professor_putricide.cpp:670
void ChangePhase()
Definition boss_professor_putricide.cpp:678

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: