106#define SUMMON_PORTAL RAID_MODE<uint32>(SPELL_PRE_SUMMON_DREAM_PORTAL, SPELL_PRE_SUMMON_DREAM_PORTAL, \
107 SPELL_PRE_SUMMON_NIGHTMARE_PORTAL, SPELL_PRE_SUMMON_NIGHTMARE_PORTAL)
109#define EMERALD_VIGOR RAID_MODE<uint32>(SPELL_EMERALD_VIGOR, SPELL_EMERALD_VIGOR, \
110 SPELL_TWISTED_NIGHTMARE, SPELL_TWISTED_NIGHTMARE)
337 lichKing->AI()->EnterEvadeMode();
537 lichKing->AI()->EnterEvadeMode();
571 return RAID_MODE<uint32>(4, 6, 4, 6);
906 if (!spellClickHandled)
1041 if (targets.empty())
1046 targets.push_back(target);
1096 for (
uint8 i = 0; i < suppresserNumber; ++i)
1142 uint32 spellId =
RAND(71301, 72220, 72223, 72225);
1161 uint32 spellId =
RAND(71977, 72481, 72482, 72483);
TC_GAME_API bool InstanceHasScript(WorldObject const *obj, char const *scriptName)
First const & RAND(First const &first, Second const &second, Rest const &... rest)
std::chrono::milliseconds Milliseconds
Milliseconds shorthand typedef.
@ ENCOUNTER_FRAME_DISENGAGE
#define RegisterSpellScript(spell_script)
void GetCreatureListWithEntryInGrid(Container &container, WorldObject *source, uint32 entry, float maxSearchRange)
@ TARGET_UNIT_SRC_AREA_ENTRY
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_FORCE_CAST
@ SPELL_FAILED_TARGET_AURASTATE
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_OBS_MOD_HEALTH
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
@ TRIGGERED_FULL_MASK
Used when doing CastSpell with triggered == true.
#define SpellCheckCastFn(F)
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectUpdatePeriodicFn(F, I, N)
#define AuraEffectApplyFn(F, I, N, M)
@ CURRENT_CHANNELED_SPELL
const SummonerInfo summoners[]
void AddSC_boss_valithria_dreamwalker()
@ SPELL_SUMMON_NIGHTMARE_PORTAL
@ SPELL_NIGHTMARE_CLOUD_VISUAL
@ SPELL_ACHIEVEMENT_CHECK
@ SPELL_SUMMON_DREAM_PORTAL
@ SPELL_TIMER_GLUTTONOUS_ABOMINATION
@ SPELL_NIGHTMARE_PORTAL_VISUAL_PRE
@ SPELL_SUMMON_SUPPRESSER
@ SPELL_CORRUPTION_VALITHRIA
@ SPELL_COLUMN_OF_FROST_AURA
@ SPELL_PRE_SUMMON_DREAM_PORTAL
@ SPELL_TIMER_BLAZING_SKELETON
@ SPELL_TIMER_BLISTERING_ZOMBIE
@ SPELL_PRE_SUMMON_NIGHTMARE_PORTAL
@ SPELL_COLUMN_OF_FROST_DAMAGE
@ SPELL_TWISTED_NIGHTMARE
@ SPELL_DREAM_PORTAL_VISUAL_PRE
@ SPELL_TIMER_RISEN_ARCHMAGE
@ SPELL_DREAMWALKERS_RAGE
@ SAY_VALITHRIA_25_PERCENT
@ SAY_VALITHRIA_PLAYER_DEATH
@ SAY_VALITHRIA_75_PERCENT
@ SAY_VALITHRIA_DREAM_PORTAL
@ SAY_VALITHRIA_ENTER_COMBAT
Position const ValithriaSpawnPos
@ EVENT_SUPPRESSER_SUMMONER
@ EVENT_BLISTERING_ZOMBIE_SUMMONER
@ EVENT_RISEN_ARCHMAGE_SUMMONER
@ EVENT_BLAZING_SKELETON_SUMMONER
@ EVENT_GLUTTONOUS_ABOMINATION_SUMMONER
uint32 GetTickNumber() const
int32 GetPeriodicTimer() const
void SetPeriodicTimer(int32 periodicTimer)
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
WorldObject * GetOwner() const
HookList< EffectApplyHandler > AfterEffectApply
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
InstanceScript *const instance
Unit * GetAnyTarget() const
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
void Talk(uint8 id, WorldObject const *whisperTarget=nullptr)
void AttackStart(Unit *victim) override
== Triggered Actions Requested ==================
void EngagementStart(Unit *who)
bool LoadCreaturesAddon()
void SetReactState(ReactStates st)
bool hasLootRecipient() const
void SetTappedBy(Unit const *unit, bool withGroup=true)
void DespawnOrUnsummon(Milliseconds timeToDespawn=0s, Seconds forceRespawnTime=0s)
CreatureData const * GetCreatureData() const
void SetDisplayId(uint32 displayId, bool setNative=false) override
void LowerPlayerDamageReq(uint64 unDamage)
void SetCorpseDelay(uint32 delay, bool ignoreCorpseDecayRatio=false)
void Repeat(Milliseconds time)
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void RescheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
void AddEvent(BasicEvent *event, Milliseconds e_time, bool set_addtime=true)
void AddEventAtOffset(BasicEvent *event, Milliseconds offset)
Milliseconds CalculateTime(Milliseconds t_offset) const
virtual bool SetBossState(uint32 id, EncounterState state)
void DoCastSpellOnPlayers(uint32 spell, bool includePets=false, bool includeControlled=false)
virtual ObjectGuid GetGuidData(uint32 type) const override
EncounterState GetBossState(uint32 id) const
virtual bool CheckRequiredBosses(uint32, Player const *=nullptr) const
void SendEncounterUnit(EncounterFrameType type, Unit const *unit, Optional< int32 > param1={}, Optional< int32 > param2={})
static ObjectGuid const Empty
static ObjectGuid GetGUID(Object const *o)
static Player * ToPlayer(Object *o)
static void RemovePhase(WorldObject *object, uint32 phaseId, bool updateVisibility)
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
HookList< CheckCastHandler > OnCheckCast
void PreventHitDefaultEffect(SpellEffIndex effIndex)
Unit * GetHitUnit() const
SpellEffectInfo const & GetEffectInfo() const
HookList< EffectHandler > OnEffectHitTarget
Unit * GetExplTargetUnit() const
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
void DoAction(int32 info, Predicate &&predicate, uint16 max=0)
void FixateTarget(Unit *target)
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
virtual void InitializeAI()
virtual uint32 GetData(uint32) 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)
void ApplySpellImmune(uint32 spellId, SpellImmunity op, uint32 type, bool apply)
bool IsWithinMeleeRange(Unit const *obj) const
void SetHealth(uint64 val)
ThreatManager & GetThreatManager()
bool HealthAbovePctHealed(int32 pct, uint32 heal) const
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true)
MotionMaster * GetMotionMaster()
Powers GetPowerType() const
void SetUninteractible(bool apply)
void EngageWithTarget(Unit *who)
bool HasUnitState(const uint32 f) const
bool HealthBelowPctDamaged(int32 pct, uint32 damage) const
CombatManager & GetCombatManager()
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
static void Kill(Unit *attacker, Unit *victim, bool durabilityLoss=true, bool skipSettingDeathState=false)
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
bool Execute(uint64, uint32) override
ValithriaAuraRemoveEvent(Creature *trigger, uint32 spellId)
ValithriaDelayedCastEvent(Creature *trigger, uint32 spellId, ObjectGuid originalCaster, Milliseconds despawnTime)
Milliseconds _despawnTime
bool Execute(uint64, uint32) override
ObjectGuid _originalCaster
void operator()(Creature *creature) const
bool Execute(uint64, uint32) override
ValithriaDespawner(Creature *creature)
InstanceScript * GetInstanceScript() const
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
void setActive(bool isActiveObject)
Creature * FindNearestCreature(uint32 entry, float range, bool alive=true) const
float GetDistance(WorldObject const *obj) const
void SummonCreatureGroup(uint8 group, std::list< TempSummon * > *list=nullptr)
achievement_portal_jockey()
bool OnCheck(Player *, Unit *target) override
void DecayPeriodicTimer(AuraEffect *aurEff)
bool Validate(SpellInfo const *) override
SpellCastResult SkipWithWeakenedSoul()
void PeriodicTick(AuraEffect const *aurEff)
spell_dreamwalker_nightmare_cloud()
void PeriodicTick(AuraEffect const *)
InstanceScript * _instance
void HandleScript(SpellEffIndex effIndex)
void HandleScript(SpellEffIndex effIndex)
void HandleForceCast(SpellEffIndex effIndex)
void PeriodicTick(AuraEffect const *)
void OnApply(AuraEffect const *, AuraEffectHandleModes)
bool Validate(SpellInfo const *) override
void HandleSummon(Unit *caster)
void HandleForceCast(SpellEffIndex effIndex)
void FilterTargets(std::list< WorldObject * > &targets)
void HandleScript(SpellEffIndex effIndex)
@ SPELL_REPUTATION_BOSS_KILL
@ LIGHT_S_HAMMER_TELEPORT
#define RegisterIcecrownCitadelCreatureAI(ai_name)
@ DATA_VALITHRIA_LICH_KING
@ DATA_VALITHRIA_DREAMWALKER
@ NPC_GREEN_DRAGON_COMBAT_TRIGGER
@ NPC_VALITHRIA_DREAMWALKER
@ NPC_NIGHTMARE_PORTAL_PRE_EFFECT
@ NPC_GLUTTONOUS_ABOMINATION
@ NPC_DREAM_PORTAL_PRE_EFFECT
TC_GAME_API Creature * GetCreature(WorldObject const &u, ObjectGuid const &guid)
auto SelectRandomContainerElement(C const &container) -> typename std::add_const< decltype(*std::begin(container))>::type &
static void VisitGridObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
static void VisitWorldObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
T const & RAID_MODE(T const &normal10, T const &normal25) const
WorldObject const * _source
bool operator()(Unit *unit) const
ValithriaManaVoidSelector(WorldObject const *source)
void DoAction(int32 action) override
uint32 const _portalCount
InstanceScript * _instance
void UpdateAI(uint32 diff) override
bool _over75PercentTalkDone
void HealReceived(Unit *healer, uint32 &heal) override
boss_valithria_dreamwalker(Creature *creature)
uint32 GetData(uint32 type) const override
bool _under25PercentTalkDone
void DamageTaken(Unit *, uint32 &damage, DamageEffectType, SpellInfo const *) override
void InitializeAI() override
void JustSummoned(Creature *summon) override
void SummonedCreatureDespawn(Creature *summon) override
void AttackStart(Unit *) override
== Triggered Actions Requested ==================
void SpellHit(WorldObject *, SpellInfo const *spellInfo) override
void UpdateAI(uint32 diff) override
npc_blazing_skeleton(Creature *creature)
npc_blistering_zombie(Creature *creature)
void JustDied(Unit *) override
void UpdateAI(uint32 diff) override
InstanceScript * _instance
npc_dream_cloud(Creature *creature)
uint32 GetData(uint32 type) const override
void OnSpellClick(Unit *, bool spellClickHandled) override
npc_dream_portal(Creature *creature)
void UpdateAI(uint32) override
void UpdateAI(uint32 diff) override
npc_gluttonous_abomination(Creature *creature)
void JustDied(Unit *killer) override
void JustEnteredCombat(Unit *target) override
void DoAction(int32 action) override
void JustExitedCombat() override
npc_green_dragon_combat_trigger(Creature *creature)
void UpdateAI(uint32 diff) override
npc_risen_archmage(Creature *creature)
void JustEnteredCombat(Unit *who) override
InstanceScript * _instance
void DoAction(int32 action) override
bool CanAIAttack(Unit const *target) const override
void JustSummoned(Creature *summon) override
void UpdateAI(uint32 diff) override
void IsSummonedBy(WorldObject *) override
void MovementInform(uint32 type, uint32) override
InstanceScript *const _instance
npc_suppresser(Creature *creature)
void JustSummoned(Creature *summon) override
InstanceScript * _instance
void UpdateAI(uint32 diff) override
uint32 GetData(uint32 data) const override
npc_the_lich_king_controller(Creature *creature)
void JustEngagedWith(Unit *) override
void JustReachedHome() override