193 switch(spellInfo->
Id)
257 std::vector<Unit*> blizzards;
261 blizzards.push_back(temp);
264 return newTarget->GetGUID();
346 std::list<Unit*> targets;
348 for (
Unit* target : targets)
362 if (pTarget->IsAlive())
547 _block = block->GetGUID();
575 blizzard->CastSpell(
nullptr, blizzard->m_spells[0],
TRIGGERED_NONE);
582 blizzard->GetMotionMaster()->MoveFollow(newTarget, 0.1f, 0.0f);
586 blizzard->GetMotionMaster()->MoveFollow(target, 0.1f, 0.0f);
605 creature->DespawnOrUnsummon();
622 target->DespawnOrUnsummon();
std::chrono::seconds Seconds
Seconds shorthand typedef.
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
std::chrono::minutes Minutes
Minutes shorthand typedef.
@ TEMPSUMMON_TIMED_DESPAWN
std::vector< ObjectGuid > GuidVector
Milliseconds randtime(Milliseconds min, Milliseconds max)
#define RegisterSpellScript(spell_script)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_SCHOOL_MASK_FROST
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_NON_ATTACKABLE
std::map< ObjectGuid, ObjectGuid > IceBlockMap
@ SPELL_FROST_BREATH_ANTICHEAT
@ SPELL_WING_BUFFET_PERIODIC
@ SPELL_WING_BUFFET_DESPAWN_PERIODIC
@ SPELL_SUMMON_WING_BUFFET
void AddSC_boss_sapphiron()
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
bool operator()(Unit *unit) const
BlizzardTargetSelector(std::vector< Unit * > const &blizzards)
std::vector< Unit * > const & _blizzards
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
uint32 m_spells[MAX_CREATURE_SPELLS]
void GetHomePosition(float &x, float &y, float &z, float &ori) const
void SetReactState(ReactStates st)
void Repeat(Milliseconds time)
bool IsInPhase(PhaseIndex phase) const
void SetPhase(PhaseIndex phase)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
void SetRespawnTime(int32 respawn)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveFollow(Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
static ObjectGuid const Empty
static Creature * ToCreature(Object *o)
static Unit * ToUnit(Object *o)
static ObjectGuid GetGUID(Object const *o)
Creature * GetHitCreature() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
Creature * GetSummonerCreatureBase() const
void DoMeleeAttackIfReady()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void InitializeAI()
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 SetGUID(ObjectGuid const &, int32=0)
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
SpellCastResult DoCast(uint32 spellId)
void StopMoving(bool force=false)
MotionMaster * GetMotionMaster()
bool SetHover(bool enable, bool updateAnimTier=true)
TempSummon * ToTempSummon()
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
void HandleEmoteCommand(Emote emoteId)
void SetUnitFlag(UnitFlags flags)
int32 GetResistance(SpellSchools school) const
void RemoveUnitFlag(UnitFlags flags)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
virtual uint32 GetData(uint32) const
virtual void SetData(uint32, uint32)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool OnCheck(Player *, Unit *target) override
achievement_the_hundred_club()
void HandlePeriodic(AuraEffect const *)
PrepareAuraScript(spell_sapphiron_change_blizzard_target)
PrepareSpellScript(spell_sapphiron_despawn_buffet)
void HandleScriptEffect(SpellEffIndex)
void HandleRemove(AuraEffect const *, AuraEffectHandleModes)
void HandlePeriodic(AuraEffect const *)
PrepareAuraScript(spell_sapphiron_icebolt)
void HandleApply(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_sapphiron_summon_blizzard)
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void PeriodicTick(AuraEffect const *)
PrepareAuraScript(spell_sapphiron_wing_buffet_despawn_periodic)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API GameObject * GetGameObject(WorldObject const &u, ObjectGuid const &guid)
TC_GAME_API Player * GetPlayer(Map const *, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
#define RegisterNaxxramasGameObjectAI(ai_name)
@ DATA_HAD_SAPPHIRON_BIRTH
#define RegisterNaxxramasCreatureAI(ai_name)
void GetPosition(float &x, float &y) const
bool HealthAbovePct(uint32 pct) const
T const & RAID_MODE(T const &normal10, T const &normal25) const
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
ObjectGuid GetGUID(int32 data) const override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
boss_sapphiron(Creature *creature)
void EnterPhaseGround(bool initial)
void MovementInform(uint32, uint32 id) override
void InitializeAI() override
uint32 GetData(uint32 data) const override
void UpdateAI(uint32 diff) override
GuidVector _iceboltTargets
void DoAction(int32 param) override
void SpellHitTarget(WorldObject *target, SpellInfo const *spellInfo) override
InstanceScript * instance
go_sapphiron_birth(GameObject *go)
void OnLootStateChanged(uint32 state, Unit *who) override
void SetGUID(ObjectGuid const &guid, int32 id) override
ObjectGuid GetGUID(int32 data) const override
npc_sapphiron_blizzard(Creature *creature)
void UpdateAI(uint32 diff) override
void InitializeAI() override
void JustAppeared() override
npc_sapphiron_wing_buffet(Creature *creature)