111 std::list<Creature*> waxStatues;
115 for (
Creature* waxStatue : waxStatues)
116 waxStatue->DespawnOrUnsummon();
305 .TriggeringAura = aurEff
403 static constexpr uint8 MAX_TARGETS = 1;
405 if (targets.size() <= MAX_TARGETS)
417 auto closestTargetItr = std::ranges::min_element(targets, std::ranges::less(), [caster =
GetCaster()](
WorldObject const* obj)
419 return caster->GetExactDist2dSq(obj->
GetPosition());
422 if (closestTargetItr == targets.end())
427 targets.push_back(closestTarget);
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ ENCOUNTER_FRAME_DISENGAGE
#define RegisterAreaTriggerAI(ai_name)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
@ TARGET_UNIT_TARGET_ENEMY
@ TARGET_UNIT_RECT_CASTER
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ AURA_EFFECT_HANDLE_REAL
@ TRIGGERED_IGNORE_CAST_IN_PROGRESS
Will not check if a current cast is in progress.
@ TRIGGERED_DONT_REPORT_CAST_ERROR
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
#define SpellObjectTargetSelectFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
@ EVENT_DARKFLAME_PICKAXE
void AddSC_boss_the_candle_king()
@ SPELL_THROW_DARKFLAME_MARKER
@ SPELL_DARKFLAME_PICKAXE_DAMAGE
@ SPELL_EERIE_MOLDS_SUMMON
@ SPELL_CURSED_WAX_VISUAL
@ SPELL_THROW_DARKFLAME_MISSILE
@ SPELL_MOLTEN_WAX_DAMAGE
@ SPELL_DARKFLAME_PICKAXE_VISUAL
@ SPELL_THROW_DARKFLAME_SELECTOR
@ SPELL_EERIE_MOLDS_SELECTOR
@ SPELL_DARKFLAME_PICKAXE_MARKER
@ SPELL_EERIE_MOLDS_CLONE_SUMMONER
@ SPELL_DARKFLAME_PICKAXE_SELECTOR
@ SPELL_DARKFLAME_PICKAXE_CAST
AreaTriggerAI(AreaTrigger *a, uint32 scriptId={}) noexcept
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
ObjectGuid const & GetGUID() const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
DarkflamePickaxeDamageEvent(Unit *caster, ObjectGuid const &targetGUID, ObjectGuid const &originalCastId)
ObjectGuid _originalCastId
bool Execute(uint64, uint32) override
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
virtual bool SetBossState(uint32 id, EncounterState state)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
Duration GetRemainingCooldown(SpellInfo const *spellInfo) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectTargetSelectHandler > OnObjectTargetSelect
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
SpellHistory * GetSpellHistory()
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
bool Validate(SpellInfo const *) override
void HandleHitTarget(SpellEffIndex) const
void ClearTarget(WorldObject *&target)
void HandleHitTarget(SpellEffIndex) const
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
bool Validate(SpellInfo const *) override
void HandleHitTarget(SpellEffIndex) const
bool Validate(SpellInfo const *) override
void HandleHit(SpellEffIndex)
void HandleHitTarget(SpellEffIndex) const
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes) const
void HandleHitTarget(SpellEffIndex) const
bool Validate(SpellInfo const *) override
#define RegisterDarkflameCleftCreatureAI(ai_name)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
constexpr void GetPosition(float &x, float &y) const
Difficulty GetDifficulty() const
void OnUnitExit(Unit *unit, AreaTriggerExitReason) override
void OnUnitEnter(Unit *unit) override
void OnUnitEnter(Unit *unit) override
void OnUnitExit(Unit *unit, AreaTriggerExitReason) override
void OnUnitEnter(Unit *unit) override
void KilledUnit(Unit *victim) override
bool TryCastSpellIfReady(uint32 spellId)
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
void EnterEvadeMode(EvadeReason) override
boss_the_candle_king(Creature *creature)
void OnSpellStart(SpellInfo const *spellInfo) override
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
Milliseconds GetCooldownOfSpell(uint32 spellId)