TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boss_professor_putricide::boss_professor_putricideAI Struct Reference

Public Member Functions

 boss_professor_putricideAI (Creature *creature)
 
void Reset () override
 
void EnterCombat (Unit *who) override
 
void JustReachedHome () override
 
void KilledUnit (Unit *victim) override
 
void JustDied (Unit *) override
 
void JustSummoned (Creature *summon) override
 
void DamageTaken (Unit *, uint32 &) override
 
void MovementInform (uint32 type, uint32 id) override
 
void DoAction (int32 action) override
 
uint32 GetData (uint32 type) const override
 
void SetData (uint32 id, uint32 data) override
 
void UpdateAI (uint32 diff) override
 
- Public Member Functions inherited from BossAI
 BossAI (Creature *creature, uint32 bossId)
 
virtual ~BossAI ()
 
void SummonedCreatureDespawn (Creature *summon) override
 
virtual void ExecuteEvent (uint32)
 
virtual void ScheduleTasks ()
 
bool CanAIAttack (Unit const *target) const override
 
- Public Member Functions inherited from ScriptedAI
 ScriptedAI (Creature *creature)
 
virtual ~ScriptedAI ()
 
void AttackStartNoMove (Unit *target)
 
void SpellHit (Unit *, SpellInfo const *) override
 
void SpellHitTarget (Unit *, SpellInfo const *) override
 
void OnPossess (bool)
 
void AttackStart (Unit *) override
 
void DoStartMovement (Unit *target, float distance=0.0f, float angle=0.0f)
 
void DoStartNoMovement (Unit *target)
 
void DoStopAttack ()
 
void DoCastSpell (Unit *target, SpellInfo const *spellInfo, bool triggered=false)
 
void DoPlaySoundToSet (WorldObject *source, uint32 soundId)
 
void DoResetThreat ()
 
float DoGetThreat (Unit *unit)
 
void DoModifyThreatPercent (Unit *unit, int32 pct)
 
void DoTeleportTo (float x, float y, float z, uint32 time=0)
 
void DoTeleportTo (float const pos[4])
 
void DoTeleportPlayer (Unit *unit, float x, float y, float z, float o)
 
void DoTeleportAll (float x, float y, float z, float o)
 
UnitDoSelectLowestHpFriendly (float range, uint32 minHPDiff=1)
 
std::list< Creature * > DoFindFriendlyCC (float range)
 
std::list< Creature * > DoFindFriendlyMissingBuff (float range, uint32 spellId)
 
PlayerGetPlayerAtMinimumRange (float minRange)
 
