120#define SPELL_DARK_ESSENCE_HELPER RAID_MODE<uint32>(65684, 67176, 67177, 67178)
121#define SPELL_LIGHT_ESSENCE_HELPER RAID_MODE<uint32>(65686, 67222, 67223, 67224)
123#define SPELL_POWERING_UP_HELPER RAID_MODE<uint32>(67590, 67602, 67603, 67604)
125#define SPELL_UNLEASHED_DARK_HELPER RAID_MODE<uint32>(65808, 67172, 67173, 67174)
126#define SPELL_UNLEASHED_LIGHT_HELPER RAID_MODE<uint32>(65795, 67238, 67239, 67240)
134#define ESSENCE_REMOVE 0
135#define ESSENCE_APPLY 1
242 if (!pSister->IsAlive())
518 return spellReturned;
546 float x =
frand(x0 - r, x0 + r);
547 float sq = std::pow(r, 2.f) - std::pow(x - x0, 2.f);
548 float rt = std::sqrt(std::fabs(sq));
575 if (
urand(0, 3) == 0)
705 if (pAura->GetStackAmount() >= 100)
798 if (
urand(0, 99) < 5)
806 if (lightVortex && darkVortex && stacksCount)
810 if (
Aura* aura = owner->GetAura(poweringUp))
812 aura->ModStackAmount(stacksCount);
813 owner->CastSpell(owner, poweringUp,
true);
817 owner->CastSpell(owner, poweringUp,
true);
818 if (
Aura* newAura = owner->GetAura(poweringUp))
819 newAura->ModStackAmount(stacksCount);
828 if (unleashedDark && unleashedLight)
833 if (
Aura* aura = owner->GetAura(poweringUp))
836 aura->ModStackAmount(stacksCount);
837 owner->CastSpell(owner, poweringUp,
true);
841 owner->CastSpell(owner, poweringUp,
true);
842 if (
Aura* newAura = owner->GetAura(poweringUp))
843 newAura->ModStackAmount(stacksCount);
@ ACHIEVEMENT_TIMED_TYPE_EVENT
@ SPLINE_CHAIN_MOTION_TYPE
@ TEMPSUMMON_MANUAL_DESPAWN
float frand(float min, float max)
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
void CloseGossipMenuFor(Player *player)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
#define SpellEffectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectAbsorbFn(F, I)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_UNINTERACTIBLE
#define SPELL_DARK_ESSENCE_HELPER
@ SPLINE_INITIAL_MOVEMENT
#define SPELL_LIGHT_ESSENCE_HELPER
@ SPELL_SUMMON_PERIODIC_LIGHT
@ SPELL_DARK_VORTEX_DAMAGE
@ SPELL_LIGHT_VORTEX_DAMAGE
@ SPELL_TWIN_EMPATHY_DARK
@ SPELL_SUMMON_PERIODIC_DARK
@ SPELL_CONTROLLER_PERIODIC
@ SPELL_TWIN_EMPATHY_LIGHT
#define SPELL_POWERING_UP_HELPER
#define SPELL_UNLEASHED_DARK_HELPER
void AddSC_boss_twin_valkyr()
static uint32 GetSisterData(uint32 sisterEntry)
#define SPELL_UNLEASHED_LIGHT_HELPER
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectAbsorbHandler > OnEffectAbsorb
Unit * GetUnitOwner() const
InstanceScript *const instance
void DoZoneInCombat(Creature *creature=nullptr)
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetCombatPulseDelay(uint32 delay)
void SetImmuneToPC(bool apply) override
void SetReactState(ReactStates st)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
void SetCanDualWield(bool value) override
SpellInfo const * GetSpellInfo() const
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 AddEventAtOffset(BasicEvent *event, Milliseconds offset)
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCloseDoorOrButton(ObjectGuid guid)
void DoRemoveAurasDueToSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
Creature * GetCreature(uint32 type)
virtual ObjectGuid GetGuidData(uint32 type) const override
void DoUseDoorOrButton(ObjectGuid guid, uint32 withRestoreTime=0, bool useAlternativeState=false)
CreatureBoundary const * GetBossBoundary(uint32 id) const
void DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={})
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
virtual void RemoveDynamicFlag(uint32 flag)
virtual void SetDynamicFlag(uint32 flag)
OrbsDespawner(Creature *creature)
void operator()(Creature *creature) const
bool Execute(uint64, uint32) override
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
void DoMeleeAttackIfReady()
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={})
SpellCastResult DoCast(uint32 spellId)
MotionMaster * GetMotionMaster()
Aura * AddAura(uint32 spellId, Unit *target)
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
bool SetCanFly(bool enable, bool packetOnly=false)
void ModifyAuraState(AuraStateType flag, bool apply)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool HasUnitState(const uint32 f) const
void SetUnitFlag(UnitFlags flags)
Player * SelectNearestPlayer(float distance) 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)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareAuraScript(spell_bullet_controller)
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_power_of_the_twins)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
PrepareSpellScript(spell_powering_up)
void HandleScriptEffect(SpellEffIndex)
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_twin_valkyr_dark_essence)
bool Validate(SpellInfo const *) override
void AfterApply(AuraEffect const *, AuraEffectHandleModes)
PrepareAuraScript(spell_twin_valkyr_light_essence)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_valkyr_essences)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &)
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
float GetPositionZ() const
float GetPositionX() const
float GetPositionY() const
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
void SetCombatMovement(bool allowMovement)
boss_eydis(Creature *creature)
void ExecuteEvent(uint32 eventId) override
void EnterEvadeMode(EvadeReason why) override
void JustEngagedWith(Unit *who) override
boss_fjola(Creature *creature)
void GenerateStageSequence()
void JustReachedHome() override
void EnableDualWield(bool mode=true)
void JustAppeared() override
void DoAction(int32 action) override
void JustDied(Unit *) override
void ExecuteEvent(uint32 eventId) override
void UpdateAI(uint32 diff) override
void MovementInform(uint32 type, uint32 pointId) override
void JustReachedHome() override
uint32 OtherEssenceSpellId
void KilledUnit(Unit *who) override
boss_twin_baseAI(Creature *creature, uint32 bossId)
void JustEngagedWith(Unit *) override
npc_bullet_controller(Creature *creature)
void UpdateAI(uint32) override
uint32 GetData(uint32 data) const override
bool OnGossipHello(Player *player) override
npc_essence_of_twin(Creature *creature)
npc_unleashed_ballAI(Creature *creature)
void MovementInform(uint32 uiType, uint32 uiId) override
void UpdateAI(uint32 diff) override
npc_unleashed_dark(Creature *creature)
npc_unleashed_light(Creature *creature)
void UpdateAI(uint32 diff) override
Position const ToCCommonLoc[]
@ EVENT_START_TWINS_FIGHT
#define RegisterTrialOfTheCrusaderCreatureAI(ai_name)