330 std::vector<Creature*> spellbinders;
332 for (
Creature* spellbinder : spellbinders)
438 me->SetReactState(REACT_PASSIVE);
439 DoCastSelf(SPELL_SHRINK);
443 me->RemoveAurasDueToSpell(SPELL_SHRINK);
447 Talk(SAY_DEMON_FREE);
449 me->SetReactState(REACT_AGGRESSIVE);
450 me->RemoveUnitFlag(UNIT_FLAG_UNINTERACTIBLE);
523 std::vector<Player*> playerList;
525 for (
Player* player : playerList)
527 if (player->IsNonMeleeSpellCast(
false))
588 if (
Unit* summoner = summon->GetSummonerUnit())
590 if (summoner->HasAura(spellId))
602 if (
Unit* summoner = summon->GetSummonerUnit())
683 if (eff->GetTickNumber() != spellInfo->
GetMaxTicks())
768 targets.remove(
GetCaster()->GetVictim());
bool roll_chance_i(int chance)
#define RegisterSpellAndAuraScriptPair(script_1, script_2)
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
void GetPlayerListInGrid(Container &container, WorldObject *source, float maxSearchRange, bool alive=true)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_APPLY_AURA
@ TARGET_UNIT_SRC_AREA_ENEMY
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
#define AuraEffectRemoveFn(F, I, N, M)
@ UNIT_FLAG_UNINTERACTIBLE
static constexpr std::array< uint32, 5 > ForceReactionSpells
@ SAY_NIGHT_ELF_FINAL_FORM
@ SPELL_CONSUMING_MADNESS
@ SPELL_CHAOS_BLAST_DAMAGE
@ SPELL_DEMONIC_ALIGNMENT
@ SPELL_SUMMON_INNER_DEMON
@ SPELL_CLEAR_CONSUMING_MADNESS
@ SPELL_INSIDIOUS_WHISPER
@ FACTION_LEOTHERAS_DEMON_1
@ FACTION_LEOTHERAS_DEMON_2
@ FACTION_LEOTHERAS_DEMON_3
@ NPC_GREYHEART_SPELLBINDER
@ FACTION_LEOTHERAS_DEMON_4
@ FACTION_LEOTHERAS_DEMON_5
@ ACTION_SPELLBINDER_DIES
@ ACTION_START_CHANNELING
@ ACTION_METAMORPHOSIS_REMOVED
@ ACTION_METAMORPHOSIS_APPLIED
@ SPAWN_GROUP_SPELLBINDER_1
@ SPAWN_GROUP_SPELLBINDER_2
@ SPAWN_GROUP_SPELLBINDER_3
static constexpr std::pair< uint32, uint32 > DemonFaction[5]
static constexpr std::array< uint32, 3 > SpellbindersSpawnGroupsData
@ EVENT_INSIDIOUS_WHISPER
void AddSC_boss_leotheras_the_blind()
AuraRemoveMode GetRemoveMode() const
SpellEffectInfo const & GetSpellEffectInfo() const
void PreventDefaultAction()
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
HookList< EffectPeriodicHandler > OnEffectPeriodic
HookList< EffectApplyHandler > AfterEffectApply
void JustEngagedWith(Unit *who) override
void DoZoneInCombat(Creature *creature=nullptr)
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
void SetReactState(ReactStates st)
void SetCanDualWield(bool value) override
bool IsInEvadeMode() const
void Repeat(Milliseconds time)
void CancelEvent(EventId eventId)
void ScheduleEvent(EventId eventId, Milliseconds time, GroupIndex group=0u, PhaseIndex phase=0u)
Creature * GetCreature(uint32 type)
bool SpawnGroupSpawn(uint32 groupId, bool ignoreRespawn=false, bool force=false, std::vector< WorldObject * > *spawnedObjects=nullptr)
void MoveChase(Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={})
static Creature * ToCreature(Object *o)
int32 CalcValue(WorldObject const *caster=nullptr, int32 const *basePoints=nullptr) const
uint32 GetMaxTicks() const
SpellEffectInfo const & GetEffect(SpellEffIndex index) const
HookList< CastHandler > AfterCast
HookList< EffectHandler > OnEffectHit
SpellInfo const * GetTriggeringSpell() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskScheduler & CancelAll()
TaskScheduler & Schedule(std::chrono::duration< _Rep, _Period > const &time, task_handler_t const &task)
TaskScheduler & Update(success_t const &callback=EmptyCallback)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
void AddThreat(Unit *target, float amount, SpellInfo const *spell=nullptr, bool ignoreModifiers=false, bool ignoreRedirects=false)
== AFFECT MY THREAT LIST ==
void AttackStartCaster(Unit *victim, float dist)
void DoMeleeAttackIfReady()
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void InitializeAI()
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)
virtual void AttackStart(Unit *)
SpellCastResult DoCast(uint32 spellId)
ThreatManager & GetThreatManager()
void SetFaction(uint32 faction) override
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
AuraEffect * GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID=ObjectGuid::Empty) const
TempSummon * ToTempSummon()
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
bool HasUnitState(const uint32 f) const
void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply)
void SetStandState(UnitStandStateType state)
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
void SetUnitFlag(UnitFlags flags)
void SetIsCombatDisallowed(bool apply)
void RemoveUnitFlag(UnitFlags flags)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_leotheras_the_blind_chaos_blast)
void HandleDummy(SpellEffIndex)
PrepareSpellScript(spell_leotheras_the_blind_clear_consuming_madness)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareAuraScript(spell_leotheras_the_blind_demon_link)
void OnPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *spellInfo) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
PrepareAuraScript(spell_leotheras_the_blind_insidious_whisper_aura)
PrepareSpellScript(spell_leotheras_the_blind_insidious_whisper)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_leotheras_the_blind_summon_inner_demon)
void HandleScript(SpellEffIndex)
PrepareSpellScript(spell_leotheras_the_blind_whirlwind_effect)
PrepareSpellScript(spell_leotheras_the_blind_whirlwind_init)
void RandomResize(C &container, std::size_t requestedSize)
@ BOSS_LEOTHERAS_THE_BLIND
#define RegisterSerpentshrineCavernCreatureAI(ai_name)
void SetEquipmentSlots(bool loadDefault, int32 mainHand=EQUIP_NO_CHANGE, int32 offHand=EQUIP_NO_CHANGE, int32 ranged=EQUIP_NO_CHANGE)
void AttackStart(Unit *) override
ScriptedAI(Creature *creature)
void ResetThreatList(Unit *who=nullptr)
void AddThreat(Unit *victim, float amount, Unit *who=nullptr)
void JustAppeared() override
void JustDied(Unit *) override
uint8 _deadSpellbindersCount
void OnSpellCast(SpellInfo const *spellInfo) override
void AttackStart(Unit *who) override
void DoAction(int32 action) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *who) override
boss_leotheras_the_blind(Creature *creature)
void EnterEvadeMode(EvadeReason why) override
void KilledUnit(Unit *victim) override
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
bool _isStartedTransition
void JustReachedHome() override
void DoAction(int32 action) override
npc_greyheart_spellbinder(Creature *creature)
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void EnterEvadeMode(EvadeReason why) override
void JustReachedHome() override
void JustDied(Unit *) override
void JustAppeared() override
InstanceScript * _instance
void JustDied(Unit *killer) override
void UpdateAI(uint32 diff) override
void JustEngagedWith(Unit *) override
void InitializeAI() override
void JustAppeared() override
void AttackStart(Unit *who) override
void UpdateAI(uint32 diff) override
void JustAppeared() override
void JustEngagedWith(Unit *) override