233 std::vector<Creature*> spawns;
243 spawn->DespawnOrUnsummon();
275 switch (spellInfo->
Id)
441 std::vector<Creature*> triggers;
543 if (me->IsWithinDistInMap(vashj, 6.0f))
544 DoCastSelf(SPELL_SURGE);
696 trigger->InterruptNonMeleeSpells(
false);
First const & RAND(First const &first, Second const &second, Rest const &... rest)
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
bool roll_chance(float chance, PseudoRandomDistributionState &state)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
Creature * GetClosestCreatureWithEntry(WorldObject *source, uint32 entry, float maxSearchRange, bool alive=true)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_UNIT_SRC_AREA_ENEMY
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
@ NPC_ENCHANTED_ELEMENTAL
void AddSC_boss_lady_vashj()
@ MAX_DEACTIVATED_GENERATORS
static constexpr std::array< uint32, 4 > ShieldGeneratorData
@ ACTION_SHIELD_GENERATOR_DEACTIVATED
@ ACTION_INTRO_EVENT_TRIGGERED
@ ACTION_TAINTED_ELEMENTAL_DESPAWNED
@ ACTION_TAINTED_ELEMENTAL_DIES
@ SPELL_SUMMON_WAVE_A_MOB_TRIGGER_1
@ SPELL_SUMMON_WAVE_C_MOB
@ SPELL_SUMMON_WAVE_B_MOB
@ SPELL_WAVE_A_1_PERIODIC
@ SPELL_SUMMON_WAVE_A_MOB_TRIGGER_2
@ SPELL_SUMMON_WAVE_C_MOB_TRIGGER
@ SPELL_SUMMON_WAVE_D_MOB_TRIGGER
@ SPELL_SUMMON_WAVE_A_MOB
@ SPELL_SUMMON_WAVE_A_MOB_TRIGGER_4
@ SPELL_SUMMON_WAVE_B_MOB_TRIGGER
@ SPELL_WAVE_A_4_PERIODIC
@ SPELL_SUMMON_WAVE_A_MOB_TRIGGER_3
@ SPELL_REMOVE_TAINTED_CORES
@ SPELL_SUMMON_WAVE_E_MOB_3
@ SPELL_SUMMON_WAVE_E_MOB_2
@ SPELL_WAVE_A_2_PERIODIC
@ SPELL_SUMMON_WAVE_D_MOB
@ SPELL_REMOVE_TAINTED_CORES_EFFECT
@ SPELL_WAVE_A_3_PERIODIC
@ SPELL_SUMMON_WAVE_E_MOB_TRIGGER
@ SPELL_SUMMON_WAVE_E_MOB_1
@ EVENT_SUMMON_TAINTED_ELEMENTAL
@ EVENT_SUMMON_COILFANG_STRIDER
@ EVENT_SUMMON_COILFANG_ELITE
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
void Repeat(Milliseconds time)
void CancelEvent(EventId eventId)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
void ActivateObject(GameObjectActions action, int32 param, WorldObject *spellCaster=nullptr, uint32 spellId=0, int32 effectIndex=-1)
Creature * GetCreature(uint32 type)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
GameObject * GetGameObject(uint32 type)
void MoveFollow(Unit *target, float dist, Optional< ChaseAngle > angle={}, Optional< Milliseconds > duration={}, bool ignoreTargetWalk=false, MovementSlot slot=MOTION_SLOT_ACTIVE, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
void MovePath(uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< MovementFadeObject > fadeObject={}, Scripting::v2::ActionResultSetter< MovementStopReason > &&scriptResult={})
static ObjectGuid const Empty
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< EffectHandler > OnEffectHit
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
TaskScheduler & Update()
Update the scheduler to the current time.
void AttackStartCaster(Unit *victim, float dist)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void InitializeAI()
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Unit * SelectTarget(SelectTargetMethod targetType, uint32 offset=0, float dist=0.0f, bool playerOnly=false, bool withTank=true, int32 aura=0)
SpellCastResult DoCast(uint32 spellId)
void SetHealth(uint64 val)
uint64 CountPctFromMaxHealth(float pct) const
MotionMaster * GetMotionMaster()
bool HealthBelowPctDamaged(float pct, uint32 damage) const
UF::UpdateField< UF::UnitData, int32(WowCS::EntityFragment::CGObject), TYPEID_UNIT > m_unitData
void SetSpeedRate(UnitMoveType mtype, float rate)
bool HealthAbovePct(float pct) const
bool HasUnitState(const uint32 f) const
void SendPlaySpellVisualKit(uint32 id, uint32 type, uint32 duration) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Creature * FindNearestCreatureWithOptions(float range, FindCreatureOptions const &options) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
bool OnRemove(Player *player, Item *) override
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex)
void RandomResize(C &container, std::size_t requestedSize)
@ DATA_SHIELD_GENERATOR_1
@ DATA_SHIELD_GENERATOR_2
@ DATA_SHIELD_GENERATOR_3
@ DATA_SHIELD_GENERATOR_4
#define RegisterSerpentshrineCavernGameObjectAI(ai_name)
#define RegisterSerpentshrineCavernCreatureAI(ai_name)
void ResetThreatList(Unit *who=nullptr)
void KilledUnit(Unit *) override
Milliseconds _summonSporebatStaticTimer
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
boss_lady_vashj(Creature *creature)
void DoAction(int32 action) override
void AttackStart(Unit *who) override
void EnterEvadeMode(EvadeReason) override
bool _isSecondPhaseStarted
void UpdateAI(uint32 diff) override
uint8 _generatorsDeactivatedCount
bool _isSecondPhaseInProgress
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void OnSpellCast(SpellInfo const *spellInfo) override
void MovementInform(uint32 type, uint32 pointId) override
go_bridge_console(GameObject *go)
bool OnGossipHello(Player *) override
InstanceScript * _instance
go_shield_generator(GameObject *go)
bool OnGossipHello(Player *) override
InstanceScript * _instance
InstanceScript * _instance
void UpdateAI(uint32 diff) override
npc_enchanted_elemental(Creature *creature)
void JustAppeared() override
void InitializeAI() override
void UpdateAI(uint32 diff) override
npc_tainted_elemental(Creature *creature)
void JustDied(Unit *) override
void InitializeAI() override
InstanceScript * _instance
void JustAppeared() override
void WaypointPathEnded(uint32, uint32) override
void InitializeAI() override
npc_toxic_sporebat(Creature *creature)
void JustAppeared() override