235 controller->AI()->EnterEvadeMode(why);
268 if (twilightHalion->IsAlive())
269 twilightHalion->KillSelf();
272 if (controller->IsAlive())
273 controller->KillSelf();
441 halion->LowerPlayerDamageReq(halion->GetMaxHealth());
443 if (halion->IsAlive())
448 if (controller->IsAlive())
449 controller->KillSelf();
484 switch (spellInfo->
Id)
602 twilightHalion->DespawnOrUnsummon();
608 halion->DespawnOrUnsummon();
747 if (
Player* player = i->GetSource())
748 if (player->IsAlive() &&
IsInBoundary(player) && !player->IsGameMaster())
804 if (damageRatio < 0.98f)
806 else if (0.99f < damageRatio && damageRatio < 1.01f)
808 else if (1.02f < damageRatio)
919 if (southOrb && northOrb)
930 if (eastOrb && westOrb)
987 Position const* ownerPos = halionAI->GetMeteorStrikePosition();
988 float randomAdjustment =
frand(
static_cast<float>(
M_PI / 5.0f),
static_cast<float>(
M_PI / 2.0f));
991 angle[1] = angle[0] + randomAdjustment;
992 angle[2] = angle[0] +
static_cast<float>(
M_PI);
993 angle[3] = angle[2] + randomAdjustment;
996 for (
uint8 i = 0; i < 4; i++)
1038 controller->AI()->JustSummoned(
me);
1076 _instance(creature->GetInstanceScript())
1091 controller->AI()->JustSummoned(
me);
1128 _instance(creature->GetInstanceScript())
1155 controller->AI()->JustSummoned(
me);
1172 int32 damage = 1200 + (stackAmount * 1290);
1208 controller->AI()->JustSummoned(
me);
1236 controller->AI()->JustSummoned(
me);
1383 caster->
CastSpell(
nullptr, triggerSpell, args);
1456 if (summon->IsAIEnabled())
1560 if (unitList.empty())
1610 Position const offset = { 0.0f, 20.0f, 0.0f, 0.0f };
1616 Position const offset = { 0.0f, -20.0f, 0.0f, 0.0f };
1634 if (!unitList.empty())
@ RAID_DIFFICULTY_25MAN_HEROIC
DBCStorage< SummonPropertiesEntry > sSummonPropertiesStore(SummonPropertiesfmt)
std::chrono::seconds Seconds
Seconds shorthand typedef.
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ ENCOUNTER_FRAME_DISENGAGE
@ ENCOUNTER_FRAME_PHASE_SHIFT_CHANGED
@ TEMPSUMMON_TIMED_DESPAWN
float frand(float min, float max)
Milliseconds randtime(Milliseconds min, Milliseconds max)
#define RegisterSpellScript(spell_script)
#define RegisterSpellScriptWithArgs(spell_script, script_name,...)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_FORCE_CAST
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ AURA_REMOVE_BY_ENEMY_SPELL
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_IGNORE_SET_FACING
Will ignore interruptible aura's at cast.
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define SpellDestinationTargetSelectFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_UNINTERACTIBLE
@ EVENT_SHADOW_PULSARS_SHOOT
@ EVENT_SPAWN_METEOR_FLAME
@ EVENT_ACTIVATE_FIREWALL
@ EVENT_CHECK_CORPOREALITY
@ ACTION_METEOR_STRIKE_AOE
@ ACTION_MONITOR_CORPOREALITY
@ ACTION_METEOR_STRIKE_BURN
@ SPELL_COSMETIC_FIRE_PILLAR
@ SPELL_METEOR_STRIKE_COUNTDOWN
@ SPELL_FIERY_COMBUSTION_SUMMON
@ SPELL_METEOR_STRIKE_FIRE_AURA_1
@ SPELL_SUMMON_TWILIGHT_PORTAL
@ SPELL_MARK_OF_COMBUSTION
@ SPELL_METEOR_STRIKE_AOE_DAMAGE
@ SPELL_TWILIGHT_DIVISION
@ SPELL_LEAVE_TWILIGHT_REALM
@ SPELL_TWILIGHT_PRECISION
@ SPELL_SOUL_CONSUMPTION_SUMMON
@ SPELL_SPAWN_LIVING_EMBERS
@ SPELL_SOUL_CONSUMPTION_EXPLOSION
@ SPELL_FIERY_COMBUSTION_EXPLOSION
@ SPELL_TWILIGHT_PULSE_PERIODIC
@ SPELL_SUMMON_EXIT_PORTALS
@ SPELL_MARK_OF_CONSUMPTION
@ SPELL_TWILIGHT_CUTTER_TRIGGERED
@ SPELL_COMBUSTION_DAMAGE_AURA
@ SPELL_SUMMON_LIVING_EMBER
@ SPELL_CONSUMPTION_DAMAGE_AURA
@ SPELL_METEOR_STRIKE_FIRE_AURA_2
@ DATA_TWILIGHT_DAMAGE_TAKEN
@ DATA_MATERIAL_DAMAGE_TAKEN
uint8 const MAX_CORPOREALITY_STATE
Position const HalionRespawnPos
CorporealityEntry const _corporealityReference[MAX_CORPOREALITY_STATE]
Position const HalionSpawnPos
@ CORPOREALITY_TWILIGHT_MENDING
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
ObjectGuid GetCasterGUID() const
HookList< AuraDispelHandler > OnDispel
Unit * GetUnitOwner() const
uint8 GetStackAmount() const
InstanceScript *const instance
void JustEngagedWith(Unit *who) override
virtual void JustSummoned(Creature *)
@ EVADE_REASON_NO_HOSTILES
void DoZoneInCombat(Creature *creature=nullptr)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool IsInBoundary(Position const *who=nullptr) const
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetPhaseMask(uint32 newPhaseMask, bool update) override
bool IsEngaged() const override
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
bool IsDamageEnoughForLootingAndReward() const
void SetRemovedCharges(uint8 amount)
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)
GameObjectTemplate const * GetGOInfo() const
void SetPhaseMask(uint32 newPhaseMask, bool update) override
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
virtual ObjectGuid GetGuidData(uint32 type) const override
CreatureBoundary const * GetBossBoundary(uint32 id) const
EncounterState GetBossState(uint32 id) const
GameObject * GetGameObject(uint32 type)
void DoUpdateWorldState(uint32 worldstateId, uint32 worldstateValue)
void SendEncounterUnit(EncounterFrameType type, Unit const *unit=nullptr, uint8 param1=0, uint8 param2=0)
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, uint32 duration=0, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Difficulty GetDifficulty() const
PlayerList const & GetPlayers() const
static ObjectGuid const Empty
static Creature * ToCreature(Object *o)
float GetObjectScale() const
static ObjectGuid GetGUID(Object const *o)
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
HookList< HitHandler > OnHit
HookList< EffectHandler > OnEffectHit
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
SpellValue const * GetSpellValue() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
SpellInfo const * GetSpellInfo() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void Summon(Creature const *summon)
void DoZoneInCombat(uint32 entry=0)
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
bool operator()(WorldObject *unit)
TwilightCutterSelector(Unit *caster, Unit *target)
virtual void SetData(uint32, uint32)
void DoMeleeAttackIfReady()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual uint32 GetData(uint32) const
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 DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
void CastStop(uint32 except_spellid=0)
Aura * AddAura(uint32 spellId, Unit *target)
void SetHealth(uint32 val)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
ObjectGuid GetChannelObjectGuid() const
bool HasUnitState(const uint32 f) const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true)
void SetUnitFlag(UnitFlags flags)
Vehicle * GetVehicleKit() const
void RemoveUnitFlag(UnitFlags flags)
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
void setActive(bool isActiveObject)
Position GetNearPosition(float dist, float angle)
bool InSamePhase(uint32 phasemask) const
void SetFarVisible(bool on)
bool IsInBetween(Position const &pos1, Position const &pos2, float size=0) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareSpellScript(spell_halion_blazing_aura)
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_halion_clear_debuffs)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_halion_combustion_consumption_periodic)
bool Validate(SpellInfo const *spellInfo) override
void HandleTick(AuraEffect const *aurEff)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
spell_halion_combustion_consumption(uint32 spellID)
PrepareAuraScript(spell_halion_combustion_consumption)
void AddMarkStack(AuraEffect const *)
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleSummon(SpellEffIndex effIndex)
PrepareSpellScript(spell_halion_damage_aoe_summon)
spell_halion_marks(uint32 summonSpell, uint32 removeSpell)
bool Validate(SpellInfo const *) override
void BeforeDispel(DispelInfo *dispelData)
We were purged. Force removed stacks to zero and trigger the appropriated remove handler.
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
PrepareAuraScript(spell_halion_marks)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_halion_meteor_strike_marker)
void HandleScript(SpellEffIndex)
void SelectMeteorFlames(std::list< WorldObject * > &unitList)
PrepareSpellScript(spell_halion_spawn_living_embers)
void SetDest1(SpellDestination &dest)
void SetDest0(SpellDestination &dest)
PrepareSpellScript(spell_halion_summon_exit_portals)
PrepareSpellScript(spell_halion_twilight_cutter)
void RemoveNotBetween(std::list< WorldObject * > &unitList)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_halion_twilight_phasing)
spell_halion_twilight_realm_handlers(uint32 beforeHitSpell, bool isApplyHandler)
PrepareAuraScript(spell_halion_twilight_realm_handlers)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void OnApply(AuraEffect const *, AuraEffectHandleModes)
TC_GAME_API Unit * GetUnit(WorldObject const &, ObjectGuid const &guid)
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
void RandomResize(C &container, std::size_t requestedSize)
#define RegisterRubySanctumCreatureAI(ai_name)
@ DATA_TWILIGHT_FLAME_RING
@ DATA_GENERAL_ZARITHRIAN
@ WORLDSTATE_CORPOREALITY_TOGGLE
@ WORLDSTATE_CORPOREALITY_MATERIAL
@ WORLDSTATE_CORPOREALITY_TWILIGHT
#define RegisterRubySanctumGameObjectAI(ai_name)
@ NPC_METEOR_STRIKE_NORTH
@ NPC_METEOR_STRIKE_FLAME
uint32 materialRealmSpell
uint32 twilightRealmSpell
struct GameObjectTemplate::@191::@202 goober
static float NormalizeOrientation(float o)
float GetAbsoluteAngle(float x, float y) const
void SetOrientation(float orientation)
void GetPosition(float &x, float &y) const
void SetCombatMovement(bool allowMovement)
virtual void UpdateAI(uint32 diff) override
void RelocateOffset(Position const &offset)
void SetData(uint32 index, uint32 value) override
boss_halion(Creature *creature)
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
Position _meteorStrikePos
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
void EnterEvadeMode(EvadeReason why) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
Position const * GetMeteorStrikePosition() const
void JustEngagedWith(Unit *who) override
void UpdateAI(uint32 diff) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustEngagedWith(Unit *who) override
void KilledUnit(Unit *victim) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void EnterEvadeMode(EvadeReason) override
boss_twilight_halion(Creature *creature)
void JustDied(Unit *killer) override
void UpdateAI(uint32) override
go_twilight_portal(GameObject *gameobject)
InstanceScript * _instance
bool OnGossipHello(Player *player) override
void SetData(uint32 type, uint32 stackAmount) override
void IsSummonedBy(WorldObject *summoner) override
InstanceScript * _instance
void UpdateAI(uint32) override
npc_combustion_consumption(Creature *creature)
void JustAppeared() override
uint8 _materialCorporealityValue
void JustDied(Unit *) override
uint32 _materialDamageTaken
void DoAction(int32 action) override
void JustExitedCombat() override
void SetData(uint32 id, uint32 value) override
uint32 _twilightDamageTaken
uint32 GetSpell(uint8 pctValue, bool isTwilight=false) const
void JustSummoned(Creature *who) override
void JustEngagedWith(Unit *) override
void UpdateCorporeality()
void UpdateAI(uint32 diff) override
npc_halion_controller(Creature *creature)
InstanceScript * _instance
npc_living_ember(Creature *creature)
void IsSummonedBy(WorldObject *) override
void JustDied(Unit *) override
npc_living_inferno(Creature *creature)
void IsSummonedBy(WorldObject *) override
void UpdateAI(uint32 diff) override
void JustDied(Unit *) override
void SetGUID(ObjectGuid const &guid, int32) override
npc_meteor_strike_flame(Creature *creature)
void IsSummonedBy(WorldObject *) override
InstanceScript * _instance
void UpdateAI(uint32 diff) override
ObjectGuid _rootOwnerGuid
void EnterEvadeMode(EvadeReason) override
std::list< Creature * > _meteorList
void DoAction(int32 action) override
void UpdateAI(uint32) override
void IsSummonedBy(WorldObject *summoner) override
npc_meteor_strike_initial(Creature *creature)
void EnterEvadeMode(EvadeReason) override
InstanceScript * _instance
void IsSummonedBy(WorldObject *) override
InstanceScript * _instance
npc_meteor_strike(Creature *creature)
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void SetData(uint32 dataType, uint32 dataCount) override
uint32 GetData(uint32 dataType) const override
void DoAction(int32 action) override
void TriggerCutter(Unit *caster, Unit *target)
InstanceScript * _instance
npc_orb_carrier(Creature *creature)
void UpdateAI(uint32 diff) override