CreatureDoSpawnCreature (uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
 
bool HealthBelowPct (uint32 pct) const
 
bool HealthAbovePct (uint32 pct) const
 
SpellInfo constSelectSpell (Unit *target, uint32 school, uint32 mechanic, SelectTargetType targets, float rangeMin, float rangeMax, SelectEffect effect)
 
void SetEquipmentSlots (bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
 
void SetCombatMovement (bool allowMovement)
 
bool IsCombatMovementAllowed () const
 
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
 
- Public Member Functions inherited from CreatureAI
void Talk (uint8 id, WorldObject const *whisperTarget=nullptr)
 
 CreatureAI (Creature *creature)
 
virtual ~CreatureAI ()
 
void MoveInLineOfSight_Safe (Unit *who)
 == Reactions At ================================= More...
 
void TriggerAlert (Unit const *who) const
 
virtual bool CanRespawn ()
 
virtual void EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
virtual void IsSummonedBy (Unit *)
 
virtual void SummonedCreatureDies (Creature *, Unit *)
 
virtual void AttackedBy (Unit *)
 
virtual bool IsEscorted () const
 
virtual void JustRespawned ()
 
void OnCharmed (bool apply) override
 
void DoZoneInCombat (Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
 
virtual void ReceiveEmote (Player *, uint32)
 
virtual void OwnerAttackedBy (Unit *)
 
virtual void OwnerAttacked (Unit *)
 
virtual void CorpseRemoved (uint32 &)
 == Triggered Actions Requested ================== More...
 
virtual void PassengerBoarded (Unit *, int8, bool)
 == Fields ======================================= More...
 
virtual void OnSpellClick (Unit *, bool &)
 
virtual bool CanSeeAlways (WorldObject const *)
 
int32 VisualizeBoundary (uint32 duration, Unit *owner=nullptr, bool fill=false) const
 
virtual bool CheckInRoom ()
 
CreatureBoundary constGetBoundary () const
 
- Public Member Functions inherited from UnitAI
 UnitAI (Unit *unit)
 
virtual ~UnitAI ()
 
virtual void InitializeAI ()
 
virtual void SetGUID (ObjectGuid, int32=0)
 
virtual ObjectGuid GetGUID (int32=0) const
 
UnitSelectTarget (SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
UnitSelectTarget (SelectAggroTarget targetType, uint32 position, PREDICATE const &predicate)
 
void SelectTargetList (std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
 
template<class PREDICATE >
void SelectTargetList (std::list< Unit * > &targetList, PREDICATE const &predicate, uint32 maxTargets, SelectAggroTarget targetType)
 
virtual void DamageDealt (Unit *, uint32 &, DamageEffectType)
 
virtual void HealReceived (Unit *, uint32 &)
 
virtual void HealDone (Unit *, uint32 &)
 
virtual void SpellInterrupted (uint32, uint32)
 
void AttackStartCaster (Unit *victim, float dist)
 
void DoCast (uint32 spellId)
 
void DoCast (Unit *victim, uint32 spellId, bool triggered=false)
 
void DoCastVictim (uint32 spellId, bool triggered=false)
 
void DoCastAOE (uint32 spellId, bool triggered=false)
 
void DoMeleeAttackIfReady ()
 
bool DoSpellAttackIfReady (uint32 spellId)
 
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 sQuestReward (Player *, Quest const *, uint32)
 
virtual bool sOnDummyEffect (Unit *, uint32, SpellEffIndex)
 
virtual void sOnGameEvent (bool, uint16)
 

Private Member Functions

void SetPhase (Phases newPhase)
 

Private Attributes

ObjectGuid _oozeFloodDummyGUIDs [4]
 
Phases _phase
 
float const _baseSpeed
 
uint8 _oozeFloodStage
 
bool _experimentState
 

Additional Inherited Members

- Public Types inherited from CreatureAI
enum  EvadeReason { EVADE_REASON_NO_HOSTILES, EVADE_REASON_BOUNDARY, EVADE_REASON_SEQUENCE_BREAK, EVADE_REASON_OTHER }
 
- Static Public Member Functions inherited from UnitAI
static void FillAISpellInfo ()
 
- Public Attributes inherited from BossAI
InstanceScript *const instance
 
- Public Attributes inherited from ScriptedAI
bool IsFleeing
 
- Static Public Attributes inherited from UnitAI
static AISpellInfoTypeAISpellInfo
 
- Protected Member Functions inherited from BossAI
void _Reset ()
 
void _EnterCombat ()
 
void _JustDied ()
 
void _JustReachedHome ()
 
void _DespawnAtEvade ()
 
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 CheckBoundary (Position const *who=nullptr) const
 
void SetBoundary (CreatureBoundary const *boundary)
 
virtual void MoveInLineOfSight (Unit *)
 
bool _EnterEvadeMode (EvadeReason why=EVADE_REASON_OTHER)
 
- Protected Attributes inherited from BossAI
EventMap events
 
SummonList summons
 
TaskScheduler scheduler
 
- Protected Attributes inherited from CreatureAI
Creature *const me
 
CreatureBoundary const_boundary
 
- Protected Attributes inherited from UnitAI
Unit *const me
 

Constructor & Destructor Documentation

boss_professor_putricide::boss_professor_putricideAI::boss_professor_putricideAI ( Creature creature)
inline
222  : BossAI(creature, DATA_PROFESSOR_PUTRICIDE),
224  {
225  _phase = PHASE_NONE;
226  _oozeFloodStage = 0;
227  }
Definition: icecrown_citadel.h:81
#define EXPERIMENT_STATE_OOZE
Definition: boss_professor_putricide.cpp:169
float const _baseSpeed
Definition: boss_professor_putricide.cpp:705
Phases _phase
Definition: boss_professor_putricide.cpp:704
Definition: boss_professor_putricide.cpp:140
uint8 _oozeFloodStage
Definition: boss_professor_putricide.cpp:706
Definition: Unit.h:600
bool _experimentState
Definition: boss_professor_putricide.cpp:707
BossAI(Creature *creature, uint32 bossId)
Definition: ScriptedCreature.cpp:444
float GetSpeedRate(UnitMoveType mtype) const
Definition: Unit.h:2087

Member Function Documentation

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

Reimplemented from ScriptedAI.

344  {
345  switch (_phase)
346  {
347  case PHASE_COMBAT_1:
348  if (HealthAbovePct(80))
349  return;
352  break;
353  case PHASE_COMBAT_2:
354  if (HealthAbovePct(35))
355  return;
358  break;
359  default:
360  break;
361  }
362  }
Definition: Unit.h:1129
Definition: boss_professor_putricide.cpp:144
bool HealthAbovePct(uint32 pct) const
Definition: ScriptedCreature.h:248
Definition: boss_professor_putricide.cpp:143
Phases _phase
Definition: boss_professor_putricide.cpp:704
Creature *const me
Definition: CreatureAI.h:71
Definition: icecrown_citadel.h:481
void DoAction(int32 action) override
Definition: boss_professor_putricide.cpp:415
void SetReactState(ReactStates st)
Definition: Creature.h:502

+ Here is the call graph for this function:

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

Reimplemented from UnitAI.

416  {
417  switch (action)
418  {
421  me->SetSpeed(MOVE_RUN, _baseSpeed*2.0f, true);
425  if (IsHeroic())
427  break;
431  break;
434  break;
436  {
438  me->SetSpeed(MOVE_RUN, _baseSpeed*2.0f, true);
441  _oozeFloodStage = 0;
443  // init random sequence of floods
445  {
446  std::list<Creature*> list;
447  GetCreatureListWithEntryInGrid(list, rotface, NPC_PUDDLE_STALKER, 50.0f);
448  list.remove_if(RotfaceHeightCheck(rotface));
449  if (list.size() > 4)
450  {
451  list.sort(Trinity::ObjectDistanceOrderPred(rotface));
452  do
453  {
454  list.pop_back();
455  } while (list.size() > 4);
456  }
457 
458  uint8 i = 0;
459  while (!list.empty())
460  {
461  std::list<Creature*>::iterator itr = list.begin();
462  std::advance(itr, urand(0, list.size()-1));
463  _oozeFloodDummyGUIDs[i++] = (*itr)->GetGUID();
464  list.erase(itr);
465  }
466  }
467  break;
468  }
469  case ACTION_ROTFACE_OOZE:
472  dummy->CastSpell(dummy, oozeFloodSpells[_oozeFloodStage], true, NULL, NULL, me->GetGUID()); // cast from self for LoS (with prof's GUID for logs)
473  if (++_oozeFloodStage == 4)
474  _oozeFloodStage = 0;
475  break;
478  break;
479  case ACTION_CHANGE_PHASE:
480  me->SetSpeed(MOVE_RUN, _baseSpeed*2.0f, true);
481  events.DelayEvents(30000);
482  me->AttackStop();
483  if (!IsHeroic())
484  {
487  }
488  else
489  {
493  // cast variables
494  if (Is25ManRaid())
495  {
496  std::list<Unit*> targetList;
497  {
498  const std::list<HostileReference*>& threatlist = me->getThreatManager().getThreatList();
499  for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
500  if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER)
501  targetList.push_back((*itr)->getTarget());
502  }
503 
504  size_t half = targetList.size()/2;
505  // half gets ooze variable
506  while (half < targetList.size())
507  {
508  std::list<Unit*>::iterator itr = targetList.begin();
509  advance(itr, urand(0, targetList.size() - 1));
510  (*itr)->CastSpell(*itr, SPELL_OOZE_VARIABLE, true);
511  targetList.erase(itr);
512  }
513  // and half gets gas
514  for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
515  (*itr)->CastSpell(*itr, SPELL_GAS_VARIABLE, true);
516  }
518  }
519  switch (_phase)
520  {
521  case PHASE_COMBAT_1:
525  break;
526  case PHASE_COMBAT_2:
530  break;
531  default:
532  break;
533  }
534  break;
535  default:
536  break;
537  }
538  }
Definition: boss_professor_putricide.cpp:31
bool AttackStop()
Definition: Unit.cpp:7337
Definition: icecrown_citadel.h:224
Definition: boss_professor_putricide.cpp:35
Definition: boss_professor_putricide.cpp:129
Definition: boss_professor_putricide.cpp:151
Definition: boss_professor_putricide.cpp:131
Definition: Unit.h:1129
Definition: boss_professor_putricide.cpp:144
Definition: icecrown_citadel.h:480
Position const tablePos
Definition: boss_professor_putricide.cpp:157
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
uint32 const oozeFloodSpells[4]
Definition: boss_professor_putricide.cpp:160
Definition: boss_professor_putricide.cpp:128
arena_t NULL
Definition: jemalloc_internal.h:624
TC_GAME_API void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
Definition: ScriptedCreature.cpp:621
ThreatContainer::StorageType const & getThreatList() const
Definition: ThreatManager.h:263
Definition: Object.h:668
Definition: boss_professor_putricide.cpp:73
void CancelEvent(uint32 eventId)
Definition: EventMap.cpp:89
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: Creature.h:467
Definition: boss_professor_putricide.cpp:143
float const _baseSpeed
Definition: boss_professor_putricide.cpp:705
Definition: icecrown_citadel.h:479
void advance(octet_iterator &it, distance_type n, octet_iterator end)
Definition: checked.h:190
Definition: boss_professor_putricide.cpp:65
Phases _phase
Definition: boss_professor_putricide.cpp:704
Creature *const me
Definition: CreatureAI.h:71
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: boss_professor_putricide.cpp:152
Definition: boss_professor_putricide.cpp:64
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: boss_professor_putricide.cpp:142
ObjectGuid _oozeFloodDummyGUIDs[4]
Definition: boss_professor_putricide.cpp:703
Definition: boss_professor_putricide.cpp:74
Definition: boss_professor_putricide.cpp:150
Definition: boss_professor_putricide.cpp:134
Definition: icecrown_citadel.h:475
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Position const festergutWatchPos
Definition: boss_professor_putricide.cpp:155
Definition: icecrown_citadel.h:481
Definition: boss_professor_putricide.cpp:54
Definition: boss_professor_putricide.cpp:145
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
uint8 _oozeFloodStage
Definition: boss_professor_putricide.cpp:706
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void SetPhase(Phases newPhase)
Definition: boss_professor_putricide.cpp:697
Definition: icecrown_citadel.h:478
ObjectGuid const & GetGUID() const
Definition: Object.h:105
Definition: Unit.h:600
Definition: boss_professor_putricide.cpp:41
Definition: ObjectGuid.h:33
Definition: boss_professor_putricide.cpp:119
Definition: boss_professor_putricide.cpp:202
Definition: icecrown_citadel.h:474
Definition: boss_professor_putricide.cpp:118
Definition: icecrown_citadel.h:473
ThreatManager & getThreatManager()
Definition: Unit.h:1998
Definition: boss_professor_putricide.cpp:132
uint8_t uint8
Definition: Define.h:152
EventMap events
Definition: ScriptedCreature.h:371
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
Definition: boss_professor_putricide.cpp:141
Definition: boss_professor_putricide.cpp:122
void SetReactState(ReactStates st)
Definition: Creature.h:502
void DelayEvents(Milliseconds const &delay)
Definition: EventMap.h:219
Position const rotfaceWatchPos
Definition: boss_professor_putricide.cpp:156
InstanceScript *const instance
Definition: ScriptedCreature.h:340
Definition: icecrown_citadel.h:80
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

249  {
251  return;
252 
254  {
255  EnterEvadeMode();
257  return;
258  }
259 
260  me->setActive(true);
261  events.Reset();
265  if (IsHeroic())
267 
269  Talk(SAY_AGGRO);
272 
274  }
void DoCastSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:558
Definition: icecrown_citadel.h:81
Definition: boss_professor_putricide.cpp:133
void Reset()
Definition: EventMap.cpp:20
void setActive(bool isActiveObject)
Definition: Object.cpp:1473
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
Definition: boss_professor_putricide.cpp:128
bool IsHeroic() const
Definition: ScriptedCreature.h:268
Definition: boss_professor_putricide.cpp:143
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: boss_professor_putricide.cpp:71
Player * ToPlayer()
Definition: Object.h:191
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_professor_putricide.cpp:142
Definition: InstanceScript.h:59
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
void SetPhase(Phases newPhase)
Definition: boss_professor_putricide.cpp:697
Definition: boss_professor_putricide.cpp:126
EventMap events
Definition: ScriptedCreature.h:371
Definition: boss_professor_putricide.cpp:127
Definition: boss_professor_putricide.cpp:141
Definition: boss_professor_putricide.cpp:39
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
Definition: InstanceScript.h:236
Definition: icecrown_citadel.h:63
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

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

Reimplemented from UnitAI.

541  {
542  switch (type)
543  {
545  return _experimentState;
546  case DATA_PHASE:
547  return _phase;
548  case DATA_ABOMINATION:
550  default:
551  break;
552  }
553 
554  return 0;
555  }
Definition: boss_professor_putricide.cpp:166
Definition: icecrown_citadel.h:237
Definition: icecrown_citadel.h:236
Phases _phase
Definition: boss_professor_putricide.cpp:704
bool HasEntry(uint32 entry) const
Definition: ScriptedCreature.cpp:88
SummonList summons
Definition: ScriptedCreature.h:372
Definition: boss_professor_putricide.cpp:164
bool _experimentState
Definition: boss_professor_putricide.cpp:707
Definition: boss_professor_putricide.cpp:165
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

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

Reimplemented from BossAI.

291  {
292  _JustDied();
293  Talk(SAY_DEATH);
294 
297 
299  }
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4240
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: icecrown_citadel.h:58
void _JustDied()
Definition: ScriptedCreature.cpp:471
Creature *const me
Definition: CreatureAI.h:71
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: boss_professor_putricide.cpp:48
Definition: boss_professor_putricide.cpp:110
Definition: boss_professor_putricide.cpp:80
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

void boss_professor_putricide::boss_professor_putricideAI::JustReachedHome ( )
inlineoverridevirtual

Reimplemented from BossAI.

277  {
279  me->SetWalk(false);
282  }
Definition: icecrown_citadel.h:81
Definition: boss_professor_putricide.cpp:144
Definition: boss_professor_putricide.cpp:143
Definition: InstanceScript.h:60
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Creature *const me
Definition: CreatureAI.h:71
void _JustReachedHome()
Definition: ScriptedCreature.h:366
Definition: boss_professor_putricide.cpp:145
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
EventMap events
Definition: ScriptedCreature.h:371
InstanceScript *const instance
Definition: ScriptedCreature.h:340

+ Here is the call graph for this function:

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

Reimplemented from BossAI.

302  {
303  summons.Summon(summon);
304  switch (summon->GetEntry())
305  {
307  DoCast(summon, SPELL_MALLEABLE_GOO_H);
308  return;
310  summon->CastSpell(summon, SPELL_GROW_STACKER, true);
311  summon->CastSpell(summon, SPELL_SLIME_PUDDLE_AURA, true);
312  // blizzard casts this spell 7 times initially (confirmed in sniff)
313  for (uint8 i = 0; i < 7; ++i)
314  summon->CastSpell(summon, SPELL_GROW, true);
315  break;
316  case NPC_GAS_CLOUD:
317  // no possible aura seen in sniff adding the aurastate
318  summon->ModifyAuraState(AURA_STATE_UNKNOWN22, true);
319  summon->CastSpell(summon, SPELL_GASEOUS_BLOAT_PROC, true);
320  summon->SetReactState(REACT_PASSIVE);
321  break;
322  case NPC_VOLATILE_OOZE:
323  // no possible aura seen in sniff adding the aurastate
324  summon->ModifyAuraState(AURA_STATE_UNKNOWN19, true);
325  summon->CastSpell(summon, SPELL_OOZE_ERUPTION_SEARCH_PERIODIC, true);
326  summon->SetReactState(REACT_PASSIVE);
327  break;
329  summon->CastSpell(summon, SPELL_CHOKING_GAS_BOMB_PERIODIC, true);
330  summon->CastSpell(summon, SPELL_CHOKING_GAS_EXPLOSION_TRIGGER, true);
331  return;
334  return;
335  default:
336  break;
337  }
338 
339  if (me->IsInCombat())
340  DoZoneInCombat(summon);
341  }
Definition: icecrown_citadel.h:234
void ModifyAuraState(AuraStateType flag, bool apply)
Definition: Unit.cpp:7422
Definition: icecrown_citadel.h:219
Definition: Unit.h:1129
Definition: icecrown_citadel.h:237
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
Definition: CreatureAI.cpp:47
bool IsInCombat() const
Definition: Unit.h:1584
void Summon(Creature const *summon)
Definition: ScriptedCreature.h:92
Definition: icecrown_citadel.h:233
Definition: icecrown_citadel.h:236
Definition: SharedDefines.h:1777
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_professor_putricide.cpp:83
Definition: boss_professor_putricide.cpp:58
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: boss_professor_putricide.cpp:101
SummonList summons
Definition: ScriptedCreature.h:372
Definition: boss_professor_putricide.cpp:88
Definition: boss_professor_putricide.cpp:96
Definition: boss_professor_putricide.cpp:85
Definition: icecrown_citadel.h:231
uint8_t uint8
Definition: Define.h:152
uint32 GetEntry() const
Definition: Object.h:107
Definition: SharedDefines.h:1780
Definition: boss_professor_putricide.cpp:84
Definition: icecrown_citadel.h:232
void SetReactState(ReactStates st)
Definition: Creature.h:502
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:869
Definition: boss_professor_putricide.cpp:100

+ Here is the call graph for this function:

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

Reimplemented from ScriptedAI.

285  {
286  if (victim->GetTypeId() == TYPEID_PLAYER)
287  Talk(SAY_KILL);
288  }
TypeID GetTypeId() const
Definition: Object.h:113
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
Definition: ObjectGuid.h:33
Definition: boss_professor_putricide.cpp:46

+ Here is the call graph for this function:

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

Reimplemented from CreatureAI.

365  {
366  if (type != POINT_MOTION_TYPE)
367  return;
368  switch (id)
369  {
370  case POINT_FESTERGUT:
371  instance->SetBossState(DATA_FESTERGUT, IN_PROGRESS); // needed here for delayed gate close
372  me->SetSpeed(MOVE_RUN, _baseSpeed, true);
375  festergut->CastSpell(festergut, SPELL_GASEOUS_BLIGHT_LARGE, false, NULL, NULL, festergut->GetGUID());
376  break;
377  case POINT_ROTFACE:
378  instance->SetBossState(DATA_ROTFACE, IN_PROGRESS); // needed here for delayed gate close
379  me->SetSpeed(MOVE_RUN, _baseSpeed, true);
382  break;
383  case POINT_TABLE:
384  // stop attack
386  me->SetSpeed(MOVE_RUN, _baseSpeed, true);
388  me->SetFacingToObject(table);
389  // operating on new phase already
390  switch (_phase)
391  {
392  case PHASE_COMBAT_2:
393  {
394  SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_CREATE_CONCOCTION);
397  break;
398  }
399  case PHASE_COMBAT_3:
400  {
401  SpellInfo const* spell = sSpellMgr->GetSpellInfo(SPELL_GUZZLE_POTIONS);
404  break;
405  }
406  default:
407  break;
408  }
409  break;
410  default:
411  break;
412  }
413  }
Definition: boss_professor_putricide.cpp:151
void MoveIdle()
Definition: MotionMaster.cpp:185
Definition: SpellInfo.h:326
Definition: boss_professor_putricide.cpp:144
uint32 CalcCastTime(uint8 level=0, Spell *spell=NULL) const
Definition: SpellInfo.cpp:2504
Definition: icecrown_citadel.h:93
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: Creature.h:467
float const _baseSpeed
Definition: boss_professor_putricide.cpp:705
Definition: boss_professor_putricide.cpp:69
Definition: boss_professor_putricide.cpp:123
Definition: icecrown_citadel.h:479
Phases _phase
Definition: boss_professor_putricide.cpp:704
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_professor_putricide.cpp:152
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
virtual ObjectGuid GetGuidData(uint32 type) const override
Definition: InstanceScript.cpp:93
Definition: boss_professor_putricide.cpp:142
Definition: boss_professor_putricide.cpp:150
Definition: InstanceScript.h:59
#define sSpellMgr
Definition: SpellMgr.h:756
Definition: boss_professor_putricide.cpp:145
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
Definition: GameObject.h:880
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: icecrown_citadel.h:79
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:174
void DoAction(int32 action) override
Definition: boss_professor_putricide.cpp:415
Definition: Unit.h:600
Definition: boss_professor_putricide.cpp:55
Definition: icecrown_citadel.h:474
Definition: boss_professor_putricide.cpp:70
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
Definition: ObjectAccessor.cpp:143
EventMap events
Definition: ScriptedCreature.h:371
void SetSpeed(UnitMoveType mtype, float rate, bool forced=false)
Definition: Unit.cpp:10531
Definition: MotionMaster.h:46
InstanceScript *const instance
Definition: ScriptedCreature.h:340
Definition: boss_professor_putricide.cpp:135
Definition: icecrown_citadel.h:80

+ Here is the call graph for this function:

void boss_professor_putricide::boss_professor_putricideAI::Reset ( )
inlineoverridevirtual

Reimplemented from BossAI.

230  {
234 
235  events.Reset();
240  me->SetWalk(false);
243 
246  }
Definition: icecrown_citadel.h:81
#define EXPERIMENT_STATE_OOZE
Definition: boss_professor_putricide.cpp:169
void DespawnAll()
Definition: ScriptedCreature.cpp:66
void Reset()
Definition: EventMap.cpp:20
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: Unit.h:1130
Definition: inflate.h:49
MovementGeneratorType GetCurrentMovementGeneratorType() const
Definition: MotionMaster.cpp:663
Definition: boss_professor_putricide.cpp:143
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: Unit.h:681
Creature *const me
Definition: CreatureAI.h:71
Definition: boss_professor_putricide.cpp:142
virtual void SetData(uint32, uint32)
Definition: ZoneScript.h:52
Definition: InstanceScript.h:58
virtual bool SetBossState(uint32 id, EncounterState state)
Definition: InstanceScript.cpp:273
Definition: icecrown_citadel.h:79
SummonList summons
Definition: ScriptedCreature.h:372
void SetPhase(Phases newPhase)
Definition: boss_professor_putricide.cpp:697
void RemoveFlag(uint16 index, uint32 oldFlag)
Definition: Object.cpp:1214
Definition: icecrown_citadel.h:94
Definition: UpdateFields.h:109
bool _experimentState
Definition: boss_professor_putricide.cpp:707
bool SetWalk(bool enable)
Definition: Unit.cpp:15800
EventMap events
Definition: ScriptedCreature.h:371
uint32_t uint32
Definition: g3dmath.h:168
Definition: boss_professor_putricide.cpp:141
EncounterState GetBossState(uint32 id) const
Definition: InstanceScript.h:227
void MovementExpired(bool reset=true)
Definition: MotionMaster.h:151
void SetReactState(ReactStates st)
Definition: Creature.h:502
Definition: MotionMaster.h:46
Definition: Unit.h:698
InstanceScript *const instance
Definition: ScriptedCreature.h:340
Definition: icecrown_citadel.h:80

+ Here is the call graph for this function:

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

Reimplemented from UnitAI.

558  {
559  if (id == DATA_EXPERIMENT_STAGE)
560  _experimentState = data != 0;
561  }
Definition: boss_professor_putricide.cpp:164
bool _experimentState
Definition: boss_professor_putricide.cpp:707
void boss_professor_putricide::boss_professor_putricideAI::SetPhase ( Phases  newPhase)
inlineprivate
698  {
699  _phase = newPhase;
700  events.SetPhase(newPhase);
701  }
void SetPhase(uint8 phase)
Definition: EventMap.cpp:27
Phases _phase
Definition: boss_professor_putricide.cpp:704
EventMap events
Definition: ScriptedCreature.h:371

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Reimplemented from BossAI.

564  {
566  return;
567 
568  events.Update(diff);
569 
571  return;
572 
573  while (uint32 eventId = events.ExecuteEvent())
574  {
575  switch (eventId)
576  {
579  EnterEvadeMode();
580  break;
581  case EVENT_FESTERGUT_GOO:
583  events.ScheduleEvent(EVENT_FESTERGUT_GOO, (Is25ManRaid() ? 10000 : 30000) + urand(0, 5000), 0, PHASE_FESTERGUT);
584  break;
585  case EVENT_ROTFACE_DIES:
587  EnterEvadeMode();
588  break;
592  break;
593  case EVENT_BERSERK:
594  Talk(SAY_BERSERK);
596  break;
597  case EVENT_SLIME_PUDDLE:
598  {
599  std::list<Unit*> targets;
600  SelectTargetList(targets, 2, SELECT_TARGET_RANDOM, 0.0f, true);
601  if (!targets.empty())
602  for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
605  break;
606  }
611  break;
612  case EVENT_TEAR_GAS:
615  break;
616  case EVENT_RESUME_ATTACK:
619  // remove Tear Gas
625  break;
626  case EVENT_MALLEABLE_GOO:
627  if (Is25ManRaid())
628  {
629  std::list<Unit*> targets;
630  SelectTargetList(targets, 2, SELECT_TARGET_RANDOM, -7.0f, true);
631  if (!targets.empty())
632  {
634  for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
636  }
637  }
638  else
639  {
640  if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, -7.0f, true))
641  {
643  DoCast(target, SPELL_MALLEABLE_GOO);
644  }
645  }
647  break;
652  break;
655  {
656  DoCast(target, SPELL_UNBOUND_PLAGUE);
658  }
660  break;
664  break;
666  {
667  switch (_phase)
668  {
669  case PHASE_COMBAT_2:
671  me->SetFacingToObject(face);
675  break;
676  case PHASE_COMBAT_3:
678  me->SetFacingToObject(face);
683  break;
684  default:
685  break;
686  }
687  }
688  default:
689  break;
690  }
691  }
692 
694  }
Definition: SharedDefines.h:2426
Definition: icecrown_citadel.h:235
Definition: UnitAI.h:107
void DoCastAOE(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:167
Definition: boss_professor_putricide.cpp:129
bool UpdateVictim()
Definition: CreatureAI.cpp:233
Definition: Unit.h:1131
Definition: boss_professor_putricide.cpp:45
Definition: boss_professor_putricide.cpp:67
Definition: boss_professor_putricide.cpp:63
Definition: Unit.h:163
Definition: Unit.h:565
Definition: boss_professor_putricide.cpp:133
Definition: boss_professor_putricide.cpp:131
Definition: boss_professor_putricide.cpp:59
Definition: boss_professor_putricide.cpp:144
Definition: boss_professor_putricide.cpp:32
Position const tablePos
Definition: boss_professor_putricide.cpp:157
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
MotionMaster * GetMotionMaster()
Definition: Unit.h:2101
Definition: boss_professor_putricide.cpp:172
Definition: boss_professor_putricide.cpp:62
Definition: boss_professor_putricide.cpp:128
Definition: boss_professor_putricide.cpp:72
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: boss_professor_putricide.cpp:73
Definition: boss_professor_putricide.cpp:75
Definition: Creature.h:467
Definition: boss_professor_putricide.cpp:42
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
Definition: Object.cpp:2443
bool IsInPhase(uint8 phase) const
Definition: EventMap.h:290
Definition: boss_professor_putricide.cpp:123
Definition: icecrown_citadel.h:479
Definition: boss_professor_putricide.cpp:76
Phases _phase
Definition: boss_professor_putricide.cpp:704
Creature *const me
Definition: CreatureAI.h:71
Definition: icecrown_citadel.h:43
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
Definition: MotionMaster.h:172
Definition: boss_professor_putricide.cpp:79
Definition: boss_professor_putricide.cpp:152
Definition: boss_professor_putricide.cpp:64
Definition: boss_professor_putricide.cpp:68
void SetFacingToObject(WorldObject const *object)
Definition: Unit.cpp:15787
Definition: boss_professor_putricide.cpp:142
Definition: boss_professor_putricide.cpp:74
Definition: UnitAI.h:35
Definition: boss_professor_putricide.cpp:134
Unit * GetVictim() const
Definition: Unit.h:1379
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:91
uint32_t uint32
Definition: Define.h:150
void SelectTargetList(std::list< Unit * > &targetList, uint32 num, SelectAggroTarget targetType, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition: UnitAI.cpp:96
Definition: boss_professor_putricide.cpp:145
void DoCast(uint32 spellId)
Definition: UnitAI.cpp:101
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
Definition: CreatureAI.cpp:42
void ScheduleEvent(uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0)
Definition: EventMap.h:123
SummonList summons
Definition: ScriptedCreature.h:372
void Update(uint32 time)
Definition: EventMap.h:54
void DoAction(int32 action) override
Definition: boss_professor_putricide.cpp:415
Definition: boss_professor_putricide.cpp:44
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition: Unit.cpp:3586
Definition: boss_professor_putricide.cpp:126
Definition: boss_professor_putricide.cpp:47
Definition: boss_professor_putricide.cpp:119
void AttackStart(Unit *) override
Definition: ScriptedCreature.cpp:117
Definition: boss_professor_putricide.cpp:43
Definition: boss_professor_putricide.cpp:40
Definition: boss_professor_putricide.cpp:118
uint32 ExecuteEvent()
Definition: EventMap.cpp:46
Definition: boss_professor_putricide.cpp:132
void DoMeleeAttackIfReady()
Definition: UnitAI.cpp:49
bool HasUnitState(const uint32 f) const
Definition: Unit.h:1395
EventMap events
Definition: ScriptedCreature.h:371
void HandleEmoteCommand(uint32 anim_id)
Definition: Unit.cpp:1444
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition: UnitAI.cpp:159
Definition: boss_professor_putricide.cpp:127
Definition: boss_professor_putricide.cpp:141
Definition: boss_professor_putricide.cpp:122
void DespawnIf(T const &predicate)
Definition: ScriptedCreature.h:98
Definition: boss_professor_putricide.cpp:36
Definition: Unit.h:1305
void SetReactState(ReactStates st)
Definition: Creature.h:502
void CastCustomSpell(Unit *victim, uint32 spellId, int32 const *bp0, int32 const *bp1, int32 const *bp2, bool triggered, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, ObjectGuid originalCaster=ObjectGuid::Empty)
Definition: Unit.cpp:920
InstanceScript *const instance
Definition: ScriptedCreature.h:340
Definition: boss_professor_putricide.cpp:130
Definition: boss_professor_putricide.cpp:135
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
Definition: InstanceScript.cpp:540
bool Is25ManRaid() const
Definition: ScriptedCreature.h:274

+ Here is the call graph for this function:

Member Data Documentation

float const boss_professor_putricide::boss_professor_putricideAI::_baseSpeed
private
bool boss_professor_putricide::boss_professor_putricideAI::_experimentState
private
ObjectGuid boss_professor_putricide::boss_professor_putricideAI::_oozeFloodDummyGUIDs[4]
private
uint8 boss_professor_putricide::boss_professor_putricideAI::_oozeFloodStage
private
Phases boss_professor_putricide::boss_professor_putricideAI::_phase
private

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