diff options
Diffstat (limited to 'src')
6 files changed, 729 insertions, 0 deletions
diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 461fe4a5e89..0b3a26992ce 100755 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -482,6 +482,9 @@ void AddSC_boss_sindragosa(); void AddSC_icecrown_citadel_teleport(); void AddSC_instance_icecrown_citadel(); void AddSC_icecrown_citadel(); +void AddSC_instance_ruby_sanctum(); // Ruby Sanctum +void AddSC_ruby_sanctum(); +void AddSC_boss_baltharus_the_warborn(); void AddSC_dalaran(); void AddSC_borean_tundra(); @@ -1179,6 +1182,9 @@ void AddNorthrendScripts() AddSC_icecrown_citadel_teleport(); AddSC_instance_icecrown_citadel(); AddSC_icecrown_citadel(); + AddSC_instance_ruby_sanctum(); // Ruby Sanctum + AddSC_ruby_sanctum(); + AddSC_boss_baltharus_the_warborn(); AddSC_dalaran(); AddSC_borean_tundra(); diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt index 88e551cd6b6..68852f5e34b 100644 --- a/src/server/scripts/Northrend/CMakeLists.txt +++ b/src/server/scripts/Northrend/CMakeLists.txt @@ -185,6 +185,10 @@ set(scripts_STAT_SRCS Northrend/DraktharonKeep/drak_tharon_keep.h Northrend/DraktharonKeep/boss_tharon_ja.cpp Northrend/DraktharonKeep/boss_dred.cpp + Northrend/RubySanctum/instance_ruby_sanctum.cpp + Northrend/RubySanctum/ruby_sanctum.h + Northrend/RubySanctum/ruby_sanctum.cpp + Northrend/RubySanctum/boss_baltharus_the_warborn.cpp ) message(" -> Prepared: Northrend") diff --git a/src/server/scripts/Northrend/RubySanctum/boss_baltharus_the_warborn.cpp b/src/server/scripts/Northrend/RubySanctum/boss_baltharus_the_warborn.cpp new file mode 100644 index 00000000000..42e82ee4ca5 --- /dev/null +++ b/src/server/scripts/Northrend/RubySanctum/boss_baltharus_the_warborn.cpp @@ -0,0 +1,265 @@ +/* + * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ObjectMgr.h" +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "SpellAuraEffects.h" +#include "ruby_sanctum.h" + +enum Texts +{ + SAY_BALTHARUS_INTRO = 0, // Your power wanes, ancient one.... Soon you will join your friends. + SAY_AGGRO = 1, // Ah, the entertainment has arrived. + SAY_KILL = 2, // Baltharus leaves no survivors! - This world has enough heroes. + SAY_CLONE = 3, // Twice the pain and half the fun. + SAY_DEATH = 4, // I... didn't see that coming.... +}; + +enum Spells +{ + SPELL_BARRIER_CHANNEL = 76221, + SPELL_ENERVATING_BRAND = 74502, + SPELL_SIPHONED_MIGHT = 74507, + SPELL_CLEAVE = 40504, + SPELL_BLADE_TEMPEST = 75125, + SPELL_CLONE = 74511, + SPELL_REPELLING_WAVE = 74509, + SPELL_CLEAR_DEBUFFS = 34098, + SPELL_SPAWN_EFFECT = 64195, +}; + +enum Events +{ + EVENT_BLADE_TEMPEST = 1, + EVENT_CLEAVE = 2, + EVENT_ENERVATING_BRAND = 3, + EVENT_INTRO_TALK = 4, + EVENT_OOC_CHANNEL = 5, +}; + +enum Actions +{ + ACTION_CLONE = 1, +}; + +enum Phases +{ + PHASE_ALL = 0, + PHASE_INTRO = 1, + PHASE_COMBAT = 2, + + PHASE_INTRO_MASK = 1 << PHASE_INTRO, +}; + +class boss_baltharus_the_warborn : public CreatureScript +{ + public: + boss_baltharus_the_warborn() : CreatureScript("boss_baltharus_the_warborn") { } + + struct boss_baltharus_the_warbornAI : public BossAI + { + boss_baltharus_the_warbornAI(Creature* creature) : BossAI(creature, DATA_BALTHARUS_THE_WARBORN) + { + } + + void Reset() + { + _Reset(); + _introDone = false; + _events.SetPhase(PHASE_INTRO); + _events.ScheduleEvent(EVENT_OOC_CHANNEL, 0, 0, PHASE_INTRO); + _cloneCount = RAID_MODE<uint8>(1, 2, 2, 3); + } + + void DoAction(int32 const action) + { + switch(action) + { + case ACTION_INTRO_TRIGGER: + if (_introDone) + return; + _introDone = true; + me->setActive(true); + _events.ScheduleEvent(EVENT_INTRO_TALK, 7000, 0, PHASE_INTRO); + break; + case ACTION_CLONE: + { + DoCast(me, SPELL_CLEAR_DEBUFFS); + DoCast(me, SPELL_CLONE); + DoCast(me, SPELL_REPELLING_WAVE); + Talk(SAY_CLONE); + --_cloneCount; + break; + } + default: + break; + } + } + + void EnterCombat(Unit* victim) + { + me->InterruptNonMeleeSpells(false); + _EnterCombat(); + _events.SetPhase(PHASE_COMBAT); + _events.ScheduleEvent(EVENT_CLEAVE, 110000, 0, PHASE_COMBAT); + _events.ScheduleEvent(EVENT_ENERVATING_BRAND, 130000, 0, PHASE_COMBAT); + _events.ScheduleEvent(EVENT_BLADE_TEMPEST, 150000, 0, PHASE_COMBAT); + Talk(SAY_AGGRO); + } + + void JustDied(Unit* killer) + { + _JustDied(); + Talk(SAY_DEATH); + if (Creature* xerestrasza = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_XERESTRASZA))) + xerestrasza->AI()->DoAction(ACTION_BALTHARUS_DEATH); + } + + void KilledUnit(Unit* victim) + { + if (victim->GetTypeId() == TYPEID_PLAYER) + Talk(SAY_KILL); + } + + void JustSummoned(Creature* summon) + { + summons.Summon(summon); + summon->SetHealth(me->GetHealth()); + summon->CastSpell(summon, SPELL_SPAWN_EFFECT, true); + } + + void DamageTaken(Unit* /*attacker*/, uint32& damage) + { + if (GetDifficulty() != RAID_DIFFICULTY_10MAN_NORMAL) + { + if (me->HealthBelowPctDamaged(66, damage) && _cloneCount == 2) + DoAction(ACTION_CLONE); + else if (me->HealthBelowPctDamaged(33, damage) && _cloneCount == 1) + DoAction(ACTION_CLONE); + } + else if (GetDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC) + { + if (me->HealthBelowPctDamaged(75, damage) && _cloneCount == 3) + DoAction(ACTION_CLONE); + else if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 2) + DoAction(ACTION_CLONE); + else if (me->HealthBelowPctDamaged(25, damage) && _cloneCount == 1) + DoAction(ACTION_CLONE); + } + else + { + if (me->HealthBelowPctDamaged(50, damage) && _cloneCount == 1) + DoAction(ACTION_CLONE); + } + } + + void UpdateAI(uint32 const diff) + { + if (!UpdateVictim() && !(_events.GetPhaseMask() & PHASE_INTRO_MASK)) + return; + + _events.Update(diff); + + if (me->HasUnitState(UNIT_STAT_CASTING) && !(_events.GetPhaseMask() & PHASE_INTRO_MASK)) + return; + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_INTRO_TALK: + Talk(SAY_BALTHARUS_INTRO); + break; + case EVENT_OOC_CHANNEL: + if (Creature* channelTarget = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_CRYSTAL_CHANNEL_TARGET))) + DoCast(channelTarget, SPELL_BARRIER_CHANNEL); + _events.ScheduleEvent(EVENT_OOC_CHANNEL, 7000, 0, PHASE_INTRO); + break; + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + _events.ScheduleEvent(EVENT_CLEAVE, 24000, 0, PHASE_COMBAT); + break; + case EVENT_BLADE_TEMPEST: + DoCast(me, SPELL_BLADE_TEMPEST); + _events.ScheduleEvent(EVENT_BLADE_TEMPEST, 24000, 0, PHASE_COMBAT); + break; + case EVENT_ENERVATING_BRAND: + for (uint8 i = 0; i < RAID_MODE<uint8>(4, 8, 8, 10); i++) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 45.0f, true)) + DoCast(target, SPELL_ENERVATING_BRAND); + _events.ScheduleEvent(EVENT_ENERVATING_BRAND, 26000, 0, PHASE_COMBAT); + break; + default: + break; + } + } + + DoMeleeAttackIfReady(); + } + + private: + EventMap _events; + uint8 _cloneCount; + bool _introDone; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return GetRubySanctumAI<boss_baltharus_the_warbornAI>(creature); + } +}; + +class spell_baltharus_enervating_brand : public SpellScriptLoader +{ + public: + spell_baltharus_enervating_brand() : SpellScriptLoader("spell_baltharus_enervating_brand") { } + + class spell_baltharus_enervating_brand_AuraScript : public AuraScript + { + PrepareAuraScript(spell_baltharus_enervating_brand_AuraScript); + + void HandleTriggerSpell(AuraEffect const* aurEff) + { + PreventDefaultAction(); + if (Unit* target = GetTarget()) + { + uint32 triggerSpellId = GetSpellProto()->EffectTriggerSpell[aurEff->GetEffIndex()]; + GetCaster()->CastSpell(target, triggerSpellId, true); + + if (target->GetDistance(GetCaster()) <= 12.0f) + target->CastSpell(GetCaster(), SPELL_SIPHONED_MIGHT, true); + } + } + + void Register() + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_baltharus_enervating_brand_AuraScript::HandleTriggerSpell, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const + { + return new spell_baltharus_enervating_brand_AuraScript(); + } +}; + +void AddSC_boss_baltharus_the_warborn() +{ + new boss_baltharus_the_warborn(); + new spell_baltharus_enervating_brand(); +} diff --git a/src/server/scripts/Northrend/RubySanctum/instance_ruby_sanctum.cpp b/src/server/scripts/Northrend/RubySanctum/instance_ruby_sanctum.cpp new file mode 100644 index 00000000000..88f0a0fc217 --- /dev/null +++ b/src/server/scripts/Northrend/RubySanctum/instance_ruby_sanctum.cpp @@ -0,0 +1,183 @@ +/* + * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" +#include "ruby_sanctum.h" + + +DoorData const doorData[] = +{ + {GO_FIRE_FIELD, DATA_BALTHARUS_THE_WARBORN, DOOR_TYPE_PASSAGE, BOUNDARY_E }, + {0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE}, +}; + +class instance_ruby_sanctum : public InstanceMapScript +{ + public: + instance_ruby_sanctum() : InstanceMapScript("instance_ruby_sanctum", 724) { } + + struct instance_ruby_sanctum_InstanceMapScript : public InstanceScript + { + instance_ruby_sanctum_InstanceMapScript(InstanceMap* map) : InstanceScript(map) + { + SetBossNumber(EncounterCount); + LoadDoorData(doorData); + BaltharusTheWarbornGUID = 0; + GeneralZarithrianGUID = 0; + SavinaRagefireGUID = 0; + HalionGUID = 0; + CrystalChannelTargetGUID = 0; + XerestraszaGUID = 0; + } + + void OnCreatureCreate(Creature* creature) + { + switch (creature->GetEntry()) + { + case NPC_BALTHARUS_THE_WARBORN: + BaltharusTheWarbornGUID = creature->GetGUID(); + break; + case NPC_GENERAL_ZARITHRIAN: + GeneralZarithrianGUID = creature->GetGUID(); + break; + case NPC_SAVINA_RAGEFIRE: + SavinaRagefireGUID = creature->GetGUID(); + break; + case NPC_HALION: + HalionGUID = creature->GetGUID(); + break; + case NPC_BALTHARUS_TARGET: + CrystalChannelTargetGUID = creature->GetGUID(); + break; + case NPC_XERESTRASZA: + XerestraszaGUID = creature->GetGUID(); + break; + default: + break; + } + } + + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_FIRE_FIELD: + AddDoor(go, true); + break; + default: + break; + } + } + + void OnGameObjectRemove(GameObject* go) + { + switch (go->GetEntry()) + { + case GO_FIRE_FIELD: + AddDoor(go, false); + break; + default: + break; + } + } + + uint64 GetData64(uint32 type) + { + switch (type) + { + case DATA_BALTHARUS_THE_WARBORN: + return BaltharusTheWarbornGUID; + case DATA_GENERAL_ZARITHRIAN: + return GeneralZarithrianGUID; + case DATA_SAVINA_RAGEFIRE: + return SavinaRagefireGUID; + case DATA_HALION: + return HalionGUID; + case DATA_CRYSTAL_CHANNEL_TARGET: + return CrystalChannelTargetGUID; + case DATA_XERESTRASZA: + return XerestraszaGUID; + default: + break; + } + + return 0; + } + + std::string GetSaveData() + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << "R S " << GetBossSaveData(); + + OUT_SAVE_INST_DATA_COMPLETE; + return saveStream.str(); + } + + void Load(char const* str) + { + if (!str) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(str); + + char dataHead1, dataHead2; + + std::istringstream loadStream(str); + loadStream >> dataHead1 >> dataHead2; + + if (dataHead1 == 'R' && dataHead2 == 'S') + { + for (uint8 i = 0; i < EncounterCount; ++i) + { + uint32 tmpState; + loadStream >> tmpState; + if (tmpState == IN_PROGRESS || tmpState > SPECIAL) + tmpState = NOT_STARTED; + + SetBossState(i, EncounterState(tmpState)); + } + } + else + OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } + + protected: + uint64 BaltharusTheWarbornGUID; + uint64 GeneralZarithrianGUID; + uint64 SavinaRagefireGUID; + uint64 HalionGUID; + uint64 CrystalChannelTargetGUID; + uint64 XerestraszaGUID; + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const + { + return new instance_ruby_sanctum_InstanceMapScript(map); + } +}; + +void AddSC_instance_ruby_sanctum() +{ + new instance_ruby_sanctum(); +} diff --git a/src/server/scripts/Northrend/RubySanctum/ruby_sanctum.cpp b/src/server/scripts/Northrend/RubySanctum/ruby_sanctum.cpp new file mode 100644 index 00000000000..51e2a832882 --- /dev/null +++ b/src/server/scripts/Northrend/RubySanctum/ruby_sanctum.cpp @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptPCH.h" +#include "ruby_sanctum.h" + +enum Texts +{ + SAY_XERESTRASZA_EVENT = 0, + SAY_XERESTRASZA_EVENT_1 = 1, + SAY_XERESTRASZA_EVENT_2 = 2, + SAY_XERESTRASZA_EVENT_3 = 3, + SAY_XERESTRASZA_EVENT_4 = 4, + SAY_XERESTRASZA_EVENT_5 = 5, + SAY_XERESTRASZA_EVENT_6 = 6, + SAY_XERESTRASZA_EVENT_7 = 7, + SAY_XERESTRASZA_INTRO = 8, +}; + +enum Events +{ + EVENT_XERESTRASZA_EVENT = 0, + EVENT_XERESTRASZA_EVENT_1 = 1, + EVENT_XERESTRASZA_EVENT_2 = 2, + EVENT_XERESTRASZA_EVENT_3 = 3, + EVENT_XERESTRASZA_EVENT_4 = 4, + EVENT_XERESTRASZA_EVENT_5 = 5, + EVENT_XERESTRASZA_EVENT_6 = 6, + EVENT_XERESTRASZA_EVENT_7 = 7, +}; + +Position const xerestraszaMovePos = {3151.236f, 379.8733f, 86.31996f, 0.0f}; + +class npc_xerestrasza : public CreatureScript +{ + public: + npc_xerestrasza() : CreatureScript("npc_xerestrasza") { } + + struct npc_xerestraszaAI : public ScriptedAI + { + npc_xerestraszaAI(Creature* creature) : ScriptedAI(creature) + { + } + + void Reset() + { + _events.Reset(); + _isIntro = false; + me->RemoveFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER); + } + + void DoAction(int32 const action) + { + if (action == ACTION_BALTHARUS_DEATH) + { + me->setActive(true); + _isIntro = true; + + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT, 4000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_1, 20000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_2, 29000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_3, 36000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_4, 46000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_5, 55000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_6, 65000); + _events.ScheduleEvent(EVENT_XERESTRASZA_EVENT_7, 73000); + } + } + + void UpdateAI(uint32 const diff) + { + if (!_isIntro) + return; + + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_XERESTRASZA_EVENT: + Talk(SAY_XERESTRASZA_EVENT); + me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); + me->GetMotionMaster()->MovePoint(0, xerestraszaMovePos); + break; + case EVENT_XERESTRASZA_EVENT_1: + Talk(SAY_XERESTRASZA_EVENT_1); + break; + case EVENT_XERESTRASZA_EVENT_2: + Talk(SAY_XERESTRASZA_EVENT_2); + break; + case EVENT_XERESTRASZA_EVENT_3: + Talk(SAY_XERESTRASZA_EVENT_3); + break; + case EVENT_XERESTRASZA_EVENT_4: + Talk(SAY_XERESTRASZA_EVENT_4); + break; + case EVENT_XERESTRASZA_EVENT_5: + Talk(SAY_XERESTRASZA_EVENT_5); + break; + case EVENT_XERESTRASZA_EVENT_6: + Talk(SAY_XERESTRASZA_EVENT_6); + break; + case EVENT_XERESTRASZA_EVENT_7: + me->SetFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER); + Talk(SAY_XERESTRASZA_EVENT_7); + me->setActive(false); + break; + default: + break; + } + } + } + + private: + EventMap _events; + bool _isIntro; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return GetRubySanctumAI<npc_xerestraszaAI>(creature); + } +}; + +class at_baltharus_plateau : public AreaTriggerScript +{ + public: + at_baltharus_plateau() : AreaTriggerScript("at_baltharus_plateau") { } + + bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) + { + // Only trigger once + if (InstanceScript* instance = player->GetInstanceScript()) + { + if (Creature* xerestrasza = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_XERESTRASZA))) + if (instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) != DONE) + xerestrasza->AI()->Talk(SAY_XERESTRASZA_INTRO); + + if (Creature* baltharus = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_BALTHARUS_THE_WARBORN))) + if (instance->GetBossState(DATA_BALTHARUS_THE_WARBORN) != DONE) + baltharus->AI()->DoAction(ACTION_INTRO_TRIGGER); + } + + return true; + } +}; + +void AddSC_ruby_sanctum() +{ + new at_baltharus_plateau(); + new npc_xerestrasza(); +} diff --git a/src/server/scripts/Northrend/RubySanctum/ruby_sanctum.h b/src/server/scripts/Northrend/RubySanctum/ruby_sanctum.h new file mode 100644 index 00000000000..60b4c9f3e92 --- /dev/null +++ b/src/server/scripts/Northrend/RubySanctum/ruby_sanctum.h @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2008-2011 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef RUBY_SANCTUM_H_ +#define RUBY_SANCTUM_H_ + +#include "SpellScript.h" +#include "Map.h" +#include "Creature.h" + +#define RSScriptName "instance_ruby_sanctum" +uint32 const EncounterCount = 4; + +enum DataTypes +{ + // Encounter States/Boss GUIDs + DATA_BALTHARUS_THE_WARBORN = 0, + DATA_GENERAL_ZARITHRIAN = 1, + DATA_SAVINA_RAGEFIRE = 2, + DATA_HALION = 3, + + // Etc + DATA_XERESTRASZA = 4, + DATA_CRYSTAL_CHANNEL_TARGET = 5, +}; + +enum SharedActions +{ + ACTION_INTRO_TRIGGER = -3975101, + ACTION_BALTHARUS_DEATH = -3975102, +}; + +enum CreaturesIds +{ + // Baltharus the Warborn + NPC_BALTHARUS_THE_WARBORN = 39751, + NPC_BALTHARUS_THE_WARBORN_CLONE = 39899, + NPC_BALTHARUS_TARGET = 26712, + + // General Zarithrian + NPC_GENERAL_ZARITHRIAN = 39746, + NPC_ONYX_FLAMECALLER = 39814, + NPC_ZARITHIAN_SPAWN_STALKER = 39794, + + // Saviana Ragefire + NPC_SAVINA_RAGEFIRE = 39747, + + // Halion + NPC_HALION = 39863, + NPC_HALION_TWILIGHT = 40142, + NPC_HALION_CONTROLLER = 40146, + NPC_LIVING_INFERNO = 40681, + NPC_LIVING_EMBER = 40683, + NPC_ORB_CARRIER = 40081, + NPC_ORB_ROTATION_FOCUS = 40091, + NPC_SHADOW_ORB_N = 40083, + NPC_SHADOW_ORB_S = 40100, + + // Xerestrasza + NPC_XERESTRASZA = 40429, +}; + +enum GameObjectsIds +{ + GO_HALION_PORTAL_1 = 202794, // Unknown spell 75074, should be somehow be linked to 74807 + GO_HALION_PORTAL_2 = 202795, // Also spell 75074 + GO_HALION_PORTAL_EXIT = 202796, // Leave Twilight Realm (74812) + GO_FIRE_FIELD = 203005, + GO_FLAME_WALLS = 203006, + GO_FLAME_RING = 203007, +}; + +enum WorldStatesRS +{ + WORLDSTATE_UNK_1 = 5049, + WORLDSTATE_UNK_2 = 5050, + WORLDSTATE_UNK_3 = 5051, +}; + +template<class AI> +CreatureAI* GetRubySanctumAI(Creature* creature) +{ + if (InstanceMap* instance = creature->GetMap()->ToInstanceMap()) + if (instance->GetInstanceScript()) + if (instance->GetScriptId() == GetScriptId(RSScriptName)) + return new AI(creature); + return NULL; +} + +#endif // RUBY_SANCTUM_H_ |