240 controller->AI()->EnterEvadeMode(why);
273 if (twilightHalion->IsAlive())
274 twilightHalion->KillSelf();
277 if (controller->IsAlive())
278 controller->KillSelf();
393 return GetRubySanctumAI<boss_halionAI>(creature);
454 halion->LowerPlayerDamageReq(halion->GetMaxHealth());
456 if (halion->IsAlive())
461 if (controller->IsAlive())
462 controller->KillSelf();
497 switch (spellInfo->
Id)
551 return GetRubySanctumAI<boss_twilight_halionAI>(creature);
623 twilightHalion->DespawnOrUnsummon();
629 halion->DespawnOrUnsummon();
768 if (
Player* player = i->GetSource())
769 if (player->IsAlive() &&
IsInBoundary(player) && !player->IsGameMaster())
825 if (damageRatio < 0.98f)
827 else if (0.99f < damageRatio && damageRatio < 1.01f)
829 else if (1.02f < damageRatio)
900 return GetRubySanctumAI<npc_halion_controllerAI>(creature);
950 if (southOrb && northOrb)
961 if (eastOrb && westOrb)
983 return GetRubySanctumAI<npc_orb_carrierAI>(creature);
1028 Position const* ownerPos = halionAI->GetMeteorStrikePosition();
1029 float randomAdjustment =
frand(
static_cast<float>(
M_PI / 5.0f),
static_cast<float>(
M_PI / 2.0f));
1032 angle[1] = angle[0] + randomAdjustment;
1033 angle[2] = angle[0] +
static_cast<float>(
M_PI);
1034 angle[3] = angle[2] + randomAdjustment;
1037 for (
uint8 i = 0; i < 4; i++)
1057 return GetRubySanctumAI<npc_meteor_strike_initialAI>(creature);
1089 controller->AI()->JustSummoned(
me);
1125 return GetRubySanctumAI<npc_meteor_strikeAI>(creature);
1137 _instance(creature->GetInstanceScript())
1152 controller->AI()->JustSummoned(
me);
1186 return GetRubySanctumAI<npc_meteor_strike_flameAI>(creature);
1198 _instance(creature->GetInstanceScript())
1229 controller->AI()->JustSummoned(
me);
1246 int32 damage = 1200 + (stackAmount * 1290);
1263 return GetRubySanctumAI<npc_combustion_consumptionAI>(creature);
1291 controller->AI()->JustSummoned(
me);
1312 return GetRubySanctumAI<npc_living_infernoAI>(creature);
1329 controller->AI()->JustSummoned(
me);
1340 return GetRubySanctumAI<npc_living_emberAI>(creature);
1399 return GetRubySanctumAI<go_twilight_portalAI>(gameobject);
1514 caster->
CastSpell(
nullptr, triggerSpell, args);
1609 if (summon->IsAIEnabled())
1744 if (unitList.empty())
1748 auto const& channelObjects = caster->
m_unitData->ChannelObjects;
1813 Position const offset = { 0.0f, 20.0f, 0.0f, 0.0f };
1819 Position const offset = { 0.0f, -20.0f, 0.0f, 0.0f };
1846 if (!unitList.empty())
DB2Storage< SummonPropertiesEntry > sSummonPropertiesStore("SummonProperties.db2", &SummonPropertiesLoadInfo::Instance)
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)
@ TARGET_UNIT_SRC_AREA_ENTRY
@ TARGET_UNIT_SRC_AREA_ENEMY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_FORCE_CAST
@ AURA_EFFECT_HANDLE_REAL
@ AURA_REMOVE_BY_ENEMY_SPELL
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
@ TRIGGERED_IGNORE_SET_FACING
Will not adjust facing to target (if any)
#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)
@ ACTION_METEOR_STRIKE_AOE
@ ACTION_MONITOR_CORPOREALITY
@ ACTION_METEOR_STRIKE_BURN
@ DATA_TWILIGHT_DAMAGE_TAKEN
@ DATA_MATERIAL_DAMAGE_TAKEN
@ 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
boss_halion::boss_halionAI HalionAI
uint8 const MAX_CORPOREALITY_STATE
Position const HalionRespawnPos
CorporealityEntry const _corporealityReference[MAX_CORPOREALITY_STATE]
Position const HalionSpawnPos
@ CORPOREALITY_TWILIGHT_MENDING
@ EVENT_SHADOW_PULSARS_SHOOT
@ EVENT_SPAWN_METEOR_FLAME
@ EVENT_ACTIVATE_FIREWALL
@ EVENT_CHECK_CORPOREALITY
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 *)
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
bool IsInBoundary(Position const *who=nullptr) const
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
bool IsEngaged() const override
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetRemovedCharges(uint8 amount)
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
bool IsInPhase(uint8 phase) const
void SetPhase(uint8 phase)
GameObjectTemplate const * GetGOInfo() const
virtual bool SetBossState(uint32 id, EncounterState state)
Creature * GetCreature(uint32 type)
void HandleGameObject(ObjectGuid guid, bool open, GameObject *go=nullptr)
void DoUpdateWorldState(int32 worldStateId, int32 value)
virtual ObjectGuid GetGuidData(uint32 type) const override
CreatureBoundary const * GetBossBoundary(uint32 id) const
EncounterState GetBossState(uint32 id) const
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
GameObject * GetGameObject(uint32 type)
TempSummon * SummonCreature(uint32 entry, Position const &pos, SummonPropertiesEntry const *properties=nullptr, Milliseconds duration=0ms, WorldObject *summoner=nullptr, uint32 spellId=0, uint32 vehId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty, SmoothPhasingInfo const *smoothPhasingInfo=nullptr)
Difficulty GetDifficultyID() const
PlayerList const & GetPlayers() const
static ObjectGuid const Empty
static Creature * ToCreature(Object *o)
float GetObjectScale() const
static ObjectGuid GetGUID(Object const *o)
static void AddPhase(WorldObject *object, uint32 phaseId, bool updateVisibility)
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
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 > time, task_handler_t task)
TaskScheduler & Update(success_t const &callback=nullptr)
bool operator()(WorldObject *unit)
TwilightCutterSelector(Unit *caster, Unit *target)
virtual void SetData(uint32, uint32)
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)
void SetHealth(uint64 val)
UF::UpdateField< UF::UnitData, 0, TYPEID_UNIT > m_unitData
Aura * AddAura(uint32 spellId, Unit *target)
void SetUninteractible(bool apply)
bool HasUnitState(const uint32 f) const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
void SetUnitFlag(UnitFlags flags)
Vehicle * GetVehicleKit() const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Unit * GetPassenger(int8 seatId) const
Gets a passenger on specified seat.
bool InSamePhase(PhaseShift const &phaseShift) const
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)
void SetFarVisible(bool on)
bool IsInBetween(Position const &pos1, Position const &pos2, float size=0) const
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
GameObjectAI * GetAI(GameObject *gameobject) const override
CreatureAI * GetAI(Creature *creature) const override
npc_combustion_consumption()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
npc_meteor_strike_flame()
CreatureAI * GetAI(Creature *creature) const override
npc_meteor_strike_initial()
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
CreatureAI * GetAI(Creature *creature) const override
void HandleScript(SpellEffIndex effIndex)
SpellScript * GetSpellScript() const override
spell_halion_blazing_aura()
void HandleScript(SpellEffIndex)
bool Validate(SpellInfo const *) override
SpellScript * GetSpellScript() const override
spell_halion_clear_debuffs()
void OnApply(AuraEffect const *, AuraEffectHandleModes)
spell_halion_combustion_consumption_AuraScript(uint32 spellID)
void AddMarkStack(AuraEffect const *)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleTick(AuraEffect const *aurEff)
bool Validate(SpellInfo const *spellInfo) override
AuraScript * GetAuraScript() const override
spell_halion_combustion_consumption_periodic()
spell_halion_combustion_consumption(char const *scriptName, uint32 spell)
AuraScript * GetAuraScript() const override
void HandleSummon(SpellEffIndex effIndex)
SpellScript * GetSpellScript() const override
spell_halion_damage_aoe_summon()
void BeforeDispel(DispelInfo *dispelData)
We were purged. Force removed stacks to zero and trigger the appropriated remove handler.
bool Validate(SpellInfo const *) override
void OnRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
spell_halion_marks_AuraScript(uint32 summonSpell, uint32 removeSpell)
AuraScript * GetAuraScript() const override
spell_halion_marks(char const *scriptName, uint32 summonSpell, uint32 removeSpell)
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
spell_halion_meteor_strike_marker()
AuraScript * GetAuraScript() const override
void HandleScript(SpellEffIndex)
void SelectMeteorFlames(std::list< WorldObject * > &unitList)
SpellScript * GetSpellScript() const override
spell_halion_spawn_living_embers()
void SetDest0(SpellDestination &dest)
void SetDest1(SpellDestination &dest)
spell_halion_summon_exit_portals()
SpellScript * GetSpellScript() const override
void RemoveNotBetween(std::list< WorldObject * > &unitList)
SpellScript * GetSpellScript() const override
spell_halion_twilight_cutter()
bool Validate(SpellInfo const *) override
spell_halion_twilight_phasing()
SpellScript * GetSpellScript() const override
void OnRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
spell_halion_twilight_realm_handlers_AuraScript(uint32 beforeHitSpell, bool isApplyHandler)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
AuraScript * GetAuraScript() const override
spell_halion_twilight_realm_handlers(char const *scriptName, uint32 beforeHitSpell, bool isApplyHandler)
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)
@ DATA_TWILIGHT_FLAME_RING
@ DATA_GENERAL_ZARITHRIAN
@ WORLDSTATE_CORPOREALITY_TOGGLE
@ WORLDSTATE_CORPOREALITY_MATERIAL
@ WORLDSTATE_CORPOREALITY_TWILIGHT
@ NPC_METEOR_STRIKE_NORTH
@ NPC_METEOR_STRIKE_FLAME
uint32 materialRealmSpell
uint32 twilightRealmSpell
struct GameObjectTemplate::@213::@225 goober
constexpr void SetOrientation(float orientation)
static float NormalizeOrientation(float o)
float GetAbsoluteAngle(float x, float y) const
constexpr void GetPosition(float &x, float &y) const
void SetCombatMovement(bool allowMovement)
virtual void UpdateAI(uint32 diff) override
void RelocateOffset(Position const &offset)
void JustEngagedWith(Unit *who) override
void EnterEvadeMode(EvadeReason why) override
boss_halionAI(Creature *creature)
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void JustDied(Unit *) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
Position _meteorStrikePos
void UpdateAI(uint32 diff) override
Position const * GetMeteorStrikePosition() const
void SetData(uint32 index, uint32 value) override
void JustDied(Unit *killer) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
boss_twilight_halionAI(Creature *creature)
void KilledUnit(Unit *victim) override
void DamageTaken(Unit *attacker, uint32 &damage, DamageEffectType, SpellInfo const *) override
void EnterEvadeMode(EvadeReason) override
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
go_twilight_portalAI(GameObject *gameobject)
void UpdateAI(uint32) override
bool OnGossipHello(Player *player) override
InstanceScript * _instance
npc_combustion_consumptionAI(Creature *creature)
void UpdateAI(uint32) override
void SetData(uint32 type, uint32 stackAmount) override
void IsSummonedBy(WorldObject *summoner) override
InstanceScript * _instance
void JustAppeared() override
void SetData(uint32 id, uint32 value) override
uint32 GetSpell(uint8 pctValue, bool isTwilight=false) const
void JustDied(Unit *) override
uint32 _twilightDamageTaken
InstanceScript * _instance
void JustSummoned(Creature *who) override
void JustExitedCombat() override
void DoAction(int32 action) override
npc_halion_controllerAI(Creature *creature)
uint32 _materialDamageTaken
void UpdateAI(uint32 diff) override
void UpdateCorporeality()
uint8 _materialCorporealityValue
void JustEngagedWith(Unit *) override
void JustDied(Unit *) override
void IsSummonedBy(WorldObject *) override
npc_living_emberAI(Creature *creature)
void IsSummonedBy(WorldObject *) override
void JustDied(Unit *) override
npc_living_infernoAI(Creature *creature)
void UpdateAI(uint32 diff) override
npc_meteor_strikeAI(Creature *creature)
void SetData(uint32 dataType, uint32 dataCount) override
InstanceScript * _instance
void DoAction(int32 action) override
void IsSummonedBy(WorldObject *) override
uint32 GetData(uint32 dataType) const override
void UpdateAI(uint32 diff) override
void IsSummonedBy(WorldObject *) override
void UpdateAI(uint32 diff) override
ObjectGuid _rootOwnerGuid
npc_meteor_strike_flameAI(Creature *creature)
void SetGUID(ObjectGuid const &guid, int32) override
void EnterEvadeMode(EvadeReason) override
InstanceScript * _instance
void UpdateAI(uint32) override
void EnterEvadeMode(EvadeReason) override
void IsSummonedBy(WorldObject *summoner) override
void DoAction(int32 action) override
std::list< Creature * > _meteorList
InstanceScript * _instance
npc_meteor_strike_initialAI(Creature *creature)
npc_orb_carrierAI(Creature *creature)
InstanceScript * _instance
void DoAction(int32 action) override
void TriggerCutter(Unit *caster, Unit *target)
void UpdateAI(uint32 diff) override