176#define EXPERIMENT_STATE_OOZE false
177#define EXPERIMENT_STATE_GAS true
190 if (
Vehicle* veh = summon->GetVehicleKit())
191 veh->RemoveAllPassengers();
316 for (
uint8 i = 0; i < 7; ++i)
449 std::list<Creature*> list;
458 }
while (list.size() > 4);
462 while (!list.empty())
464 std::list<Creature*>::iterator itr = list.begin();
465 std::advance(itr,
urand(0, list.size()-1));
499 std::list<Unit*> targetList;
503 targetList.push_back(target);
506 size_t half = targetList.size()/2;
508 while (half < targetList.size())
510 std::list<Unit*>::iterator itr = targetList.begin();
511 advance(itr,
urand(0, targetList.size() - 1));
513 targetList.erase(itr);
516 for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end(); ++itr)
604 std::list<Unit*> targets;
606 if (!targets.empty())
607 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
633 std::list<Unit*> targets;
635 if (!targets.empty())
638 for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
832 for (
uint8 i = 1; i <= stack; ++i)
874 targets.push_back(target);
967 std::list<Creature*> creList;
970 for (std::list<Creature*>::iterator itr = creList.begin(); itr != creList.end(); ++itr)
973 std::list<Creature*> tmp;
975 if ((!stage && tmp.size() > 1) || (stage && tmp.size() == 1))
1038 if (spellEffectInfo.EffectIndex == skipIndex)
1043 .SetOriginalCaster(
GetCaster()->GetGUID()));
1065 if (eff->GetTickNumber() < 2)
1093 newPlague->SetMaxDuration(oldPlague->GetMaxDuration());
1094 newPlague->SetDuration(oldPlague->GetDuration());
1095 oldPlague->Remove();
1118 if (targets.empty())
1124 targets.push_back(target);
1135 if (grow->GetStackAmount() < 3)
1142 grow->ModStackAmount(-3);
1167 float multiplier = 2.0f;
1168 if (
GetTarget()->GetMap()->Is25ManRaid())
1172 damage =
int32(damage * 1.5f);
1260 if (
GetTarget()->GetMap()->Is25ManRaid())
1278 veh->RemoveAllPassengers();
1342 targets.remove(owner);
1420 resistAmount = resistedDamage;
DB2Storage< SummonPropertiesEntry > sSummonPropertiesStore("SummonProperties.db2", &SummonPropertiesLoadInfo::Instance)
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)
@ 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_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ 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_STATE_RAID_ENCOUNTER
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PROC_TRIGGER_SPELL
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#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)
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
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
@ EVENT_ROTFACE_OOZE_FLOOD
@ EVENT_UNSTABLE_EXPERIMENT
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
Difficulty GetCastDifficulty() const
HookList< EffectProcHandler > OnEffectProc
HookList< AuraProcHandler > OnProc
uint8 GetStackAmount() const
InstanceScript *const instance
virtual void JustSummoned(Creature *)
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void EngagementStart(Unit *who)
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)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
bool IsInPhase(uint8 phase) const
void CancelEvent(uint32 eventId)
void SetPhase(uint8 phase)
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, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
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, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
uint32 ExcludeTargetAuraSpell
uint32 CalcCastTime(Spell *spell=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
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
void FinishCast(SpellCastResult result, int32 *param1=nullptr, int32 *param2=nullptr)
Unit * GetExplTargetUnit() const
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
Unit * GetOriginalCaster() const
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, SpellCastVisual spellVisual, ObjectGuid cast_count, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE, int32 *param1=nullptr, int32 *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)
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)
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
void SetHealth(uint64 val)
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
void SetFacingToObject(WorldObject const *object, bool force=true)
Aura * AddAura(uint32 spellId, Unit *target)
static uint32 CalcSpellResistedDamage(Unit const *attacker, Unit *victim, uint32 damage, SpellSchoolMask schoolMask, SpellInfo const *spellInfo)
void SetUninteractible(bool apply)
void ModifyAuraState(AuraStateType flag, bool apply)
uint64 GetMaxHealth() const
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
bool SetWalk(bool enable)
void RemoveAuraFromStack(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT, uint16 num=1)
void SetSpeedRate(UnitMoveType mtype, float rate)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
void SetCreatorGUID(ObjectGuid creator)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
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)
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
void HandleScript(SpellEffIndex)
void HandleDispel(SpellEffIndex)
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex effIndex)
void SelectTarget(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
void HandleExtraEffect(AuraEffect const *)
void HandleProc(ProcEventInfo &eventInfo)
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleTriggerSpell(AuraEffect const *aurEff)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
SpellCastResult CheckRequirement()
SpellCastResult CheckRequirementInternal(SpellCustomErrors &extendedError)
void SetTarget(std::list< WorldObject * > &targets)
void SelectTarget(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *spell) override
void HandleDummy(SpellEffIndex)
void HandleProc(AuraEffect *aurEff, ProcEventInfo &eventInfo)
bool Validate(SpellInfo const *spellInfo) override
void ExtraEffect(SpellEffIndex)
void ScaleRange(std::list< WorldObject * > &targets)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex)
@ 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)
constexpr std::size_t size()
float GetExactDist2d(const float x, const float y) const
constexpr void GetPosition(float &x, float &y) const
constexpr float GetPositionZ() const
bool operator()(Creature *stalker) const
RotfaceHeightCheck(Creature *rotface)
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
bool HealthAbovePct(uint32 pct) const
Difficulty GetDifficulty() const
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 SetPhase(Phases newPhase)
void JustEngagedWith(Unit *who) override
void CastMainSpell() override
uint32 _newTargetSelectTimer
npc_gas_cloud(Creature *creature)
void CastMainSpell() override
npc_volatile_ooze(Creature *creature)