122#define SPELL_GASEOUS_BLOAT_HELPER RAID_MODE<uint32>(70672, 72455, 72832, 72833)
178#define EXPERIMENT_STATE_OOZE false
179#define EXPERIMENT_STATE_GAS true
192 if (
Vehicle* veh = summon->GetVehicleKit())
193 veh->RemoveAllPassengers();
319 for (
uint8 i = 0; i < 7; ++i)
452 std::list<Creature*> list;
461 }
while (list.size() > 4);
465 while (!list.empty())
467 std::list<Creature*>::iterator itr = list.begin();
468 std::advance(itr,
urand(0, list.size()-1));
501 std::list<Unit*> targetList;
505 targetList.push_back(target);
508 size_t half = targetList.size()/2;
510 while (half < targetList.size())
512 std::list<Unit*>::iterator itr = targetList.begin();
513 advance(itr,
urand(0, targetList.size() - 1));
515 targetList.erase(itr);
518 for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
606 std::list<Unit*> targets;
608 if (!targets.empty())
609 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
635 std::list<Unit*> targets;
637 if (!targets.empty())
640 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
842 for (
uint8 i = 1; i <= stack; ++i)
886 targets.push_back(target);
985 std::list<Creature*> creList;
988 for (std::list<Creature*>::iterator itr = creList.begin(); itr != creList.end(); ++itr)
991 std::list<Creature*> tmp;
993 if ((!stage && tmp.size() > 1) || (stage && tmp.size() == 1))
1062 if (spellEffectInfo.EffectIndex == skipIndex)
1090 if (eff->GetTickNumber() < 2)
1116 if (
Aura* oldPlague =
GetCaster()->GetAura(plagueId, professor->GetGUID()))
1118 if (
Aura* newPlague = professor->AddAura(plagueId,
GetHitUnit()))
1120 newPlague->SetMaxDuration(oldPlague->GetMaxDuration());
1121 newPlague->SetDuration(oldPlague->GetDuration());
1122 oldPlague->Remove();
1147 if (targets.empty())
1153 targets.push_back(target);
1164 if (grow->GetStackAmount() < 3)
1171 grow->ModStackAmount(-3);
1196 spell =
sSpellMgr->GetSpellForDifficultyFromSpell(spell, caster);
1199 float multiplier = 2.0f;
1200 if (
GetTarget()->GetMap()->GetSpawnMode() & 1)
1204 damage =
int32(damage * 1.5f);
1295 if (
GetTarget()->GetMap()->GetSpawnMode() & 1)
1315 veh->RemoveAllPassengers();
1383 targets.remove(owner);
1466 resistAmount = resistedDamage;
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_UNIT_DEST_AREA_ENEMY
@ TARGET_UNIT_SRC_AREA_ALLY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ TARGET_UNIT_DEST_AREA_ENTRY
@ SPELL_SCHOOL_MASK_SHADOW
@ SPELL_SCHOOL_MASK_NATURE
@ SPELL_CUSTOM_ERROR_NONE
@ SPELL_CUSTOM_ERROR_TOO_MANY_ABOMINATIONS
@ SPELL_CUSTOM_ERROR_ALL_POTIONS_USED
@ SPELL_FAILED_TARGET_NOT_PLAYER
@ SPELL_FAILED_CUSTOM_ERROR
@ SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW
@ SPELL_FAILED_BAD_TARGETS
@ SPELL_FAILED_NO_VALID_TARGETS
@ AURA_REMOVE_BY_ENEMY_SPELL
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define SpellCheckCastFn(F)
#define AuraEffectProcFn(F, I, N)
#define SpellOnResistAbsorbCalculateFn(F)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_UNINTERACTIBLE
Position const festergutWatchPos
@ SPELL_UNBOUND_PLAGUE_PROTECTION
@ SPELL_UNBOUND_PLAGUE_SEARCHER
@ SPELL_OOZE_ERUPTION_SEARCH_PERIODIC
@ SPELL_CHOKING_GAS_BOMB_PERIODIC
@ SPELL_VOLATILE_OOZE_ADHESIVE
@ SPELL_SLIME_PUDDLE_AURA
@ SPELL_SLIME_PUDDLE_TRIGGER
@ SPELL_MUTATED_TRANSFORMATION
@ SPELL_GASEOUS_BLOAT_PROTECTION
@ SPELL_MUTATED_TRANSFORMATION_DAMAGE
@ SPELL_TEAR_GAS_CREATURE
@ SPELL_TEAR_GAS_PERIODIC_TRIGGER
@ SPELL_UNSTABLE_EXPERIMENT
@ SPELL_GASEOUS_BLOAT_PROC
@ SPELL_UNHOLY_INFUSION_CREDIT
@ SPELL_OOZE_TANK_PROTECTION
@ SPELL_ABOMINATION_VEHICLE_POWER_DRAIN
@ SPELL_VOLATILE_OOZE_PROTECTION
@ SPELL_CREATE_CONCOCTION
@ SPELL_MUTATED_TRANSFORMATION_NAME
@ SPELL_TEAR_GAS_TRIGGER_MISSILE
@ SPELL_RELEASE_GAS_VISUAL
@ SPELL_GASEOUS_BLIGHT_LARGE
@ SPELL_GASEOUS_BLIGHT_MEDIUM
@ SPELL_GASEOUS_BLIGHT_SMALL
@ SPELL_MALLEABLE_GOO_SUMMON
@ SPELL_CHOKING_GAS_EXPLOSION_TRIGGER
@ SPELL_MUTATED_PLAGUE_CLEAR
@ EVENT_ROTFACE_OOZE_FLOOD
@ EVENT_UNSTABLE_EXPERIMENT
Position const rotfaceWatchPos
@ SAY_PHASE_TRANSITION_HEROIC
@ SAY_FESTERGUT_GASEOUS_BLIGHT
@ EMOTE_UNSTABLE_EXPERIMENT
uint32 const oozeFloodSpells[4]
void AddSC_boss_professor_putricide()
#define EXPERIMENT_STATE_OOZE
AbominationDespawner(Unit *owner)
bool operator()(ObjectGuid guid)
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
SpellInfo const * GetSpellInfo() const
ObjectGuid GetCasterGUID() const
HookList< EffectProcHandler > OnEffectProc
HookList< AuraProcHandler > OnProc
uint8 GetStackAmount() const
InstanceScript *const instance
virtual void JustSummoned(Creature *)
void DoZoneInCombat(Creature *creature=nullptr)
void EngagementStart(Unit *who)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetCombatPulseDelay(uint32 delay)
void SetImmuneToPC(bool apply) override
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
Unit * GetAttacker() const
void DelayEvents(Milliseconds delay)
bool IsInPhase(PhaseIndex phase) const
void CancelEvent(EventId eventId)
void SetPhase(PhaseIndex phase)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
ExactDistanceCheck(Unit *source, float dist)
bool operator()(WorldObject *unit) const
virtual bool SetBossState(uint32 id, EncounterState state)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
Unit * GetActionTarget() const
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
uint32 ExcludeTargetAuraSpell
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > const & GetEffects() const
HookList< CheckCastHandler > OnCheckCast
Creature * GetHitCreature() const
HookList< HitHandler > AfterHit
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
int32 GetEffectValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
HookList< OnCalculateResistAbsorbHandler > OnCalculateResistAbsorb
Unit * GetExplTargetUnit() const
SpellInfo const * GetSpellInfo() const
void FinishCast(SpellCastResult result, uint32 *param1=nullptr, uint32 *param2=nullptr)
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, uint32 *param1=nullptr, uint32 *param2=nullptr)
bool HasEntry(uint32 entry) const
void DespawnIf(T const &predicate)
void Summon(Creature const *summon)
Trinity::IteratorPair< ThreatListIterator, std::nullptr_t > GetUnsortedThreatList() const
void FixateTarget(Unit *target)
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
virtual void SetData(uint32, uint32)
void DoMeleeAttackIfReady()
virtual uint32 GetData(uint32) const
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
void SelectTargetList(std::list< Unit * > &targetList, uint32 num, SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
virtual void AttackStart(Unit *)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void EnterVehicle(Unit *base, int8 seatId=-1)
void ClearUnitState(uint32 f)
Vehicle * GetVehicle() const
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
ThreatManager & GetThreatManager()
MotionMaster * GetMotionMaster()
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
uint32 GetMaxHealth() const
Aura * AddAura(uint32 spellId, Unit *target)
static uint32 CalcSpellResistedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const *spellInfo)
void SetHealth(uint32 val)
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void SetFacingToObject(WorldObject const *object, bool force=true, uint32 movementId=EVENT_FACE)
void ModifyAuraState(AuraStateType flag, bool apply)
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool SetWalk(bool enable)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SetSpeedRate(UnitMoveType mtype, float rate)
bool HasUnitState(const uint32 f) const
void HandleEmoteCommand(Emote emoteId)
void SetCreatorGUID(ObjectGuid creator)
void RemoveUnitFlag(UnitFlags flags)
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
void setActive(bool isActiveObject)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
virtual void SetData(uint32, uint32)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
npc_putricide_oozeAI(Creature *creature, uint32 auraSpellId, uint32 hitTargetSpellId)
void UpdateAI(uint32 diff) override
void SpellHitTarget(WorldObject *, SpellInfo const *spellInfo) override
virtual void CastMainSpell()=0
uint32 _newTargetSelectTimer
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
InstanceScript * _instance
PrepareSpellScript(spell_putricide_choking_gas_bomb)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_putricide_choking_gas_filter)
void HandleDispel(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_putricide_clear_aura_effect_value)
void HandleScript(SpellEffIndex effIndex)
PrepareSpellScript(spell_putricide_eat_ooze)
void SelectTarget(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
PrepareAuraScript(spell_putricide_gaseous_bloat)
void HandleExtraEffect(AuraEffect const *)
void HandleProc(ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_putricide_mutated_plague)
void HandleTriggerSpell(AuraEffect const *aurEff)
PrepareAuraScript(spell_putricide_mutation_init_aura)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_putricide_mutation_init)
SpellCastResult CheckRequirement()
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
void SetTarget(std::list< WorldObject * > &targets)
void SelectTarget(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *spell) override
PrepareSpellScript(spell_putricide_ooze_channel)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_putricide_ooze_eruption_searcher)
PrepareAuraScript(spell_putricide_ooze_tank_protection)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *spellInfo) override
void ExtraEffect(SpellEffIndex)
PrepareSpellScript(spell_putricide_regurgitated_ooze)
PrepareSpellScript(spell_putricide_slime_puddle_aura)
PrepareSpellScript(spell_putricide_slime_puddle)
void ScaleRange(std::list< WorldObject * > &targets)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_putricide_unbound_plague)
PrepareSpellScript(spell_putricide_unstable_experiment)
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_stinky_precious_decimate)
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ ACTION_FESTERGUT_COMBAT
@ DATA_NAUSEA_ACHIEVEMENT
@ DATA_PROFESSOR_PUTRICIDE
@ NPC_TEAR_GAS_TARGET_STALKER
@ NPC_ABOMINATION_WING_MAD_SCIENTIST_STALKER
@ NPC_MUTATED_ABOMINATION_25
@ NPC_MALLEABLE_OOZE_STALKER
@ NPC_MUTATED_ABOMINATION_10
@ NPC_GROWING_OOZE_PUDDLE
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void RandomResize(C &container, std::size_t requestedSize)
float GetExactDist2d(const float x, const float y) const
float GetPositionZ() const
void GetPosition(float &x, float &y) const
bool operator()(Creature *stalker) const
RotfaceHeightCheck(Creature *rotface)
void AttackStart(Unit *) override
bool HealthAbovePct(uint32 pct) const
void SetPhase(PutricidePhases newPhase)
ObjectGuid _oozeFloodDummyGUIDs[4]
void DamageTaken(Unit *, uint32 &, DamageEffectType, SpellInfo const *) override
uint32 GetData(uint32 type) const override
void DoAction(int32 action) override
boss_professor_putricide(Creature *creature)
void JustSummoned(Creature *summon) override
void KilledUnit(Unit *victim) override
void MovementInform(uint32 type, uint32 id) override
void JustDied(Unit *) override
void SetData(uint32 id, uint32 data) override
void UpdateAI(uint32 diff) override
void JustReachedHome() override
void JustEngagedWith(Unit *who) override
void CastMainSpell() override
uint32 _newTargetSelectTimer
npc_gas_cloud(Creature *creature)
void CastMainSpell() override
npc_volatile_ooze(Creature *creature)