89#define SUMMON_PORTAL RAID_MODE<uint32>(SPELL_PRE_SUMMON_DREAM_PORTAL, SPELL_PRE_SUMMON_DREAM_PORTAL, \
90 SPELL_PRE_SUMMON_NIGHTMARE_PORTAL, SPELL_PRE_SUMMON_NIGHTMARE_PORTAL)
92#define EMERALD_VIGOR RAID_MODE<uint32>(SPELL_EMERALD_VIGOR, SPELL_EMERALD_VIGOR, \
93 SPELL_TWISTED_NIGHTMARE, SPELL_TWISTED_NIGHTMARE)
213 _creature->VisitNearbyGridObject(333.0f, worker);
252 creature->
SetPosition(data->posX, data->posY, data->posZ, data->orientation);
289 me->LoadCreaturesAddon(
true);
322 if (!
me->hasLootRecipient())
323 me->SetLootRecipient(healer);
325 me->LowerPlayerDamageReq(heal);
328 if (
me->HealthAbovePctHealed(100, heal) && !
_done)
338 lichKing->AI()->EnterEvadeMode();
347 archmage->AI()->DoZoneInCombat();
352 if (
me->HealthBelowPctDamaged(25, damage))
360 if (damage >
me->GetHealth())
382 me->SetDisplayId(11686);
384 me->DespawnOrUnsummon(4000);
538 if (!
me->IsInCombat())
541 std::list<HostileReference*>
const& threatList =
me->getThreatManager().getThreatList();
542 if (threatList.empty())
554 for (std::list<HostileReference*>::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
555 if (
Unit* target = (*itr)->getTarget())
597 me->setActive(
false);
609 summon->SetPhaseMask((summon->GetPhaseMask() & ~0x10),
true);
612 summon->AI()->AttackStart(target);
692 std::list<Creature*> archmages;
695 me->VisitNearbyGridObject(100.0f, searcher);
696 for (std::list<Creature*>::iterator itr = archmages.begin(); itr != archmages.end(); ++itr)
700 lichKing->AI()->DoZoneInCombat();
703 trigger->AI()->DoZoneInCombat();
722 summon->DespawnOrUnsummon(36000);
727 if (!
me->IsInCombat())
728 if (
me->GetDBTableGUIDLow())
811 if (!
me->IsWithinMeleeRange(
me->GetVictim()))
887 if (
Unit* victim =
me->GetVictim())
1010 me->DespawnOrUnsummon();
1041 _instance(creature->GetInstanceScript())
1049 me->SetCorpseDelay(0);
1050 me->LoadCreaturesAddon(
true);
1070 me->VisitNearbyWorldObject(7.5f, searcher);
1075 me->GetMotionMaster()->MoveIdle();
1078 me->DespawnOrUnsummon(100);
1184 if (targets.empty())
1189 targets.push_back(target);
1237 for (
uint32 i = 0; i < 3; ++i)
1239 for (
uint32 i = 0; i < 3; ++i)
const T & RAND(const T &v1, const T &v2)
@ ENCOUNTER_FRAME_DISENGAGE
void GetCreatureListWithEntryInGrid(std::list< Creature * > &list, WorldObject *source, uint32 entry, float maxSearchRange)
@ SPELL_EFFECT_SCRIPT_EFFECT
@ SPELL_EFFECT_FORCE_CAST
@ TARGET_UNIT_SRC_AREA_ENTRY
@ SPELL_AURA_OBS_MOD_HEALTH
@ SPELL_AURA_PERIODIC_TRIGGER_SPELL
#define SpellEffectFn(F, I, N)
#define SpellObjectAreaTargetSelectFn(F, I, N)
#define AuraEffectPeriodicFn(F, I, N)
#define AuraEffectUpdatePeriodicFn(F, I, N)
#define SF_UNARY_FUNCTION
@ CURRENT_CHANNELED_SPELL
@ UNIT_FLAG_NOT_SELECTABLE
const SummonerInfo summoners[]
@ SPELL_ACHIEVEMENT_CHECK
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_AWARD_REPUTATION_BOSS_KILL
@ 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
AchievementCriteriaScript(const char *name)
uint32 GetTickNumber() const
int32 GetPeriodicTimer() const
void SetPeriodicTimer(int32 periodicTimer)
AuraRemoveEvent(Creature *trigger, uint32 spellId)
bool Execute(uint64, uint32)
void PreventDefaultAction()
HookList< EffectPeriodicHandler > OnEffectPeriodic
WorldObject * GetOwner() const
HookList< EffectUpdatePeriodicHandler > OnEffectUpdatePeriodic
InstanceScript *const instance
BossAI(Creature *creature, uint32 bossId)
CreatureAI(Creature *creature)
void DoZoneInCombat(Creature *creature=NULL, float maxRangeToNearestTarget=50.0f)
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
virtual void EnterEvadeMode()
void Respawn(bool force=false)
uint32 GetDBTableGUIDLow() const
void DespawnOrUnsummon(uint32 msTimeToDespawn=0)
void SetRespawnDelay(uint32 delay)
void SetPosition(float x, float y, float z, float o)
CreatureData const * GetCreatureData() const
uint32 GetRespawnDelay() const
void SetCorpseDelay(uint32 delay)
uint32 GetCorpseDelay() const
CreatureScript(const char *name)
DelayedCastEvent(Creature *trigger, uint32 spellId, uint64 originalCaster, uint32 despawnTime)
bool Execute(uint64, uint32)
static Creature * GetCreature(WorldObject const &u, uint64 guid)
bool operator()(Creature *creature)
SpellInfo const * GetSpellInfo()
void PreventHitDefaultEffect(SpellEffIndex effIndex)
HookList< EffectHandler > OnEffectHitTarget
HookList< ObjectAreaTargetSelectHandler > OnObjectAreaTargetSelect
SpellScriptLoader(const char *name)
void DoMeleeAttackIfReady()
void DoCast(uint32 spellId)
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
void DoCastVictim(uint32 spellId, bool triggered=false)
void DoCastAOE(uint32 spellId, bool triggered=false)
virtual void AttackStart(Unit *)
void CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=NULL, AuraEffect const *triggeredByAura=NULL, uint64 originalCaster=0)
Powers getPowerType() const
void operator()(Creature *creature) const
ValithriaDespawner(Creature *creature)
bool Execute(uint64, uint32)
InstanceScript * GetInstanceScript()
achievement_portal_jockey()
bool OnCheck(Player *, Unit *target) OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
boss_valithria_dreamwalker()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_gluttonous_abomination()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_green_dragon_combat_trigger()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
CreatureAI * GetAI(Creature *creature) const OVERRIDE
npc_the_lich_king_controller()
CreatureAI * GetAI(Creature *creature) const OVERRIDE
void DecayPeriodicTimer(AuraEffect *aurEff)
PrepareAuraScript(spell_dreamwalker_decay_periodic_timer_AuraScript)
AuraScript * GetAuraScript() const OVERRIDE
spell_dreamwalker_decay_periodic_timer()
PrepareAuraScript(spell_dreamwalker_mana_void_AuraScript)
void PeriodicTick(AuraEffect const *aurEff)
spell_dreamwalker_mana_void()
AuraScript * GetAuraScript() const OVERRIDE
PrepareAuraScript(spell_dreamwalker_nightmare_cloud_AuraScript)
InstanceScript * _instance
void PeriodicTick(AuraEffect const *)
AuraScript * GetAuraScript() const OVERRIDE
spell_dreamwalker_nightmare_cloud()
PrepareSpellScript(spell_dreamwalker_summon_dream_portal_SpellScript)
void HandleScript(SpellEffIndex effIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_dreamwalker_summon_dream_portal()
PrepareSpellScript(spell_dreamwalker_summon_nightmare_portal_SpellScript)
void HandleScript(SpellEffIndex effIndex)
SpellScript * GetSpellScript() const OVERRIDE
spell_dreamwalker_summon_nightmare_portal()
void PeriodicTick(AuraEffect const *)
PrepareAuraScript(spell_dreamwalker_summon_suppresser_AuraScript)
PrepareSpellScript(spell_dreamwalker_summon_suppresser_effect_SpellScript)
void HandleForceCast(SpellEffIndex effIndex)
spell_dreamwalker_summon_suppresser_effect()
SpellScript * GetSpellScript() const OVERRIDE
spell_dreamwalker_summon_suppresser()
AuraScript * GetAuraScript() const OVERRIDE
void HandleForceCast(SpellEffIndex effIndex)
PrepareSpellScript(spell_dreamwalker_summoner_SpellScript)
void FilterTargets(std::list< WorldObject * > &targets)
SpellScript * GetSpellScript() const OVERRIDE
spell_dreamwalker_summoner()
PrepareSpellScript(spell_dreamwalker_twisted_nightmares_SpellScript)
void HandleScript(SpellEffIndex effIndex)
spell_dreamwalker_twisted_nightmares()
SpellScript * GetSpellScript() const OVERRIDE
@ NPC_VALITHRIA_DREAMWALKER
@ NPC_NIGHTMARE_PORTAL_PRE_EFFECT
@ NPC_GLUTTONOUS_ABOMINATION
@ NPC_DREAM_PORTAL_PRE_EFFECT
CreatureAI * GetIcecrownCitadelAI(Creature *creature)
@ LIGHT_S_HAMMER_TELEPORT
@ DATA_VALITHRIA_LICH_KING
@ DATA_VALITHRIA_DREAMWALKER
void RandomResizeList(std::list< T > &list, uint32 size)
C::value_type const & SelectRandomContainerElement(C const &container)
bool operator()(Unit *unit) const
ManaVoidSelector(WorldObject const *source)
WorldObject const * _source
const T & RAID_MODE(const T &normal10, const T &normal25) const
ScriptedAI(Creature *creature)
void AttackStart(Unit *) OVERRIDE
bool _under25PercentTalkDone
bool _over75PercentTalkDone
void HealReceived(Unit *healer, uint32 &heal) OVERRIDE
void SummonedCreatureDespawn(Creature *summon) OVERRIDE
InstanceScript * _instance
void SpellHit(Unit *, SpellInfo const *spell) OVERRIDE
void InitializeAI() OVERRIDE
void JustSummoned(Creature *summon) OVERRIDE
void AttackStart(Unit *) OVERRIDE
void DamageTaken(Unit *, uint32 &damage) OVERRIDE
uint32 const _portalCount
uint32 GetData(uint32 type) const OVERRIDE
boss_valithria_dreamwalkerAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void DoAction(int32 action) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_blazing_skeletonAI(Creature *creature)
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
void JustDied(Unit *) OVERRIDE
npc_blistering_zombieAI(Creature *creature)
InstanceScript * _instance
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
npc_dream_cloudAI(Creature *creature)
npc_dream_portalAI(Creature *creature)
void OnSpellClick(Unit *, bool &result) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
uint32 GetData(uint32 type) const OVERRIDE
void JustDied(Unit *) OVERRIDE
npc_gluttonous_abominationAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void JustReachedHome() OVERRIDE
void AttackStart(Unit *target) OVERRIDE
npc_green_dragon_combat_triggerAI(Creature *creature)
bool CanAIAttack(Unit const *target) const OVERRIDE
void EnterCombat(Unit *target) OVERRIDE
void DoAction(int32 action) OVERRIDE
void UpdateAI(uint32) OVERRIDE
== Triggered Actions Requested ==================
InstanceScript * _instance
void EnterCombat(Unit *) OVERRIDE
npc_risen_archmageAI(Creature *creature)
void JustSummoned(Creature *summon) OVERRIDE
void DoAction(int32 action) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
bool CanAIAttack(Unit const *target) const OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
InstanceScript *const _instance
npc_suppresserAI(Creature *creature)
void IsSummonedBy(Unit *) OVERRIDE
void EnterCombat(Unit *) OVERRIDE
void JustReachedHome() OVERRIDE
npc_the_lich_king_controllerAI(Creature *creature)
void JustSummoned(Creature *summon) OVERRIDE
InstanceScript * _instance
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================