121#define SPELL_DARK_ESSENCE_HELPER SPELL_DARK_ESSENCE
122#define SPELL_LIGHT_ESSENCE_HELPER SPELL_LIGHT_ESSENCE
124#define SPELL_POWERING_UP_HELPER SPELL_POWERING_UP
126#define SPELL_UNLEASHED_DARK_HELPER SPELL_UNLEASHED_DARK
127#define SPELL_UNLEASHED_LIGHT_HELPER SPELL_UNLEASHED_LIGHT
135#define ESSENCE_REMOVE 0
136#define ESSENCE_APPLY 1
243 if (!pSister->IsAlive())
516 return spellReturned;
544 float x =
frand(x0 - r, x0 + r);
545 float sq = std::pow(r, 2.f) - std::pow(x - x0, 2.f);
546 float rt = std::sqrt(std::fabs(sq));
574 if (
urand(0, 3) == 0)
700 if (pAura->GetStackAmount() >= 100)
748 if (
urand(0, 99) < 5)
756 if (lightVortex && darkVortex && stacksCount)
760 if (
Aura* aura = owner->GetAura(poweringUp))
762 aura->ModStackAmount(stacksCount);
763 owner->CastSpell(owner, poweringUp,
true);
767 owner->CastSpell(owner, poweringUp,
true);
768 if (
Aura* newAura = owner->GetAura(poweringUp))
769 newAura->ModStackAmount(stacksCount);
778 if (unleashedDark && unleashedLight)
783 if (
Aura* aura = owner->GetAura(poweringUp))
786 aura->ModStackAmount(stacksCount);
787 owner->CastSpell(owner, poweringUp,
true);
791 owner->CastSpell(owner, poweringUp,
true);
792 if (
Aura* newAura = owner->GetAura(poweringUp))
793 newAura->ModStackAmount(stacksCount);
T GetEntry(std::unordered_map< uint32, T > const &map, CriteriaTreeEntry const *tree)
@ 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_STATE_RAID_ENCOUNTER
@ AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_PERIODIC_DUMMY
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#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
#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_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
Difficulty GetCastDifficulty() const
Unit * GetUnitOwner() const
InstanceScript *const instance
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void SetBoundary(CreatureBoundary const *boundary, bool negativeBoundaries=false)
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)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
bool IsInPhase(uint8 phase) const
void SetPhase(uint8 phase)
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 TriggerGameEvent(uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
void MoveAlongSplineChain(uint32 pointId, uint16 dbChainId, bool walk)
void MovePoint(uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={})
void SetDynamicFlag(uint32 flag)
void RemoveDynamicFlag(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, Unit const *target=nullptr, float *variance=nullptr, uint32 castItemId=0, int32 itemLevel=-1) const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Difficulty GetCastDifficulty() 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={})
SpellCastResult DoCast(uint32 spellId)
MotionMaster * GetMotionMaster()
Aura * AddAura(uint32 spellId, Unit *target)
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
void SetUninteractible(bool apply)
void ModifyAuraState(AuraStateType flag, bool apply)
bool SetCanFly(bool enable)
bool HasUnitState(const uint32 f) const
void SetUnitFlag(UnitFlags flags)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Player * SelectNearestPlayer(float range) 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)
void PeriodicTick(AuraEffect const *)
bool Validate(SpellInfo const *) override
void HandleEffectRemove(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void HandleScriptEffect(SpellEffIndex)
void Absorb(AuraEffect *, DamageInfo &dmgInfo, uint32 &)
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
constexpr float GetPositionX() const
constexpr float GetPositionY() const
constexpr float GetPositionZ() 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
constexpr Position ToCCommonLoc[]
@ EVENT_START_TWINS_FIGHT
#define RegisterTrialOfTheCrusaderCreatureAI(ai_name)