329 std::vector<Creature*> spellbinders;
331 for (
Creature* spellbinder : spellbinders)
435 me->SetReactState(REACT_PASSIVE);
436 DoCastSelf(SPELL_SHRINK);
440 me->RemoveAurasDueToSpell(SPELL_SHRINK);
444 Talk(SAY_DEMON_FREE);
446 me->SetReactState(REACT_AGGRESSIVE);
447 me->SetUninteractible(false);
517 std::vector<Player*> playerList;
519 for (
Player* player : playerList)
521 if (player->IsNonMeleeSpellCast(
false))
579 if (
Unit* summoner = summon->GetSummonerUnit())
581 if (summoner->HasAura(spellId))
593 if (
Unit* summoner = summon->GetSummonerUnit())
667 if (eff->GetTickNumber() != eff->GetSpellEffectInfo().GetPeriodicTickCount())
746 targets.remove(
GetCaster()->GetVictim());
bool roll_chance(float chance, PseudoRandomDistributionState &state)
#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
Used when doing CastSpell with triggered == true.
#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)
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
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::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={})
SpellEffectValue CalcValue(WorldObject const *caster=nullptr, SpellEffectValue 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)
static bool ValidateSpellEffect(std::initializer_list< std::pair< uint32, SpellEffIndex > > effects)
HookList< CastHandler > AfterCast
HookList< EffectHandler > OnEffectHit
SpellInfo const * GetTriggeringSpell() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
Difficulty GetCastDifficulty() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskScheduler::repeated_t GetRepeatCounter() const
Returns the repeat counter which increases every time the task is repeated.
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & SetValidator(P &&predicate)
Sets a validator which is asked if tasks are allowed to be executed.
TaskScheduler & Update()
Update the scheduler to the current time.
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)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void AttackStart(Unit *victim)
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)
SpellCastResult DoCast(uint32 spellId)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
void SetStandState(UnitStandStateType state, uint32 animKitID=0)
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()
void SetUninteractible(bool apply)
bool HealthBelowPctDamaged(float pct, uint32 damage) const
bool HasUnitState(const uint32 f) const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void SetIsCombatDisallowed(bool apply)
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
bool Validate(SpellInfo const *) override
void HandleDummy(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void OnPeriodic(AuraEffect const *aurEff)
bool Validate(SpellInfo const *spellInfo) override
void AfterRemove(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
void HandleEffect(SpellEffIndex)
bool Validate(SpellInfo const *) override
void HandleScript(SpellEffIndex)
void HandleScript(SpellEffIndex)
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
== Triggered Actions Requested ==================
ScriptedAI(Creature *creature, uint32 scriptId=0) noexcept
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
== Triggered Actions Requested ==================
void UpdateAI(uint32 diff) override
void JustAppeared() override
void JustEngagedWith(Unit *) override