329 for (
uint32 spawnGroupId : spawnGroupsForSlot)
335 switch (spellInfo->
Id)
655 Unit* target =
nullptr;
684 if (!creatureList.empty())
686 if (
Unit* target = *(creatureList.begin()))
905 targets.remove(
GetCaster()->GetVictim());
uint32 urand(uint32 min, uint32 max)
#define RegisterSpellScript(spell_script)
@ TARGET_UNIT_SRC_AREA_ENEMY
@ AURA_REMOVE_BY_ENEMY_SPELL
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_HEAL
#define AuraEffectProcFn(F, I, N)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectRemoveFn(F, I, N, M)
@ EVENT_GROUP_PLAYER_ABILITY
@ EVENT_SH_CHAIN_LIGHTNING
@ EVENT_DK_DEATH_AND_DECAY
@ EVENT_WL_UNSTABLE_AFFLICTION
@ EVENT_RO_SLICE_AND_DICE
@ EVENT_HU_EXPLOSIVE_TRAP
@ EVENT_CANCEL_CLASS_ABILITIES
@ EVENT_WR_SPELL_REFLECTION
@ EVENT_SH_FIRE_NOVA_TOTEM
@ EVENT_PR_PSYCHIC_SCREAM
@ EVENT_PA_AVENGING_WRATH
static constexpr std::array< std::array< uint32, 2 >, 4 > MalacrassSpawnGroups
void AddSC_boss_hex_lord_malacrass()
@ SPELL_UNSTABLE_AFFL_DISPEL
@ SPELL_SH_CHAIN_LIGHTNING
@ SPELL_PR_PSYCHIC_SCREAM
@ SPELL_SH_FIRE_NOVA_TOTEM
@ SPELL_DK_DEATH_AND_DECAY
@ SPELL_HU_EXPLOSIVE_TRAP
@ SPELL_LIFEBLOOM_FINAL_HEAL
@ SPELL_SIPHON_SOUL_EFFECT
@ SPELL_PA_AVENGING_WRATH
@ SPELL_WR_SPELL_REFLECTION
@ SPELL_RO_SLICE_AND_DICE
@ SPELL_WL_UNSTABLE_AFFLICTION
@ SPELL_VOLATILE_INFECTION
@ SPELL_MARK_OF_BLOOD_HEAL
AuraApplication const * GetTargetApplication() const
HookList< EffectApplyHandler > AfterEffectRemove
AuraEffect * GetEffect(uint8 effIndex) const
ObjectGuid GetCasterGUID() const
HookList< AuraDispelHandler > AfterDispel
HookList< EffectProcHandler > OnEffectProc
void JustEngagedWith(Unit *who) override
void _DespawnAtEvade(Seconds delayToRespawn=30s, Creature *who=nullptr)
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
WorldObject * GetDispeller() const
void Repeat(Milliseconds time)
void CancelEventGroup(GroupIndex group)
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)
bool SpawnGroupDespawn(uint32 groupId, bool deleteRespawnTimes=false, size_t *count=nullptr)
static ObjectGuid GetGUID(Object const *o)
Unit * GetActionTarget() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
TaskContext & Repeat(std::chrono::duration< _Rep, _Period > const &duration)
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 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)
SpellCastResult DoCast(uint32 spellId)
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
bool HasUnitState(const uint32 f) const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
PrepareAuraScript(spell_malacrass_lifebloom)
bool Validate(SpellInfo const *) override
void AfterRemove(AuraEffect const *aurEff, AuraEffectHandleModes)
void HandleProc(AuraEffect const *aurEff, ProcEventInfo &eventInfo)
PrepareAuraScript(spell_malacrass_mark_of_blood)
bool Validate(SpellInfo const *) override
void FilterTargets(std::list< WorldObject * > &targets)
PrepareSpellScript(spell_malacrass_mind_control)
ObjectGuid _selectedTargetGuid
bool Validate(SpellInfo const *) override
PrepareSpellScript(spell_malacrass_siphon_soul)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleDummy(SpellEffIndex)
PrepareAuraScript(spell_malacrass_unstable_affliction)
void HandleDispel(DispelInfo *dispelInfo)
bool Validate(SpellInfo const *) override
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
void RandomResize(C &container, std::size_t requestedSize)
void InitializeAI() override
void JustEngagedWith(Unit *) override
void UpdateAI(uint32 diff) override
virtual void ScheduleEvents()=0
void JustDied(Unit *) override
MalacrassCompanionBaseAI(Creature *creature)
InstanceScript * Instance
Unit * DoSelectLowestHpFriendly(float range, uint32 minHPDiff=1)
std::list< Creature * > DoFindFriendlyMissingBuff(float range, uint32 spellId)
void ScheduleEvents() override
void ScheduleEvents() override
void ScheduleEvents() override
void ScheduleEvents() override
void KilledUnit(Unit *) override
void OnSpellCast(SpellInfo const *spellInfo) override
void DoAction(int32 action) override
void DoDespawnCompanions()
void UpdateSpecialEvents(uint32 diff)
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void JustAppeared() override
void UpdateAI(uint32 diff) override
void SetData(uint32 type, uint32 data) override
boss_hexlord_malacrass(Creature *creature)
void JustEngagedWith(Unit *who) override
void JustDied(Unit *) override
void EnterEvadeMode(EvadeReason) override
void ScheduleEvents() override
void ScheduleEvents() override
void ScheduleEvents() override
void JustAppeared() override
void ScheduleEvents() override
#define RegisterZulAmanCreatureAI(ai_name)