236 Creature* goldenSerpent = me->GetInstanceScript()->GetCreature(DATA_GOLDEN_SERPENT);
240 me->GetMotionMaster()->Clear();
242 me->GetMotionMaster()->MoveFollow(goldenSerpent, 2.0f, {}, {},
true);
251 if (me->GetHealth() <= damage)
253 damage = me->GetHealth() - 1;
255 if (!_isMoltenGoldCast)
258 me->GetMotionMaster()->Clear();
260 _isMoltenGoldCast =
true;
277 me->GetMotionMaster()->Clear();
282 me->SetUninteractible(
true);
288 _scheduler.Update(diff);
@ ENCOUNTER_FRAME_DISENGAGE
#define RegisterAreaTriggerAI(ai_name)
#define RegisterSpellScript(spell_script)
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
#define AuraEffectRemoveFn(F, I, N, M)
@ ACTION_ANNOUNCE_ABSORB_ANIMATED_GOLD
@ SAY_ANNOUNCE_ABSORB_ANIMATED_GOLD
void AddSC_boss_golden_serpent()
@ PATH_GOLDEN_SERPENT_SUBMERGE
@ PATH_GOLDEN_SERPENT_FLYING
@ PATH_GOLDEN_SERPENT_LANDING
constexpr Position GoldenSerpentRespawnPos
@ SPELL_GOLDEN_SERPENT_EMERGE_STATE
@ SPELL_BREAK_PLAYER_TARGETTING
@ SPELL_MOLTEN_GOLD_DAMAGE
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectApplyHandler > AfterEffectApply
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
bool _EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Creature * GetCreature(uint32 type)
EncounterState GetBossState(uint32 id) const
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
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={})
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void DoAction(int32 param)
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 SetImmuneToPC(bool apply, bool keepCombat)
void SetPlayHoverAnim(bool enable, bool sendUpdate=true)
void SetFaction(uint32 faction) override
void SetAnimTier(AnimTier animTier, bool notifyClient=true)
MotionMaster * GetMotionMaster()
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
void SetUninteractible(bool apply)
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
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 OnApply(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
#define RegisterKingsRestCreatureAI(ai_name)
constexpr void Relocate(float x, float y)
void OnUnitEnter(Unit *unit) override
at_kings_rest_molten_gold(AreaTrigger *areatrigger)
void OnUnitExit(Unit *unit, AreaTriggerExitReason) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
void DoAction(int32 action) override
boss_the_golden_serpent(Creature *creature)
void InitializeAI() override
void JustDied(Unit *) override
void EnterEvadeMode(EvadeReason) override
void WaypointPathEnded(uint32, uint32 pathId) override
void JustAppeared() override
void MovementInform(uint32 type, uint32) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustAppeared() override
void UpdateAI(uint32 diff) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
npc_animated_gold(Creature *creature)