diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp index ccb5f966dfc..7c09319cee5 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/alterac_valley.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace AlteracValley +{ enum Spells { SPELL_CHARGE = 22911, @@ -185,8 +187,10 @@ class npc_av_marshal_or_warmaster : public CreatureScript return new npc_av_marshal_or_warmasterAI(creature); } }; +} void AddSC_alterac_valley() { + using namespace AlteracValley; new npc_av_marshal_or_warmaster(); } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp index b33ef19b431..7ea7e05f8d9 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_balinda.cpp @@ -19,6 +19,8 @@ #include "ObjectAccessor.h" #include "ScriptedCreature.h" +namespace AlteracValley::Balinda +{ enum Spells { SPELL_ARCANE_EXPLOSION = 46608, @@ -190,8 +192,10 @@ class boss_balinda : public CreatureScript return new boss_balindaAI(creature); } }; +} void AddSC_boss_balinda() { + using namespace AlteracValley::Balinda; new boss_balinda; } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp index 1a7e3d6191b..e7eb6fdef07 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_drekthar.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace AlteracValley::Drekthar +{ enum Spells { SPELL_WHIRLWIND = 15589, @@ -143,8 +145,10 @@ class boss_drekthar : public CreatureScript return new boss_drektharAI(creature); } }; +} void AddSC_boss_drekthar() { + using namespace AlteracValley::Drekthar; new boss_drekthar; } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp index 41eabe990e1..ed75d10b4ff 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_galvangar.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace AlteracValley::Galvangar +{ enum Spells { SPELL_CLEAVE = 15284, @@ -144,8 +146,10 @@ class boss_galvangar : public CreatureScript return new boss_galvangarAI(creature); } }; +} void AddSC_boss_galvangar() { + using namespace AlteracValley::Galvangar; new boss_galvangar; } diff --git a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp index 69688fb9482..58b11fcec2a 100644 --- a/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp +++ b/src/server/scripts/EasternKingdoms/AlteracValley/boss_vanndar.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace AlteracValley::Vanndar +{ enum Yells { YELL_AGGRO = 0, @@ -121,8 +123,10 @@ class boss_vanndar : public CreatureScript return new boss_vanndarAI(creature); } }; +} void AddSC_boss_vanndar() { + using namespace AlteracValley::Vanndar; new boss_vanndar; } diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/baradin_hold.h b/src/server/scripts/EasternKingdoms/BaradinHold/baradin_hold.h index e95dde190b6..5464a8b9910 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/baradin_hold.h +++ b/src/server/scripts/EasternKingdoms/BaradinHold/baradin_hold.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace BaradinHold +{ #define DataHeader "BH" #define BHScriptName "instance_baradin_hold" @@ -63,5 +65,6 @@ inline AI* GetBaradinHoldAI(T* obj) } #define RegisterBaradinHoldCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBaradinHoldAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp index 56b604784be..45d4eb67f0c 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/boss_alizabal.cpp @@ -25,6 +25,8 @@ #include "SpellInfo.h" #include "SpellScript.h" +namespace BaradinHold::Alizabal +{ enum Texts { // Alizabal @@ -250,9 +252,12 @@ class at_alizabal_intro : public OnlyOnceAreaTriggerScript return true; } }; +} void AddSC_boss_alizabal() { + using namespace BaradinHold; + using namespace BaradinHold::Alizabal; RegisterBaradinHoldCreatureAI(boss_alizabal); RegisterSpellScript(spell_alizabal_seething_hate); new at_alizabal_intro(); diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp index 6c9a7024851..ee03595a3f4 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/boss_occuthar.cpp @@ -25,6 +25,8 @@ #include "TemporarySummon.h" #include "Vehicle.h" +namespace BaradinHold::Occuthar +{ enum Spells { SPELL_SEARING_SHADOWS = 96913, @@ -374,9 +376,11 @@ class spell_occuthar_occuthars_destruction : public SpellScriptLoader return new spell_occuthar_occuthars_destruction_AuraScript(); } }; +} void AddSC_boss_occuthar() { + using namespace BaradinHold::Occuthar; new boss_occuthar(); new npc_eyestalk(); new spell_occuthar_focused_fire(); diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp index af2b8a00427..28809344e91 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/boss_pit_lord_argaloth.cpp @@ -26,6 +26,8 @@ #include "SpellScript.h" #include "SpellAuraEffects.h" +namespace BaradinHold::Argaloth +{ enum Texts { SAY_ANNOUNCE_FEL_FIRESTORM = 0 @@ -292,9 +294,12 @@ class spell_argaloth_fel_firestorm : public SpellScript OnObjectAreaTargetSelect.Register(&spell_argaloth_fel_firestorm::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); } }; +} void AddSC_boss_pit_lord_argaloth() { + using namespace BaradinHold; + using namespace BaradinHold::Argaloth; RegisterBaradinHoldCreatureAI(boss_pit_lord_argaloth); RegisterBaradinHoldCreatureAI(npc_argaloth_fel_flames); RegisterSpellAndAuraScriptPair(spell_argaloth_consuming_darkness, spell_argaloth_consuming_darkness_AuraScript); diff --git a/src/server/scripts/EasternKingdoms/BaradinHold/instance_baradin_hold.cpp b/src/server/scripts/EasternKingdoms/BaradinHold/instance_baradin_hold.cpp index 022ff08ce0e..ed873d100f4 100644 --- a/src/server/scripts/EasternKingdoms/BaradinHold/instance_baradin_hold.cpp +++ b/src/server/scripts/EasternKingdoms/BaradinHold/instance_baradin_hold.cpp @@ -23,6 +23,8 @@ #include "InstanceScript.h" #include "Map.h" +namespace BaradinHold +{ ObjectData const creatureData[] = { { BOSS_ARGALOTH, DATA_ARGALOTH }, @@ -75,8 +77,10 @@ class instance_baradin_hold: public InstanceMapScript return new instance_baradin_hold_InstanceMapScript(map); } }; +} void AddSC_instance_baradin_hold() { + using namespace BaradinHold; new instance_baradin_hold(); } diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.cpp index 5e54848751d..1c148ef635e 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.cpp @@ -34,6 +34,8 @@ #include +namespace BastionOfTwilight +{ enum PhaseTwist { // Events @@ -377,9 +379,11 @@ class at_bot_intro_events final : public OnlyOnceAreaTriggerScript private: uint32 _dataType; }; +} void AddSC_bastion_of_twilight() { + using namespace BastionOfTwilight; RegisterBastionOfTwilightCreatureAI(npc_bot_invisible_stalker_phase_twist); RegisterBastionOfTwilightCreatureAI(npc_bot_chogall); RegisterBastionOfTwilightCreatureAI(npc_bot_evolved_drakonaar); diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.h b/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.h index 8257f21b59b..676486a9b10 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.h +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/bastion_of_twilight.h @@ -18,11 +18,13 @@ #ifndef DEF_BASTION_OF_TWILIGHT_H #define DEF_BASTION_OF_TWILIGHT_H +#include "CreatureAIImpl.h" + +namespace BastionOfTwilight +{ #define DataHeader "BoT" #define BoTScriptName "instance_bastion_of_twilight" -#include "CreatureAIImpl.h" - uint32 const EncounterCountNormal = 4; uint32 const EncounterCountHeroic = 5; @@ -219,5 +221,6 @@ AI* GetBastionOfTwilightAI(GameObject* go) { return GetInstanceAI(go, BoTScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp index a460dfb5e2a..a1070b1570c 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp @@ -36,6 +36,8 @@ #include "MotionMaster.h" #include "Map.h" +namespace BastionOfTwilight::AscendantCouncil +{ enum Texts { // Ascendant Council @@ -2571,9 +2573,12 @@ class spell_elementium_monstrosity_gravity_crush final : public SpellScript OnObjectAreaTargetSelect.Register(&spell_elementium_monstrosity_gravity_crush::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY); } }; +} void AddSC_boss_ascendant_council() { + using namespace BastionOfTwilight; + using namespace BastionOfTwilight::AscendantCouncil; RegisterBastionOfTwilightCreatureAI(boss_ascendant_council_controller); RegisterBastionOfTwilightCreatureAI(npc_feludius); RegisterBastionOfTwilightCreatureAI(npc_ignacious); diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp index a84013f1155..b43c5057903 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_chogall.cpp @@ -34,6 +34,8 @@ #include "Vehicle.h" #include "bastion_of_twilight.h" +namespace BastionOfTwilight::Chogall +{ enum Texts { // Cho'Gall @@ -1380,9 +1382,12 @@ class spell_chogall_debilitating_beam final : public AuraScript OnEffectPeriodic.Register(&spell_chogall_debilitating_beam::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE); } }; +} void AddSC_boss_chogall() { + using namespace BastionOfTwilight; + using namespace BastionOfTwilight::Chogall; RegisterBastionOfTwilightCreatureAI(boss_chogall); RegisterBastionOfTwilightCreatureAI(npc_chogall_corrupting_adherent); RegisterBastionOfTwilightCreatureAI(npc_chogall_blood_of_the_old_god); diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_halfus_wyrmbreaker.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_halfus_wyrmbreaker.cpp index 4f02126efa6..118b616667e 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_halfus_wyrmbreaker.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_halfus_wyrmbreaker.cpp @@ -30,6 +30,8 @@ #include "MotionMaster.h" #include "bastion_of_twilight.h" +namespace BastionOfTwilight::HalfusWyrmbreaker +{ enum Spells { // Halfus Wyrmbreaker @@ -689,9 +691,12 @@ class spell_halfus_dancing_flames final : public SpellScript OnObjectAreaTargetSelect.Register(&spell_halfus_dancing_flames::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); } }; +} void AddSC_boss_halfus_wyrmbreaker() { + using namespace BastionOfTwilight; + using namespace BastionOfTwilight::HalfusWyrmbreaker; RegisterBastionOfTwilightCreatureAI(boss_halfus_wyrmbreaker); RegisterBastionOfTwilightCreatureAI(npc_halfus_proto_behemoth); RegisterBastionOfTwilightCreatureAI(npc_halfus_enslaved_dragon); diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_theralion_and_valiona.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_theralion_and_valiona.cpp index 9f141e8d43f..096ea5674dd 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_theralion_and_valiona.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_theralion_and_valiona.cpp @@ -31,6 +31,8 @@ #include "Map.h" #include "bastion_of_twilight.h" +namespace BastionOfTwilight::TheralionAndValiona +{ enum Texts { // Theralion and Valiona @@ -1601,9 +1603,12 @@ class spell_theralion_and_valiona_collapsing_twilight_portal final : public Aura AfterEffectApply.Register(&spell_theralion_and_valiona_collapsing_twilight_portal::Apply, EFFECT_1, SPELL_AURA_MOD_SCALE, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_theralion_and_valiona() { + using namespace BastionOfTwilight; + using namespace BastionOfTwilight::TheralionAndValiona; RegisterBastionOfTwilightCreatureAI(boss_theralion); RegisterBastionOfTwilightCreatureAI(boss_valiona); RegisterBastionOfTwilightCreatureAI(npc_theralion_and_valiona_unstable_twilight); diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/instance_bastion_of_twilight.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/instance_bastion_of_twilight.cpp index 9103c774227..f575eb4b45e 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/instance_bastion_of_twilight.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/instance_bastion_of_twilight.cpp @@ -24,6 +24,8 @@ #include "MotionMaster.h" #include "TemporarySummon.h" +namespace BastionOfTwilight +{ ObjectData const creatureData[] = { { BOSS_HALFUS_WYRMBREAKER, DATA_HALFUS_WYRMBREAKER }, @@ -488,8 +490,10 @@ class instance_bastion_of_twilight final : public InstanceMapScript return new instance_bastion_of_twilight_InstanceMapScript(map); } }; +} void AddSC_instance_bastion_of_twilight() { + using namespace BastionOfTwilight; new instance_bastion_of_twilight(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp index 8ad2e85a19c..42f74b9b732 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.cpp @@ -29,6 +29,8 @@ #include "TemporarySummon.h" #include "InstanceScript.h" +namespace BlackrockCaverns +{ /*##### # npc_fire_cyclone #####*/ @@ -868,9 +870,11 @@ class at_brc_quest_trigger : public AreaTriggerScript private: uint32 _questId = 0; }; +} void AddSC_blackrock_caverns() { + using namespace BlackrockCaverns; RegisterBlackrockCavernsCreatureAI(npc_fire_cyclone); RegisterBlackrockCavernsCreatureAI(npc_twilight_flame_caller); RegisterBlackrockCavernsCreatureAI(npc_twilight_torturer); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.h index 8077a5e7d89..047fdaf8bfd 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/blackrock_caverns.h @@ -21,6 +21,8 @@ #include "CreatureAIImpl.h" #include "Position.h" +namespace BlackrockCaverns +{ #define BCScriptName "instance_blackrock_caverns" #define DataHeader "BRC" @@ -109,5 +111,6 @@ inline AI* GetBlackrockCavernsAI(T* obj) } #define RegisterBlackrockCavernsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBlackrockCavernsAI) +} #endif // BLACKROCKCAVERNS_H_ diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp index 9c308c046a8..b2efe325a66 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_ascendant_lord_obsidius.cpp @@ -26,6 +26,8 @@ #include "SpellScript.h" #include "Position.h" +namespace BlackrockCaverns::AscendantLordObsidius +{ enum Text { // Ascendant Lord Obsidius @@ -348,9 +350,12 @@ class spell_obsidius_shadow_of_obsidius : public AuraScript OnEffectAbsorb.Register(&spell_obsidius_shadow_of_obsidius::Absorb, EFFECT_0); } }; +} void AddSC_boss_ascendant_lord_obsidius() { + using namespace BlackrockCaverns; + using namespace BlackrockCaverns::AscendantLordObsidius; RegisterBlackrockCavernsCreatureAI(boss_ascendant_lord_obsidius); RegisterSpellScript(spell_obsidius_twitchy); RegisterSpellScript(spell_obsidius_transformation); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp index 4642e779869..d3e41500326 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_beauty.cpp @@ -23,6 +23,8 @@ #include "SpellScript.h" #include "ObjectAccessor.h" +namespace BlackrockCaverns::Beauty +{ enum Sounds { // Beauty @@ -248,9 +250,12 @@ class spell_beauty_magma_spit : public AuraScript AfterEffectRemove.Register(&spell_beauty_magma_spit::AfterRemove, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_beauty() { + using namespace BlackrockCaverns; + using namespace BlackrockCaverns::Beauty; RegisterBlackrockCavernsCreatureAI(boss_beauty); RegisterBlackrockCavernsCreatureAI(npc_beauty_puppy); RegisterSpellScript(spell_beauty_magma_spit); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla_herald_of_twilight.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla_herald_of_twilight.cpp index 4516f4739b5..9a97e7077e5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla_herald_of_twilight.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_corla_herald_of_twilight.cpp @@ -26,6 +26,8 @@ #include "InstanceScript.h" #include "ObjectAccessor.h" +namespace BlackrockCaverns::CorlaHeraldOfTwilight +{ enum Texts { // Corla @@ -535,10 +537,12 @@ class achievement_arrested_development : public AchievementCriteriaScript return false; } }; - +} void AddSC_boss_corla() { + using namespace BlackrockCaverns; + using namespace BlackrockCaverns::CorlaHeraldOfTwilight; RegisterBlackrockCavernsCreatureAI(boss_corla_herald_of_twilight); RegisterBlackrockCavernsCreatureAI(npc_corla_twilight_zealot); RegisterSpellScript(spell_corla_nether_dragon_essence); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp index b7a6bf7a271..9b28f65b355 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_karsh_steelbender.cpp @@ -25,6 +25,8 @@ #include "InstanceScript.h" #include "Map.h" +namespace BlackrockCaverns::KarshSteelbender +{ enum Text { // Karsh Steelbender @@ -318,9 +320,12 @@ class achievement_too_hot_to_handle : public AchievementCriteriaScript return false; } }; +} void AddSC_boss_karsh_steelbender() { + using namespace BlackrockCaverns; + using namespace BlackrockCaverns::KarshSteelbender; RegisterBlackrockCavernsCreatureAI(boss_karsh_steelbender); RegisterSpellScript(spell_karsh_quicksilver_armor); RegisterSpellAndAuraScriptPair(spell_karsh_superheated_quicksilver_armor, spell_karsh_superheated_quicksilver_armor_AuraScript); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp index ad6e2a91026..b5fd4660612 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/boss_romogg_bonecrusher.cpp @@ -25,6 +25,8 @@ #include "Map.h" #include "SpellInfo.h" +namespace BlackrockCaverns::RomoggBonecrusher +{ enum Texts { SAY_AGGRO = 0, @@ -324,9 +326,12 @@ class achievement_crushing_bones_and_cracking_skulls : public AchievementCriteri return false; } }; +} void AddSC_boss_romogg_bonecrusher() { + using namespace BlackrockCaverns; + using namespace BlackrockCaverns::RomoggBonecrusher; RegisterBlackrockCavernsCreatureAI(boss_romogg_bonecrusher); RegisterBlackrockCavernsCreatureAI(npc_romogg_chains_of_woe); RegisterSpellScript(spell_romogg_quake); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/instance_blackrock_caverns.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/instance_blackrock_caverns.cpp index 69373fbf375..349e5efef21 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/instance_blackrock_caverns.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockCaverns/instance_blackrock_caverns.cpp @@ -22,6 +22,8 @@ #include "CreatureAI.h" #include "Map.h" +namespace BlackrockCaverns +{ ObjectData const creatureData[] = { { BOSS_ROMOGG_BONECRUSHER, DATA_ROMOGG_BONECRUSHER }, @@ -141,8 +143,10 @@ class instance_blackrock_caverns : public InstanceMapScript return new instance_blackrock_caverns_InstanceMapScript(map); } }; +} void AddSC_instance_blackrock_caverns() { + using namespace BlackrockCaverns; new instance_blackrock_caverns(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp index 5c2730e317a..8a7d6707355 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.cpp @@ -28,6 +28,8 @@ #include "TemporarySummon.h" #include "WorldSession.h" +namespace BlackrockDepths +{ //go_shadowforge_brazier class go_shadowforge_brazier : public GameObjectScript { @@ -634,9 +636,11 @@ class npc_rocknot : public CreatureScript return GetBlackrockDepthsAI(creature); } }; +} void AddSC_blackrock_depths() { + using namespace BlackrockDepths; new go_shadowforge_brazier(); new at_ring_of_law(); new npc_grimstone(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h index 2f5821ec6c2..b99b95e4b8c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/blackrock_depths.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace BlackrockDepths +{ #define BRDScriptName "instance_blackrock_depths" #define DataHeader "BRD" @@ -71,5 +73,6 @@ inline AI* GetBlackrockDepthsAI(T* obj) { return GetInstanceAI(obj, BRDScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp index 9eb4f8ef484..2fac6b4d596 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_ambassador_flamelash.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace BlackrockDepths::AmbassadorFlamelash +{ enum Spells { SPELL_FIREBLAST = 15573 @@ -92,8 +94,11 @@ class boss_ambassador_flamelash : public CreatureScript return new boss_ambassador_flamelashAI(creature); } }; +} void AddSC_boss_ambassador_flamelash() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::AmbassadorFlamelash; new boss_ambassador_flamelash(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp index 618bf196dc1..5237fcd14d3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_coren_direbrew.cpp @@ -31,6 +31,8 @@ #include "SpellScript.h" #include "TemporarySummon.h" +namespace BlackrockDepths::CorenDirebrew +{ enum DirebrewSays { SAY_INTRO = 0, @@ -669,9 +671,12 @@ class spell_barreled_control_aura : public SpellScriptLoader return new spell_barreled_control_aura_AuraScript(); } }; +} void AddSC_boss_coren_direbrew() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::CorenDirebrew; new boss_coren_direbrew(); new npc_coren_direbrew_sisters(); new npc_direbrew_minion(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp index 50f387fe665..be8d3a169c7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_emperor_dagran_thaurissan.cpp @@ -21,6 +21,8 @@ #include "ObjectAccessor.h" #include "ScriptedCreature.h" +namespace BlackrockDepths::EmperorDagranThaurissan +{ enum Yells { SAY_AGGRO = 0, @@ -123,8 +125,11 @@ class boss_emperor_dagran_thaurissan : public CreatureScript return GetBlackrockDepthsAI(creature); } }; +} void AddSC_boss_draganthaurissan() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::EmperorDagranThaurissan; new boss_emperor_dagran_thaurissan(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp index 68d518af5f4..3478240aba2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_general_angerforge.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace BlackrockDepths::GeneralAngerforge +{ enum Spells { SPELL_MIGHTYBLOW = 14099, @@ -133,8 +135,11 @@ class boss_general_angerforge : public CreatureScript return new boss_general_angerforgeAI(creature); } }; +} void AddSC_boss_general_angerforge() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::GeneralAngerforge; new boss_general_angerforge(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp index 37bc46f46d7..72bf307447f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_high_interrogator_gerstahn.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace BlackrockDepths::HighInterrogatorGerstahn +{ enum Spells { SPELL_SHADOWWORDPAIN = 10894, @@ -102,8 +104,11 @@ class boss_high_interrogator_gerstahn : public CreatureScript return new boss_high_interrogator_gerstahnAI(creature); } }; +} void AddSC_boss_high_interrogator_gerstahn() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::HighInterrogatorGerstahn; new boss_high_interrogator_gerstahn(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp index a2a5a5c6402..d4d60758613 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_magmus.cpp @@ -20,6 +20,8 @@ #include "InstanceScript.h" #include "ScriptedCreature.h" +namespace BlackrockDepths::Magmus +{ enum Spells { SPELL_FIERYBURST = 13900, @@ -109,8 +111,11 @@ class boss_magmus : public CreatureScript return GetBlackrockDepthsAI(creature); } }; +} void AddSC_boss_magmus() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::Magmus; new boss_magmus(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp index 85a3ac3d977..3733e5e8e2e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_moira_bronzebeard.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace BlackrockDepths::MoiraBronzebeard +{ enum Spells { SPELL_HEAL = 10917, @@ -96,8 +98,11 @@ class boss_moira_bronzebeard : public CreatureScript return new boss_moira_bronzebeardAI(creature); } }; +} void AddSC_boss_moira_bronzebeard() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::MoiraBronzebeard; new boss_moira_bronzebeard(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp index bbd44d3f126..a243d2206c0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/boss_tomb_of_seven.cpp @@ -22,6 +22,8 @@ #include "ScriptedCreature.h" #include "ScriptedGossip.h" +namespace BlackrockDepths::TombOfSeven +{ enum Spells { SPELL_SMELT_DARK_IRON = 14891, @@ -270,9 +272,12 @@ class boss_doomrel : public CreatureScript return GetBlackrockDepthsAI(creature); } }; +} void AddSC_boss_tomb_of_seven() { + using namespace BlackrockDepths; + using namespace BlackrockDepths::TombOfSeven; new boss_gloomrel(); new boss_doomrel(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp index 045458ce852..c910f61b2c9 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockDepths/instance_blackrock_depths.cpp @@ -25,6 +25,8 @@ #include "Map.h" #include "MotionMaster.h" +namespace BlackrockDepths +{ #define TIMER_TOMBOFTHESEVEN 15000 #define MAX_ENCOUNTER 6 @@ -426,8 +428,10 @@ class instance_blackrock_depths : public InstanceMapScript } }; }; +} void AddSC_instance_blackrock_depths() { + using namespace BlackrockDepths; new instance_blackrock_depths(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h index bca9f01839a..279658e4961 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/blackrock_spire.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace BlackrockSpire +{ uint32 const EncounterCount = 23; #define BRSScriptName "instance_blackrock_spire" @@ -127,5 +129,6 @@ inline AI* GetBlackrockSpireAI(T* obj) { return GetInstanceAI(obj, BRSScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp index affcc15fb78..450cc7f7b87 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_drakkisath.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::Drakkisath +{ enum Spells { SPELL_FIRENOVA = 23462, @@ -107,8 +109,11 @@ class boss_drakkisath : public CreatureScript return new boss_drakkisathAI(creature); } }; +} void AddSC_boss_drakkisath() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::Drakkisath; new boss_drakkisath(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp index a7376f8d40f..c2766280cc2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gizrul_the_slavener.cpp @@ -21,6 +21,8 @@ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace BlackrockSpire::GizrulTheSlavener +{ enum Spells { SPELL_FATAL_BITE = 16495, @@ -109,8 +111,11 @@ class boss_gizrul_the_slavener : public CreatureScript return GetBlackrockSpireAI(creature); } }; +} void AddSC_boss_gizrul_the_slavener() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::GizrulTheSlavener; new boss_gizrul_the_slavener(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp index a88f7398653..1aa8ea0ad6a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_gyth.cpp @@ -22,6 +22,8 @@ #include "MotionMaster.h" #include "ScriptedCreature.h" +namespace BlackrockSpire::Gyth +{ enum Spells { SPELL_REND_MOUNTS = 16167, // Change model @@ -182,8 +184,11 @@ class boss_gyth : public CreatureScript return GetBlackrockSpireAI(creature); } }; +} void AddSC_boss_gyth() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::Gyth; new boss_gyth(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp index 224e25ecc22..f58b8a58582 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_halycon.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::Halycon +{ enum Spells { SPELL_REND = 13738, @@ -115,8 +117,11 @@ class boss_halycon : public CreatureScript return new boss_halyconAI(creature); } }; +} void AddSC_boss_halycon() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::Halycon; new boss_halycon(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp index 8afe88dc54c..cfbc537f8a8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_highlord_omokk.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::HighlordOmokk +{ enum Spells { SPELL_FRENZY = 8269, @@ -96,8 +98,11 @@ class boss_highlord_omokk : public CreatureScript }; }; +} void AddSC_boss_highlordomokk() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::HighlordOmokk; new boss_highlord_omokk(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp index a80d9a6ac6b..f7ed28f781e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_lord_valthalak.cpp @@ -20,6 +20,8 @@ #include "InstanceScript.h" #include "ScriptedCreature.h" +namespace BlackrockSpire::LordValthalak +{ enum Spells { SPELL_FRENZY = 8269, @@ -142,8 +144,11 @@ class boss_lord_valthalak : public CreatureScript return GetBlackrockSpireAI(creature); } }; +} void AddSC_boss_lord_valthalak() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::LordValthalak; new boss_lord_valthalak(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp index dd5402af7b3..740b8cc2c26 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_mother_smolderweb.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::MotherSmolderweb +{ enum Spells { SPELL_CRYSTALIZE = 16104, @@ -101,8 +103,11 @@ class boss_mother_smolderweb : public CreatureScript }; }; +} void AddSC_boss_mothersmolderweb() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::MotherSmolderweb; new boss_mother_smolderweb(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp index c13f87e5c9d..e0ca409f231 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_overlord_wyrmthalak.cpp @@ -20,6 +20,8 @@ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace BlackrockSpire::OverlordWyrmthalak +{ enum Spells { SPELL_BLASTWAVE = 11130, @@ -140,8 +142,11 @@ class boss_overlord_wyrmthalak : public CreatureScript return GetBlackrockSpireAI(creature); } }; +} void AddSC_boss_overlordwyrmthalak() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::OverlordWyrmthalak; new boss_overlord_wyrmthalak(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp index 55df6541306..38865b39337 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -27,6 +27,8 @@ #include "Spell.h" #include "SpellInfo.h" +namespace BlackrockSpire::PyroguardEmberseer +{ enum Text { EMOTE_ONE_STACK = 0, @@ -444,9 +446,12 @@ class npc_blackhand_incarcerator : public CreatureScript return GetBlackrockSpireAI(creature); } }; +} void AddSC_boss_pyroguard_emberseer() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::PyroguardEmberseer; new boss_pyroguard_emberseer(); new npc_blackhand_incarcerator(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp index 3bcaaa0f8eb..0f9c9a445fb 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_quartermaster_zigris.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::QuatermasterZigris +{ enum Spells { SPELL_SHOOT = 16496, @@ -95,8 +97,11 @@ class quartermaster_zigris : public CreatureScript return new boss_quatermasterzigrisAI(creature); } }; +} void AddSC_boss_quatermasterzigris() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::QuatermasterZigris; new quartermaster_zigris(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp index 083f8f2ba1e..f08b36ad511 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_rend_blackhand.cpp @@ -23,6 +23,8 @@ #include "Player.h" #include "ScriptedCreature.h" +namespace BlackrockSpire::RendBlackhand +{ enum Spells { SPELL_WHIRLWIND = 13736, // sniffed @@ -457,8 +459,11 @@ class boss_rend_blackhand : public CreatureScript return GetBlackrockSpireAI(creature); } }; +} void AddSC_boss_rend_blackhand() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::RendBlackhand; new boss_rend_blackhand(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp index a988aa67af2..283b72afa16 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_shadow_hunter_voshgajin.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::ShadowHunterVoshgajin +{ enum Spells { SPELL_CURSEOFBLOOD = 24673, @@ -103,8 +105,11 @@ class boss_shadow_hunter_voshgajin : public CreatureScript }; }; +} void AddSC_boss_shadowvosh() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::ShadowHunterVoshgajin; new boss_shadow_hunter_voshgajin(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp index 4ac137528dd..7f6f8db8cb1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_the_beast.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::TheBeast +{ enum Spells { SPELL_FLAMEBREAK = 16785, @@ -101,8 +103,11 @@ class boss_the_beast : public CreatureScript } }; }; +} void AddSC_boss_thebeast() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::TheBeast; new boss_the_beast(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp index 5898d1a2be5..c42f854d465 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_urok_doomhowl.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::UrokDoomhowl +{ enum Spells { SPELL_REND = 16509, @@ -104,8 +106,11 @@ class boss_urok_doomhowl : public CreatureScript return new boss_urok_doomhowlAI(creature); } }; +} void AddSC_boss_urok_doomhowl() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::UrokDoomhowl; new boss_urok_doomhowl(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp index 0c7d288a1a3..2f54ba2344c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/boss_warmaster_voone.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "blackrock_spire.h" +namespace BlackrockSpire::WarmasterVoone +{ enum Spells { SPELL_SNAPKICK = 15618, @@ -121,8 +123,11 @@ class boss_warmaster_voone : public CreatureScript return new boss_warmastervooneAI(creature); } }; +} void AddSC_boss_warmastervoone() { + using namespace BlackrockSpire; + using namespace BlackrockSpire::WarmasterVoone; new boss_warmaster_voone(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp index c13d0d107ac..924a4e9d96c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackrockSpire/instance_blackrock_spire.cpp @@ -24,6 +24,8 @@ #include "Player.h" #include "ScriptedCreature.h" +namespace BlackrockSpire +{ //uint32 const DragonspireRunes[7] = { GO_HALL_RUNE_1, GO_HALL_RUNE_2, GO_HALL_RUNE_3, GO_HALL_RUNE_4, GO_HALL_RUNE_5, GO_HALL_RUNE_6, GO_HALL_RUNE_7 }; uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN }; @@ -589,9 +591,11 @@ class at_nearby_scarshield_infiltrator : public AreaTriggerScript return false; } }; +} void AddSC_instance_blackrock_spire() { + using namespace BlackrockSpire; new instance_blackrock_spire(); new at_dragonspire_hall(); new at_blackrock_stadium(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.cpp index 1826f685426..8835443177c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.cpp @@ -31,6 +31,8 @@ #include "InstanceScript.h" #include "blackwing_descent.h" +namespace BlackwingDescent +{ enum LordVictorNefarius { // Spells @@ -681,9 +683,11 @@ class at_bwd_intro: public OnlyOnceAreaTriggerScript return true; } }; +} void AddSC_blackwing_descent() { + using namespace BlackwingDescent; RegisterBlackwingDescentCreatureAI(npc_bwd_lord_victor_nefarius); RegisterBlackwingDescentCreatureAI(npc_bwd_drakonid_chainwielder); RegisterBlackwingDescentCreatureAI(npc_bwd_dwarven_spirit); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h index fbe5d6e1fe6..bbaa71629d2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/blackwing_descent.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace BlackwingDescent +{ #define DataHeader "BWD" #define BWDScriptName "instance_blackwing_descent" @@ -231,5 +233,6 @@ inline AI* GetBlackwingDescentAI(T* obj) } #define RegisterBlackwingDescentCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBlackwingDescentAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp index 3754b1cf75a..17914687fd5 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_atramedes.cpp @@ -32,6 +32,8 @@ #include "TemporarySummon.h" #include "blackwing_descent.h" +namespace BlackwingDescent::Atramedes +{ enum Spells { // Atramedes @@ -1110,9 +1112,12 @@ class spell_atramedes_apply_vehicle_periodic : public AuraScript AfterEffectApply.Register(&spell_atramedes_apply_vehicle_periodic::AfterApply, EFFECT_0, SPELL_AURA_SET_VEHICLE_ID, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_atramedes() { + using namespace BlackwingDescent; + using namespace BlackwingDescent::Atramedes; RegisterBlackwingDescentCreatureAI(boss_atramedes); RegisterBlackwingDescentCreatureAI(npc_atramedes_ancient_dwarven_shield); RegisterBlackwingDescentCreatureAI(npc_atramedes_lord_victor_nefarius); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_chimaeron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_chimaeron.cpp index 9da17f32d1e..ad0f846ce3c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_chimaeron.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_chimaeron.cpp @@ -28,6 +28,8 @@ #include "Map.h" #include "blackwing_descent.h" +namespace BlackwingDescent::Chimaeron +{ enum Spells { // Chimaeron @@ -681,9 +683,12 @@ class spell_chimaeron_shadow_whip : public SpellScript OnEffectHitTarget.Register(&spell_chimaeron_shadow_whip::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY); } }; +} void AddSC_boss_chimaeron() { + using namespace BlackwingDescent; + using namespace BlackwingDescent::Chimaeron; RegisterBlackwingDescentCreatureAI(boss_chimaeron); RegisterBlackwingDescentCreatureAI(npc_chimaeron_finkle_einhorn); RegisterBlackwingDescentCreatureAI(npc_chimaeron_bile_o_tron); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp index 0b9daf7ca3d..c18eeb61567 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_magmaw.cpp @@ -29,6 +29,8 @@ #include "Map.h" #include "blackwing_descent.h" +namespace BlackwingDescent::Magmaw +{ enum Spells { // Magmaw @@ -1260,10 +1262,12 @@ class spell_magmaw_captured : public AuraScript OnEffectPeriodic.Register(&spell_magmaw_captured::HandleTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY); } }; - +} void AddSC_boss_magmaw() { + using namespace BlackwingDescent; + using namespace BlackwingDescent::Magmaw; RegisterBlackwingDescentCreatureAI(boss_magmaw); RegisterBlackwingDescentCreatureAI(npc_magmaw_nefarian); RegisterBlackwingDescentCreatureAI(npc_magmaw_lava_parasite); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp index 1781f972a0f..d2eee969ea3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_maloriak.cpp @@ -31,6 +31,8 @@ #include "SpellScript.h" #include "TemporarySummon.h" +namespace BlackwingDescent::Maloriak +{ enum Spells { // Maloriak @@ -1264,9 +1266,12 @@ class spell_maloriak_master_adventurer_award : public AuraScript AfterEffectRemove.Register(&spell_maloriak_master_adventurer_award::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_maloriak() { + using namespace BlackwingDescent; + using namespace BlackwingDescent::Maloriak; RegisterBlackwingDescentCreatureAI(boss_maloriak); RegisterBlackwingDescentCreatureAI(npc_maloriak_flash_freeze); RegisterBlackwingDescentCreatureAI(npc_maloriak_experiment); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_nefarians_end.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_nefarians_end.cpp index cc29b346577..fdbdc9341a1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_nefarians_end.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_nefarians_end.cpp @@ -37,6 +37,8 @@ #include "ObjectAccessor.h" #include "blackwing_descent.h" +namespace BlackwingDescent::NefariansEnd +{ enum Spells { // Nefarian @@ -2064,9 +2066,12 @@ struct go_nefarians_end_orb_of_culmination : public GameObjectAI private: InstanceScript* _instance; }; +} void AddSC_boss_nefarians_end() { + using namespace BlackwingDescent; + using namespace BlackwingDescent::NefariansEnd; RegisterBlackwingDescentCreatureAI(boss_nefarians_end); RegisterBlackwingDescentCreatureAI(npc_nefarians_end_onyxia); RegisterBlackwingDescentCreatureAI(npc_nefarians_end_lord_victor_nefarius); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp index 124489555b6..e0ae3c768ad 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/boss_omnotron_defense_system.cpp @@ -30,6 +30,8 @@ #include "TemporarySummon.h" #include "blackwing_descent.h" +namespace BlackwingDescent::OmnotronDefenseSystem +{ enum Spells { // Omnotron @@ -1557,9 +1559,12 @@ class spell_omnotron_flamethrower : public SpellScript OnObjectAreaTargetSelect.Register(&spell_omnotron_flamethrower::FilterTargets, EFFECT_0, TARGET_UNIT_CONE_CASTER_TO_DEST_ENEMY); } }; +} void AddSC_boss_omnotron_defense_system() { + using namespace BlackwingDescent; + using namespace BlackwingDescent::OmnotronDefenseSystem; RegisterBlackwingDescentCreatureAI(boss_omnotron_defense_system); RegisterBlackwingDescentCreatureAI(npc_omnotron_electron); RegisterBlackwingDescentCreatureAI(npc_omnotron_magmatron); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp index 45d86b2d365..61e6d3a0c7f 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingDescent/instance_blackwing_descent.cpp @@ -26,6 +26,8 @@ #include "TemporarySummon.h" #include "blackwing_descent.h" +namespace BlackwingDescent +{ ObjectData const creatureData[] = { { BOSS_MAGMAW, DATA_MAGMAW }, @@ -534,8 +536,10 @@ class instance_blackwing_descent : public InstanceMapScript return new instance_blackwing_descent_InstanceMapScript(map); } }; +} void AddSC_instance_blackwing_descent() { + using namespace BlackwingDescent; new instance_blackwing_descent(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h index b2b800ddcd9..e5a6be6170d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/blackwing_lair.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace BlackwingLair +{ uint32 const EncounterCount = 8; #define BRLScriptName "instance_blackwing_lair" @@ -87,5 +89,6 @@ inline AI* GetBlackwingLairAI(T* obj) { return GetInstanceAI(obj, BRLScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp index 10f14420fa3..290703251c4 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -19,6 +19,8 @@ #include "blackwing_lair.h" #include "ScriptedCreature.h" +namespace BlackwingLair::BroodlordLashlayer +{ enum Say { SAY_AGGRO = 0, @@ -112,8 +114,11 @@ class boss_broodlord : public CreatureScript return GetBlackwingLairAI(creature); } }; +} void AddSC_boss_broodlord() { + using namespace BlackwingLair; + using namespace BlackwingLair::BroodlordLashlayer; new boss_broodlord(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp index 94fc469078f..05ef00baf66 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_chromaggus.cpp @@ -21,6 +21,8 @@ #include "Player.h" #include "ScriptedCreature.h" +namespace BlackwingLair::Chromaggus +{ enum Emotes { EMOTE_FRENZY = 0, @@ -293,8 +295,11 @@ class boss_chromaggus : public CreatureScript return GetBlackwingLairAI(creature); } }; +} void AddSC_boss_chromaggus() { + using namespace BlackwingLair; + using namespace BlackwingLair::Chromaggus; new boss_chromaggus(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp index d612fcae287..ac9c1c7c9c0 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_ebonroc.cpp @@ -19,6 +19,8 @@ #include "blackwing_lair.h" #include "ScriptedCreature.h" +namespace BlackwingLair::Ebonroc +{ enum Spells { SPELL_SHADOWFLAME = 22539, @@ -92,8 +94,11 @@ class boss_ebonroc : public CreatureScript return GetBlackwingLairAI(creature); } }; +} void AddSC_boss_ebonroc() { + using namespace BlackwingLair; + using namespace BlackwingLair::Ebonroc; new boss_ebonroc(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp index 1c942f80b0f..5616af05c40 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_firemaw.cpp @@ -19,6 +19,8 @@ #include "blackwing_lair.h" #include "ScriptedCreature.h" +namespace BlackwingLair::Firemaw +{ enum Spells { SPELL_SHADOWFLAME = 22539, @@ -94,8 +96,11 @@ class boss_firemaw : public CreatureScript return GetBlackwingLairAI(creature); } }; +} void AddSC_boss_firemaw() { + using namespace BlackwingLair; + using namespace BlackwingLair::Firemaw; new boss_firemaw(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp index ee34bbaa4c1..d54002a7be2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_flamegor.cpp @@ -19,6 +19,8 @@ #include "blackwing_lair.h" #include "ScriptedCreature.h" +namespace BlackwingLair::Flamegor +{ enum Emotes { EMOTE_FRENZY = 0, @@ -100,8 +102,11 @@ class boss_flamegor : public CreatureScript return GetBlackwingLairAI(creature); } }; +} void AddSC_boss_flamegor() { + using namespace BlackwingLair; + using namespace BlackwingLair::Flamegor; new boss_flamegor(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp index 63d62631da8..30fdc0b3a06 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp @@ -25,6 +25,8 @@ #include "ScriptedGossip.h" #include "TemporarySummon.h" +namespace BlackwingLair::Nefarian +{ enum Events { // Victor Nefarius @@ -600,9 +602,12 @@ class boss_nefarian : public CreatureScript return GetBlackwingLairAI(creature); } }; +} void AddSC_boss_nefarian() { + using namespace BlackwingLair; + using namespace BlackwingLair::Nefarian; new boss_victor_nefarius(); new boss_nefarian(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp index fb69a399d0e..4bf2af1927a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_razorgore.cpp @@ -24,6 +24,8 @@ #include "ScriptedCreature.h" #include "SpellScript.h" +namespace BlackwingLair::Razorgore +{ enum Say { SAY_EGGS_BROKEN1 = 0, @@ -225,9 +227,12 @@ class spell_egg_event : public SpellScriptLoader return new spell_egg_eventSpellScript(); } }; +} void AddSC_boss_razorgore() { + using namespace BlackwingLair; + using namespace BlackwingLair::Razorgore; new boss_razorgore(); new go_orb_of_domination(); new spell_egg_event(); diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp index abf80eed87d..d01f81d5944 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_vaelastrasz.cpp @@ -24,6 +24,8 @@ #include "SpellAuraEffects.h" #include "SpellScript.h" +namespace BlackwingLair::Vaelastrasz +{ enum Says { SAY_LINE1 = 0, @@ -271,9 +273,12 @@ class spell_vael_burning_adrenaline : public SpellScriptLoader return new spell_vael_burning_adrenaline_AuraScript(); } }; +} void AddSC_boss_vaelastrasz() { + using namespace BlackwingLair; + using namespace BlackwingLair::Vaelastrasz; new boss_vaelastrasz(); new spell_vael_burning_adrenaline(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp index 137e83fd404..376c600efe3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/instance_blackwing_lair.cpp @@ -25,6 +25,8 @@ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace BlackwingLair +{ DoorData const doorData[] = { { GO_PORTCULLIS, DATA_RAZORGORE_THE_UNTAMED, DOOR_TYPE_PASSAGE }, @@ -282,8 +284,10 @@ class instance_blackwing_lair : public InstanceMapScript return new instance_blackwing_lair_InstanceMapScript(map); } }; +} void AddSC_instance_blackwing_lair() { + using namespace BlackwingLair; new instance_blackwing_lair(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp index 99d3de715ee..0ce127c5dcc 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_baron_geddon.cpp @@ -29,6 +29,8 @@ EndScriptData */ #include "SpellAuraEffects.h" #include "SpellScript.h" +namespace MoltenCore::BaronGeddon +{ enum Emotes { EMOTE_SERVICE = 0 @@ -149,9 +151,12 @@ class spell_baron_geddon_inferno : public SpellScriptLoader return new spell_baron_geddon_inferno_AuraScript(); } }; +} void AddSC_boss_baron_geddon() { + using namespace MoltenCore; + using namespace MoltenCore::BaronGeddon; new boss_baron_geddon(); new spell_baron_geddon_inferno(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp index 865cdd5a526..a69eebac6fa 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_garr.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "molten_core.h" +namespace MoltenCore::Garr +{ enum Spells { // Garr @@ -162,9 +164,12 @@ class npc_firesworn : public CreatureScript return new npc_fireswornAI(creature); } }; +} void AddSC_boss_garr() { + using namespace MoltenCore; + using namespace MoltenCore::Garr; new boss_garr(); new npc_firesworn(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp index 48cf29d2a60..289c221bec7 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_gehennas.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "molten_core.h" +namespace MoltenCore::Gehenannas +{ enum Spells { SPELL_GEHENNAS_CURSE = 19716, @@ -105,8 +107,11 @@ class boss_gehennas : public CreatureScript return new boss_gehennasAI(creature); } }; +} void AddSC_boss_gehennas() { + using namespace MoltenCore; + using namespace MoltenCore::Gehenannas; new boss_gehennas(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp index 1fc8d4fb766..87eff8dc9c8 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_golemagg.cpp @@ -29,6 +29,8 @@ EndScriptData */ #include "ObjectMgr.h" #include "ScriptedCreature.h" +namespace MoltenCore::Golemagg +{ enum Texts { EMOTE_LOWHP = 0, @@ -190,9 +192,12 @@ class npc_core_rager : public CreatureScript return GetMoltenCoreAI(creature); } }; +} void AddSC_boss_golemagg() { + using namespace MoltenCore; + using namespace MoltenCore::Golemagg; new boss_golemagg(); new npc_core_rager(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp index f3538709f75..14a4b761dec 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_lucifron.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "molten_core.h" +namespace MoltenCore::Lucifron +{ enum Spells { SPELL_IMPENDING_DOOM = 19702, @@ -103,8 +105,11 @@ class boss_lucifron : public CreatureScript return new boss_lucifronAI(creature); } }; +} void AddSC_boss_lucifron() { + using namespace MoltenCore; + using namespace MoltenCore::Lucifron; new boss_lucifron(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp index e77cd44a24d..21d4532ccba 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_magmadar.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "molten_core.h" +namespace MoltenCore::Magmadar +{ enum Texts { EMOTE_FRENZY = 0 @@ -117,8 +119,11 @@ class boss_magmadar : public CreatureScript return new boss_magmadarAI(creature); } }; +} void AddSC_boss_magmadar() { + using namespace MoltenCore; + using namespace MoltenCore::Magmadar; new boss_magmadar(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp index e76294f80f8..1153052d309 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_majordomo_executus.cpp @@ -32,6 +32,8 @@ EndScriptData */ #include "ScriptedGossip.h" #include "MotionMaster.h" +namespace MoltenCore::MajordomoExecutus +{ enum Texts { SAY_AGGRO = 0, @@ -257,8 +259,11 @@ class boss_majordomo : public CreatureScript return GetMoltenCoreAI(creature); } }; +} void AddSC_boss_majordomo() { + using namespace MoltenCore; + using namespace MoltenCore::MajordomoExecutus; new boss_majordomo(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp index c409231c854..9a0c4a0590d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_ragnaros.cpp @@ -29,6 +29,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace MoltenCore::Ragnaros +{ enum Texts { SAY_SUMMON_MAJ = 0, @@ -350,9 +352,12 @@ class npc_son_of_flame : public CreatureScript return GetMoltenCoreAI(creature); } }; +} void AddSC_boss_ragnaros() { + using namespace MoltenCore; + using namespace MoltenCore::Ragnaros; new boss_ragnaros(); new npc_son_of_flame(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp index 20015d023ba..bc2613ea291 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_shazzrah.cpp @@ -20,6 +20,8 @@ #include "ScriptedCreature.h" #include "SpellScript.h" +namespace MoltenCore::Shazzrah +{ enum Spells { SPELL_ARCANE_EXPLOSION = 19712, @@ -164,9 +166,12 @@ class spell_shazzrah_gate_dummy : public SpellScriptLoader return new spell_shazzrah_gate_dummy_SpellScript(); } }; +} void AddSC_boss_shazzrah() { + using namespace MoltenCore; + using namespace MoltenCore::Shazzrah; new boss_shazzrah(); new spell_shazzrah_gate_dummy(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp index f85bb8bd95d..e5dbb34af09 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/boss_sulfuron_harbinger.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "molten_core.h" +namespace MoltenCore::SulfuronHarbinger +{ enum Spells { // Sulfuron Harbringer @@ -213,9 +215,12 @@ class npc_flamewaker_priest : public CreatureScript return new npc_flamewaker_priestAI(creature); } }; +} void AddSC_boss_sulfuron() { + using namespace MoltenCore; + using namespace MoltenCore::SulfuronHarbinger; new boss_sulfuron(); new npc_flamewaker_priest(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp index 74fdd67252b..ebf0c44fb1d 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/instance_molten_core.cpp @@ -24,6 +24,8 @@ #include "molten_core.h" #include "TemporarySummon.h" +namespace MoltenCore +{ Position const MajodoSummonPos = { 737.850f, -1145.35f, -120.288f, 4.71368f }; Position const RagnarosTelePos = { 829.159f, -815.773f, -228.972f, 5.30500f }; Position const RagnarosSummonPos = { 838.510f, -829.840f, -232.000f, 2.00000f }; @@ -169,8 +171,10 @@ class instance_molten_core : public InstanceMapScript return new instance_molten_core_InstanceMapScript(map); } }; +} void AddSC_instance_molten_core() { + using namespace MoltenCore; new instance_molten_core(); } diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h index e8f88b50405..9a4182056c3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/MoltenCore/molten_core.h @@ -22,6 +22,8 @@ struct Position; +namespace MoltenCore +{ #define MCScriptName "instance_molten_core" #define DataHeader "MC" @@ -80,5 +82,6 @@ inline AI* GetMoltenCoreAI(T* obj) { return GetInstanceAI(obj, MCScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_admiral_ripsnarl.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_admiral_ripsnarl.cpp index 7f30567cc72..bbd9a518f53 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_admiral_ripsnarl.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_admiral_ripsnarl.cpp @@ -27,6 +27,8 @@ #include "ObjectAccessor.h" #include "MotionMaster.h" +namespace Deadmines::AdmiralRipsnarl +{ enum Texts { // Admiral Ripsnarl @@ -454,9 +456,12 @@ class spell_ripsnarl_summon_vapor_targeting : public SpellScriptLoader return new spell_ripsnarl_summon_vapor_targeting_SpellScript(); } }; +} void AddSC_boss_admiral_ripsnarl() { + using namespace Deadmines; + using namespace Deadmines::AdmiralRipsnarl; new boss_admiral_ripsnarl(); new npc_ripsnarl_vapor(); new spell_ripsnarl_go_for_the_throat_targeting(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_captain_cookie.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_captain_cookie.cpp index 519dd8f3d30..e47f7dbfa58 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_captain_cookie.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_captain_cookie.cpp @@ -26,6 +26,8 @@ #include "MotionMaster.h" #include "deadmines.h" +namespace Deadmines::CaptainCookie +{ enum Spells { // "Captain" Cookie @@ -345,9 +347,12 @@ class spell_cookie_satiated : public SpellScriptLoader return new spell_cookie_satiated_SpellScript(); } }; +} void AddSC_boss_captain_cookie() { + using namespace Deadmines; + using namespace Deadmines::CaptainCookie; new boss_captain_cookie(); new spell_cookie_throw_food_targeting(); new spell_cookie_satiated(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp index 8e86f98cea4..1779cb5e6ec 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_foe_reaper_5000.cpp @@ -27,6 +27,8 @@ #include "Map.h" #include "deadmines.h" +namespace Deadmines::ForeReaper5000 +{ enum Texts { // Foe Reaper 5000 @@ -571,9 +573,12 @@ class spell_foe_reaper_5000_fixate : public SpellScriptLoader return new spell_foe_reaper_5000_fixate_SpellScript(); } }; +} void AddSC_boss_foe_reaper_5000() { + using namespace Deadmines; + using namespace Deadmines::ForeReaper5000; new boss_foe_reaper_5000(); new npc_foe_reaper_5000_molten_slag(); new spell_foe_reaper_5000_acquire_target(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp index a8d8575fc84..051c6d61ca4 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_glubtok.cpp @@ -28,6 +28,8 @@ #include "MotionMaster.h" #include "deadmines.h" +namespace Deadmines::Glubtok +{ enum Spells { // Glubtok @@ -387,9 +389,12 @@ class spell_glubtok_blossom_targeting : public SpellScript OnEffectHitTarget.Register(&spell_glubtok_blossom_targeting::HandleBlossomEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA); } }; +} void AddSC_boss_glubtok() { + using namespace Deadmines; + using namespace Deadmines::Glubtok; RegisterDeadminesCreatureAI(boss_glubtok); RegisterSpellScript(spell_glubtok_blossom_targeting); } diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_helix_gearbreaker.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_helix_gearbreaker.cpp index 05feeeeafdd..e59f50e264b 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_helix_gearbreaker.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_helix_gearbreaker.cpp @@ -29,6 +29,8 @@ #include "GridNotifiers.h" #include "Map.h" +namespace Deadmines::HelixGearbreaker +{ enum Texts { // Helix Gearbreaker @@ -851,10 +853,12 @@ class spell_helix_ride_vehicle : public AuraScript AfterEffectRemove.Register(&spell_helix_ride_vehicle::AfterRemove, EFFECT_0, SPELL_AURA_CONTROL_VEHICLE, AURA_EFFECT_HANDLE_REAL); } }; - +} void AddSC_boss_helix_gearbreaker() { + using namespace Deadmines; + using namespace Deadmines::HelixGearbreaker; RegisterDeadminesCreatureAI(boss_helix_gearbreaker); RegisterDeadminesCreatureAI(npc_helix_lumbering_oaf); RegisterDeadminesCreatureAI(npc_helix_sticky_bomb); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/boss_vanessa_van_cleef.cpp b/src/server/scripts/EasternKingdoms/Deadmines/boss_vanessa_van_cleef.cpp index 44a92cd44c2..327e9d930bc 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/boss_vanessa_van_cleef.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/boss_vanessa_van_cleef.cpp @@ -27,6 +27,8 @@ #include "ObjectAccessor.h" #include "SpellScript.h" +namespace Deadmines::VanessaVanCleef +{ enum Texts { // Vanessa VanCleef @@ -731,9 +733,12 @@ class spell_vanessa_backslash_targeting : public SpellScriptLoader return new spell_vanessa_backslash_targeting_SpellScript(); } }; +} void AddSC_boss_vanessa_van_cleef() { + using namespace Deadmines; + using namespace Deadmines::VanessaVanCleef; new boss_vanessa_van_cleef(); new npc_vanessa_vanessa_van_cleef(); new npc_vanessa_note_from_vanessa(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index dcf927116d8..9359a9f7253 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -30,6 +30,8 @@ #include "SpellScript.h" #include "SpellInfo.h" +namespace Deadmines +{ enum DefiasWatcher { SPELL_ON_FIRE = 91737, @@ -655,9 +657,11 @@ class spell_deadmines_bloodbath : public SpellScriptLoader return new spell_deadmines_bloodbath_AuraScript(); } }; +} void AddSC_deadmines() { + using namespace Deadmines; RegisterDeadminesCreatureAI(npc_deadmines_defias_watcher); new npc_deadmines_vanessas_trap_bunny(); new npc_deadmines_steam_valve(); diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h index a183b8c40dd..0c01ea5b1ea 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.h @@ -21,6 +21,8 @@ #include "CreatureAIImpl.h" #include "Position.h" +namespace Deadmines +{ #define DataHeader "DM" #define DMScriptName "instance_deadmines" @@ -551,6 +553,7 @@ AI* GetDeadminesAI(GameObject* go) } #define RegisterDeadminesCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetDeadminesAI) +} // DEADMINES_H_ #endif diff --git a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp index 014b7f2a7ac..c254dc6507a 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/instance_deadmines.cpp @@ -27,6 +27,8 @@ #include "Player.h" #include "CreatureAIImpl.h" +namespace Deadmines +{ enum EventIds { EVENT_SPAWN_GOBLIN_EVENT = 1, @@ -928,8 +930,10 @@ class instance_deadmines : public InstanceMapScript return new instance_deadmines_InstanceMapScript(map); } }; +} void AddSC_instance_deadmines() { + using namespace Deadmines; new instance_deadmines(); } diff --git a/src/server/scripts/EasternKingdoms/Gilneas/gilneas.h b/src/server/scripts/EasternKingdoms/Gilneas/gilneas.h index ef204ca8f08..2a43481d251 100644 --- a/src/server/scripts/EasternKingdoms/Gilneas/gilneas.h +++ b/src/server/scripts/EasternKingdoms/Gilneas/gilneas.h @@ -20,6 +20,8 @@ #include "Position.h" +namespace Gilneas +{ /*###### ## Quest 14154 - By the Skin of his Teeth ######*/ @@ -304,5 +306,6 @@ Position const greymanesHorsePath2[] = { -1771.557f, 1423.011f, 19.98499f }, { -1770.955f, 1430.332f, 19.83506f } }; +} #endif // GILNEAS_M_ diff --git a/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_1.cpp b/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_1.cpp index 217497bd097..16ff1a145b3 100644 --- a/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_1.cpp +++ b/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_1.cpp @@ -29,6 +29,9 @@ #include "TemporarySummon.h" #include "Vehicle.h" +namespace Gilneas::Chapter1 +{ + /*###### ## Quest 14098 - Evacuate the Merchant Square ######*/ @@ -665,9 +668,11 @@ struct npc_gilnean_crow : public PassiveAI private: EventMap _events; }; +} void AddSC_gilneas_chapter_1() { + using namespace Gilneas::Chapter1; RegisterCreatureAI(npc_frightened_citizen); RegisterCreatureAI(npc_worgen_runt); RegisterCreatureAI(npc_josiah_avery); diff --git a/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_2.cpp b/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_2.cpp index 63e35fac033..8a20961dcda 100644 --- a/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_2.cpp +++ b/src/server/scripts/EasternKingdoms/Gilneas/gilneas_chapter_2.cpp @@ -32,6 +32,8 @@ #include "GameObjectAI.h" #include "GameObject.h" +namespace Gilneas::Chapter2 +{ enum GilneasInvasionCamera { CINEMATIC_FORSAKEN_INVASION = 168 @@ -695,9 +697,11 @@ class at_gasping_for_breath : public AreaTriggerScript return true; } }; +} void AddSC_gilneas_chapter_2() { + using namespace Gilneas::Chapter2; RegisterGameObjectAI(go_gilneas_invasion_camera); RegisterCreatureAI(npc_gilneas_horrid_abomination); RegisterCreatureAI(npc_gilneas_save_the_children); diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp index 4d111421574..83659bd90b0 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.cpp @@ -34,6 +34,8 @@ Script Data End */ #include "SpellScript.h" #include "TemporarySummon.h" +namespace Gnomeregan +{ enum BlastmasterEmi { SAY_BLASTMASTER_0 = 0, @@ -579,9 +581,11 @@ class spell_collecting_fallout : public SpellScriptLoader return new spell_collecting_fallout_SpellScript(); } }; +} void AddSC_gnomeregan() { + using namespace Gnomeregan; new npc_blastmaster_emi_shortfuse(); new boss_grubbis(); diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h index 2b349789d97..673827adba3 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/gnomeregan.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace Gnomeregan +{ #define GNOScriptName "instance_gnomeregan" #define DataHeader "GNO" @@ -55,5 +57,6 @@ inline AI* GetGnomereganAI(T* obj) { return GetInstanceAI(obj, GNOScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp index 93ceff2e180..6cc09cd86de 100644 --- a/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp +++ b/src/server/scripts/EasternKingdoms/Gnomeregan/instance_gnomeregan.cpp @@ -24,6 +24,8 @@ #include "Map.h" #include "Player.h" +namespace Gnomeregan +{ #define MAX_ENCOUNTER 1 class instance_gnomeregan : public InstanceMapScript @@ -132,8 +134,10 @@ class instance_gnomeregan : public InstanceMapScript return new instance_gnomeregan_InstanceMapScript(map); } }; +} void AddSC_instance_gnomeregan() { + using namespace Gnomeregan; new instance_gnomeregan(); } diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/boss_drahga_shadowburner.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/boss_drahga_shadowburner.cpp index 80d0b54a9ce..ae8ade54856 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/boss_drahga_shadowburner.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/boss_drahga_shadowburner.cpp @@ -27,6 +27,8 @@ #include "TemporarySummon.h" #include "grim_batol.h" +namespace GrimBatol::DrahgaShadowburner +{ enum Spells { // Drahga @@ -539,9 +541,12 @@ class spell_drahga_devouring_flames : public SpellScript OnHit.Register(&spell_drahga_devouring_flames::ChangeDamage); } }; +} void AddSC_boss_drahga_shadowburner() { + using namespace GrimBatol; + using namespace GrimBatol::DrahgaShadowburner; RegisterGrimBatolCreatureAI(boss_drahga_shadowburner); RegisterGrimBatolCreatureAI(npc_drahga_valiona); RegisterGrimBatolCreatureAI(npc_drahga_invoked_flaming_spirit); diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/boss_erudax.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/boss_erudax.cpp index d5354236d94..f532a8383e7 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/boss_erudax.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/boss_erudax.cpp @@ -28,6 +28,8 @@ #include "Spell.h" #include "Map.h" +namespace GrimBatol::Erudax +{ enum Spells { // Erudax @@ -525,9 +527,12 @@ class spell_erudax_twilight_corruption_AuraScript : public AuraScript OnEffectRemove.Register(&spell_erudax_twilight_corruption_AuraScript::OnAuraRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_erudax() { + using namespace GrimBatol; + using namespace GrimBatol::Erudax; RegisterGrimBatolCreatureAI(boss_erudax); RegisterGrimBatolCreatureAI(npc_erudax_faceless_corruptor); RegisterSpellScript(spell_erudax_shadow_gale_trigger); diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/boss_forgemaster_throngus.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/boss_forgemaster_throngus.cpp index fc75afde6a1..c453395a2e2 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/boss_forgemaster_throngus.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/boss_forgemaster_throngus.cpp @@ -26,6 +26,8 @@ #include "Map.h" #include "grim_batol.h" +namespace GrimBatol::ForgemasterThrongus +{ enum Spells { // Forgemaster Throngus @@ -465,9 +467,12 @@ class spell_throngus_impaling_slam : public AuraScript AfterEffectRemove.Register(&spell_throngus_impaling_slam::AfterRemove, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_forgemaster_throngus() { + using namespace GrimBatol; + using namespace GrimBatol::ForgemasterThrongus; RegisterGrimBatolCreatureAI(boss_forgemaster_throngus); RegisterSpellScript(spell_throngus_mighty_stomp); RegisterSpellScript(spell_throngus_pick_weapon); diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp index 20e8145bae3..b92b6e05dfc 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/boss_general_umbriss.cpp @@ -25,6 +25,8 @@ #include "MotionMaster.h" #include "grim_batol.h" +namespace GrimBatol::GeneralUmbriss +{ enum Spells { // General Umbriss @@ -364,9 +366,12 @@ class spell_umbriss_bleeding_wound : public AuraScript OnEffectPeriodic.Register(&spell_umbriss_bleeding_wound::HandleRemoval, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE); } }; +} void AddSC_boss_general_umbriss() { + using namespace GrimBatol; + using namespace GrimBatol::GeneralUmbriss; RegisterGrimBatolCreatureAI(boss_general_umbriss); RegisterGrimBatolCreatureAI(npc_umbriss_skardyn); RegisterSpellScript(spell_umbriss_summon_blitz_trigger); diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.cpp index aa6432e2c51..02b8aecefa4 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.cpp @@ -27,6 +27,8 @@ #include "ObjectAccessor.h" #include "grim_batol.h" +namespace GrimBatol +{ enum TwilightBeguiler { // Events @@ -287,9 +289,11 @@ class spell_grim_batol_engulfing_flames : public SpellScript OnEffectHitTarget.Register(&spell_grim_batol_engulfing_flames::HandleEffect, EFFECT_1, SPELL_EFFECT_DUMMY); } }; +} void AddSC_grim_batol() { + using namespace GrimBatol; RegisterGrimBatolCreatureAI(npc_grim_batol_twilight_beguiler); RegisterGrimBatolCreatureAI(npc_grim_batol_battered_red_drake); RegisterSpellScript(spell_grim_batol_engulfing_flames); diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h b/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h index fa2763a0e7e..3395e11936d 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h +++ b/src/server/scripts/EasternKingdoms/GrimBatol/grim_batol.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace GrimBatol +{ #define GBScriptName "instance_grim_batol" #define DataHeader "GB" @@ -104,5 +106,6 @@ AI* GetGrimBatolAI(T* creature) } #define RegisterGrimBatolCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetGrimBatolAI) +} #endif // GRIM_BATOL_H_ diff --git a/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.cpp b/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.cpp index 19de26c6f37..956ed541419 100644 --- a/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.cpp +++ b/src/server/scripts/EasternKingdoms/GrimBatol/instance_grim_batol.cpp @@ -23,6 +23,8 @@ #include "Map.h" #include "CreatureAI.h" +namespace GrimBatol +{ ObjectData const creatureData[] = { { BOSS_GENERAL_UMBRISS, DATA_GENERAL_UMBRISS }, @@ -242,8 +244,10 @@ class instance_grim_batol : public InstanceMapScript return new instance_grim_batol_InstanceMapScript(map); } }; +} void AddSC_instance_grim_batol() { + using namespace GrimBatol; new instance_grim_batol(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp index 343b7d7004f..991aae2d6f4 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_curator.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "karazhan.h" +namespace Karazhan::Curator +{ enum CuratorSays { SAY_AGGRO = 0, @@ -183,9 +185,12 @@ class npc_curator_astral_flare : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_curator() { + using namespace Karazhan; + using namespace Karazhan::Curator; new boss_curator(); new npc_curator_astral_flare(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp index 19df70fec9b..fa2d0766555 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_maiden_of_virtue.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "karazhan.h" +namespace Karazhan::MaidenOfVirtue +{ enum Spells { SPELL_REPENTANCE = 29511, @@ -126,8 +128,11 @@ class boss_maiden_of_virtue : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_maiden_of_virtue() { + using namespace Karazhan; + using namespace Karazhan::MaidenOfVirtue; new boss_maiden_of_virtue(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index d9cc4b25dbf..c05fd72ea2e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -29,6 +29,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "SpellInfo.h" +namespace Karazhan::Midnight +{ enum Texts { SAY_KILL = 0, @@ -381,9 +383,12 @@ class boss_midnight : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_attumen() { + using namespace Karazhan; + using namespace Karazhan::Midnight; new boss_attumen(); new boss_midnight(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index 0f67467af6d..e8f23f7df29 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -29,6 +29,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace Karazhan::Moroes +{ enum Yells { SAY_AGGRO = 0, @@ -799,9 +801,12 @@ class boss_lord_crispin_ference : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_moroes() { + using namespace Karazhan; + using namespace Karazhan::Moroes; new boss_moroes(); new boss_baroness_dorothea_millstipe(); new boss_baron_rafe_dreuger(); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp index fde953ab865..eda06fc3daa 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_netherspite.cpp @@ -32,6 +32,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace Karazhan::Netherspite +{ enum Netherspite { EMOTE_PHASE_PORTAL = 0, @@ -345,8 +347,11 @@ class boss_netherspite : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_netherspite() { + using namespace Karazhan; + using namespace Karazhan::Netherspite; new boss_netherspite(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp index 85c859936ba..1043f766f24 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp @@ -26,6 +26,8 @@ #include "SpellAuraEffects.h" #include "SpellScript.h" +namespace Karazhan::Nightbane +{ enum NightbaneSpells { SPELL_BELLOWING_ROAR = 36922, @@ -448,9 +450,12 @@ class go_blackened_urn : public GameObjectScript return GetKarazhanAI(go); } }; +} void AddSC_boss_nightbane() { + using namespace Karazhan; + using namespace Karazhan::Nightbane; new boss_nightbane(); new spell_rain_of_bones(); new go_blackened_urn(); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index a4ee76ddb73..feb15cafa56 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -31,6 +31,8 @@ EndScriptData */ #include "SpellMgr.h" #include "TemporarySummon.h" +namespace Karazhan::PrinceMalchezaar +{ // 18 Coordinates for Infernal spawns struct InfernalPoint { @@ -593,9 +595,12 @@ void netherspite_infernal::netherspite_infernalAI::Cleanup() if (pMalchezaar && pMalchezaar->IsAlive()) ENSURE_AI(boss_malchezaar::boss_malchezaarAI, pMalchezaar->AI())->Cleanup(me, point); } +} void AddSC_boss_malchezaar() { + using namespace Karazhan; + using namespace Karazhan::PrinceMalchezaar; new boss_malchezaar(); new netherspite_infernal(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp index 81d16b0a5b9..dd82c39da83 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_shade_of_aran.cpp @@ -31,6 +31,8 @@ EndScriptData */ #include "SpellInfo.h" #include "TemporarySummon.h" +namespace Karazhan::ShadeOfAran +{ enum ShadeOfAran { SAY_AGGRO = 0, @@ -546,9 +548,12 @@ class npc_aran_elemental : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_shade_of_aran() { + using namespace Karazhan; + using namespace Karazhan::ShadeOfAran; new boss_shade_of_aran(); new npc_aran_elemental(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp index 4c69217676f..29c36eeba8c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_terestian_illhoof.cpp @@ -22,6 +22,8 @@ #include "ScriptedCreature.h" #include "SpellInfo.h" +namespace Karazhan::TerestianIllhoof +{ enum TerestianSays { SAY_SLAY = 0, @@ -318,9 +320,12 @@ class npc_fiendish_imp : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_boss_terestian_illhoof() { + using namespace Karazhan; + using namespace Karazhan::TerestianIllhoof; new boss_terestian_illhoof(); new npc_kilrek(); new npc_demon_chain(); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index bb63899744b..9a70e0f8f3e 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -34,6 +34,8 @@ EndScriptData */ #include "SpellInfo.h" #include "TemporarySummon.h" +namespace Karazhan::Opera +{ /***********************************/ /*** OPERA WIZARD OF OZ EVENT *****/ /*********************************/ @@ -1546,9 +1548,12 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32 &dama } TC_LOG_ERROR("scripts", "boss_julianneAI: DamageTaken reach end of code, that should not happen."); } +} void AddSC_bosses_opera() { + using namespace Karazhan; + using namespace Karazhan::Opera; new boss_dorothee(); new boss_strawman(); new boss_tinhead(); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 9c134f98c7b..669fe607b17 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -30,6 +30,8 @@ EndScriptData */ #include "Map.h" #include "Random.h" +namespace Karazhan +{ /* 0 - Attumen + Midnight (optional) 1 - Moroes @@ -330,8 +332,10 @@ class instance_karazhan : public InstanceMapScript ObjectGuid BlackenedUrnGUID; }; }; +} void AddSC_instance_karazhan() { + using namespace Karazhan; new instance_karazhan(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 079fd0e6658..e4d47aa68fd 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -39,6 +39,8 @@ EndContentData */ #include "ScriptedGossip.h" #include "TemporarySummon.h" +namespace Karazhan +{ enum Spells { // Barnes @@ -624,9 +626,11 @@ class npc_image_of_medivh : public CreatureScript return GetKarazhanAI(creature); } }; +} void AddSC_karazhan() { + using namespace Karazhan; new npc_barnes(); new npc_image_of_medivh(); } diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h index a25d09e5ba4..575c741d03d 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace Karazhan +{ #define KZScriptName "instance_karazhan" #define DataHeader "KZ" @@ -117,5 +119,6 @@ inline AI* GetKarazhanAI(T* obj) { return GetInstanceAI(obj, KZScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp index d65db685e14..8cbb37fe4ed 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_felblood_kaelthas.cpp @@ -27,6 +27,8 @@ #include "SpellInfo.h" #include "TemporarySummon.h" +namespace MagistersTerrace::FelbloodKaelthas +{ enum Says { // Kael'thas Sunstrider @@ -503,9 +505,12 @@ class spell_felblood_kaelthas_flame_strike : public AuraScript AfterEffectRemove.Register(&spell_felblood_kaelthas_flame_strike::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_felblood_kaelthas() { + using namespace MagistersTerrace; + using namespace MagistersTerrace::FelbloodKaelthas; RegisterMagistersTerraceCreatureAI(boss_felblood_kaelthas); RegisterMagistersTerraceCreatureAI(npc_felblood_kaelthas_phoenix); RegisterSpellScript(spell_felblood_kaelthas_flame_strike); diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp index b22e9677b69..14c9597c541 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp @@ -29,6 +29,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace MagistersTerrace::PriestessDelrissa +{ struct Speech { int32 id; @@ -1327,9 +1329,12 @@ class npc_high_explosive_sheep : public CreatureScript //}; }; */ +} void AddSC_boss_priestess_delrissa() { + using namespace MagistersTerrace; + using namespace MagistersTerrace::PriestessDelrissa; new boss_priestess_delrissa(); new boss_kagani_nightstrike(); new boss_ellris_duskhallow(); diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp index 1389e2cdeb5..3a28c8c4da6 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_selin_fireheart.cpp @@ -22,6 +22,8 @@ #include "ObjectAccessor.h" #include "ScriptedCreature.h" +namespace MagistersTerrace::SelinFireheart +{ enum Says { SAY_AGGRO = 0, @@ -279,9 +281,12 @@ class npc_fel_crystal : public CreatureScript return GetMagistersTerraceAI(creature); }; }; +} void AddSC_boss_selin_fireheart() { + using namespace MagistersTerrace; + using namespace MagistersTerrace::SelinFireheart; new boss_selin_fireheart(); new npc_fel_crystal(); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp index f03c23bc81f..f25c05430a0 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_vexallus.cpp @@ -20,6 +20,8 @@ #include "MotionMaster.h" #include "ScriptedCreature.h" +namespace MagistersTerrace::Vexallus +{ enum Yells { SAY_AGGRO = 0, @@ -214,9 +216,12 @@ class npc_pure_energy : public CreatureScript return GetMagistersTerraceAI(creature); }; }; +} void AddSC_boss_vexallus() { + using namespace MagistersTerrace; + using namespace MagistersTerrace::Vexallus; new boss_vexallus(); new npc_pure_energy(); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp index 509c7845335..12b711b6e7c 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/instance_magisters_terrace.cpp @@ -26,6 +26,9 @@ #include "ObjectAccessor.h" #include "TemporarySummon.h" +namespace MagistersTerrace +{ + /* 0 - Selin Fireheart 1 - Vexallus @@ -227,8 +230,10 @@ class instance_magisters_terrace : public InstanceMapScript return new instance_magisters_terrace_InstanceMapScript(map); } }; +} void AddSC_instance_magisters_terrace() { + using namespace MagistersTerrace; new instance_magisters_terrace(); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp index 3b1f23ee0a0..0c922e69f39 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.cpp @@ -33,6 +33,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" +namespace MagistersTerrace +{ /*###### ## npc_kalecgos ######*/ @@ -204,9 +206,11 @@ struct npc_mgt_shattered_sun_sentry : public ScriptedAI me->GetMotionMaster()->MovePoint(POINT_ID_PREPARE_SPLINE_PATH, ShatteredSunSentryWaypoint1); } }; +} void AddSC_magisters_terrace() { + using namespace MagistersTerrace; new npc_kalecgos(); RegisterMagistersTerraceCreatureAI(npc_mgt_shattered_sun_sentry); } diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h index 63041a51618..1fa02c84db0 100644 --- a/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h +++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/magisters_terrace.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace MagistersTerrace +{ #define MGTScriptName "instance_magisters_terrace" #define DataHeader "MT" @@ -103,5 +105,6 @@ inline AI* GetMagistersTerraceAI(T* obj) } #define RegisterMagistersTerraceCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetMagistersTerraceAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_1.cpp index 959e072d13d..d0cbd03095f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_1.cpp @@ -37,6 +37,8 @@ ##Quest 12848 ######*/ +namespace TheScarletEnclave::Chapter1 +{ #define GCD_CAST 1 enum UnworthyInitiate @@ -1065,9 +1067,11 @@ class spell_gift_of_the_harvester : public SpellScript OnEffectHitTarget.Register(&spell_gift_of_the_harvester::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; +} void AddSC_the_scarlet_enclave_chapter_1() { + using namespace TheScarletEnclave::Chapter1; new npc_unworthy_initiate(); new npc_unworthy_initiate_anchor(); new go_acherus_soul_prison(); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_2.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_2.cpp index 102c3f37cbc..bf7d212460d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_2.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_2.cpp @@ -24,6 +24,8 @@ #include "ScriptedEscortAI.h" #include "SpellInfo.h" +namespace TheScarletEnclave::Chapter2 +{ /*###### ## npc_koltira_deathweaver ######*/ @@ -603,9 +605,11 @@ class npc_a_special_surprise : public CreatureScript } }; }; +} void AddSC_the_scarlet_enclave_chapter_2() { + using namespace TheScarletEnclave::Chapter2; new npc_scarlet_courier(); new npc_koltira_deathweaver(); new npc_high_inquisitor_valroth(); diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_5.cpp index ca9d21bed54..7e78f51b28c 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave_chapter_5.cpp @@ -26,6 +26,8 @@ #include "TemporarySummon.h" #include "WorldStateMgr.h" +namespace TheScarletEnclave::Chapter3 +{ #define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell //Light of Dawn enum mograine @@ -1654,9 +1656,11 @@ class npc_the_lich_king_tirion_dawn : public CreatureScript }; }; +} void AddSC_the_scarlet_enclave_chapter_5() { + using namespace TheScarletEnclave::Chapter3; new npc_highlord_darion_mograine(); new npc_the_lich_king_tirion_dawn(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp index 22b7392e78f..b844c0e49ae 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -21,6 +21,9 @@ #include "Player.h" #include "TemporarySummon.h" +namespace TheScarletEnclave +{ + /*#### ## npc_valkyr_battle_maiden ####*/ @@ -136,8 +139,10 @@ class npc_valkyr_battle_maiden : public CreatureScript }; }; +} void AddSC_the_scarlet_enclave() { + using namespace TheScarletEnclave; new npc_valkyr_battle_maiden(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp index e20aa3bfcb5..67c8319ed61 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "scarlet_monastery.h" +namespace ScarletMonastery::ArcanistDoan +{ enum Yells { SAY_AGGRO = 0, @@ -119,9 +121,11 @@ struct boss_arcanist_doan : public BossAI private: bool _detonationTriggered; }; - +} void AddSC_boss_arcanist_doan() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::ArcanistDoan; RegisterScarletMonasteryCreatureAI(boss_arcanist_doan); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp index 1cc0cb3a900..bb41fe85ba8 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp @@ -19,22 +19,24 @@ #include "ScriptedCreature.h" #include "scarlet_monastery.h" -enum Spells -{ - SPELL_CALL_OF_THE_GRAVE = 17831, - SPELL_TERRIFY = 7399, - SPELL_SOUL_SIPHON = 7290 -}; - -enum Events -{ - EVENT_CALL_OF_GRAVE = 1, - EVENT_TERRIFY, - EVENT_SOUL_SIPHON -}; - -class boss_azshir_the_sleepless : public CreatureScript +namespace ScarletMonastery::AzshirTheSleepless { + enum Spells + { + SPELL_CALL_OF_THE_GRAVE = 17831, + SPELL_TERRIFY = 7399, + SPELL_SOUL_SIPHON = 7290 + }; + + enum Events + { + EVENT_CALL_OF_GRAVE = 1, + EVENT_TERRIFY, + EVENT_SOUL_SIPHON + }; + + class boss_azshir_the_sleepless : public CreatureScript + { public: boss_azshir_the_sleepless() : CreatureScript("boss_azshir_the_sleepless") { } @@ -87,20 +89,20 @@ class boss_azshir_the_sleepless : public CreatureScript { switch (eventId) { - case EVENT_CALL_OF_GRAVE: - DoCastVictim(SPELL_CALL_OF_THE_GRAVE); - events.ScheduleEvent(EVENT_CALL_OF_GRAVE, 30000); - break; - case EVENT_TERRIFY: - DoCastVictim(SPELL_TERRIFY); - events.ScheduleEvent(EVENT_TERRIFY, 20000); - break; - case EVENT_SOUL_SIPHON: - DoCastVictim(SPELL_SOUL_SIPHON); - events.ScheduleEvent(EVENT_SOUL_SIPHON, 20000); - break; - default: - break; + case EVENT_CALL_OF_GRAVE: + DoCastVictim(SPELL_CALL_OF_THE_GRAVE); + events.ScheduleEvent(EVENT_CALL_OF_GRAVE, 30000); + break; + case EVENT_TERRIFY: + DoCastVictim(SPELL_TERRIFY); + events.ScheduleEvent(EVENT_TERRIFY, 20000); + break; + case EVENT_SOUL_SIPHON: + DoCastVictim(SPELL_SOUL_SIPHON); + events.ScheduleEvent(EVENT_SOUL_SIPHON, 20000); + break; + default: + break; } if (me->HasUnitState(UNIT_STATE_CASTING)) @@ -118,9 +120,12 @@ class boss_azshir_the_sleepless : public CreatureScript { return GetScarletMonasteryAI(creature); } -}; + }; +} void AddSC_boss_azshir_the_sleepless() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::AzshirTheSleepless; new boss_azshir_the_sleepless(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp index bbe56d58b3a..10a93d2bd29 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "scarlet_monastery.h" +namespace ScarletMonastery::BloodmageThalnos +{ enum Yells { SAY_AGGRO = 0, @@ -177,8 +179,11 @@ struct boss_bloodmage_thalnos : public BossAI events.ScheduleEvent(GetNextEventId(), 3s); } }; +} void AddSC_boss_bloodmage_thalnos() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::BloodmageThalnos; RegisterScarletMonasteryCreatureAI(boss_bloodmage_thalnos); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 1f956453301..4d8c15fd9fc 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -38,6 +38,8 @@ EndScriptData */ #include "SpellMgr.h" #include "TemporarySummon.h" +namespace ScarletMonastery::HeadlessHorseman +{ //this texts are already used by 3975 and 3976 enum Says { @@ -940,9 +942,12 @@ void npc_head::npc_headAI::Disappear() } } } +} void AddSC_boss_headless_horseman() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::HeadlessHorseman; new boss_headless_horseman(); new npc_head(); new npc_pulsing_pumpkin(); diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp index bca24fd945b..9ebdf70c84e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedEscortAI.h" #include "scarlet_monastery.h" +namespace ScarletMonastery::Herod +{ enum Says { SAY_AGGRO = 0, @@ -175,9 +177,12 @@ class npc_scarlet_trainee : public CreatureScript } }; }; +} void AddSC_boss_herod() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::Herod; new boss_herod(); new npc_scarlet_trainee(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp index b9950dcf967..ba99219fa96 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "scarlet_monastery.h" #include "ScriptedCreature.h" +namespace ScarletMonastery::HighInquisitorFairbanks +{ enum Spells { SPELL_CURSEOFBLOOD = 8282, @@ -155,8 +157,11 @@ class boss_high_inquisitor_fairbanks : public CreatureScript return GetScarletMonasteryAI(creature); } }; +} void AddSC_boss_high_inquisitor_fairbanks() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::HighInquisitorFairbanks; new boss_high_inquisitor_fairbanks(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp index 7c0e749e993..6ae62ea8e34 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp @@ -21,6 +21,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace ScarletMonastery::HoundmasterLoksey +{ enum Yells { SAY_AGGRO = 0 @@ -94,8 +96,11 @@ struct boss_houndmaster_loksey : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_houndmaster_loksey() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::HoundmasterLoksey; RegisterScarletMonasteryCreatureAI(boss_houndmaster_loksey); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp index 8a98503d136..9985a85fe7b 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp @@ -21,6 +21,8 @@ #include "scarlet_monastery.h" #include "ScriptedCreature.h" +namespace ScarletMonastery::InterrogatorVishas +{ enum Says { SAY_AGGRO = 0, @@ -105,8 +107,11 @@ struct boss_interrogator_vishas : public BossAI private: uint8 _textCount; }; +} void AddSC_boss_interrogator_vishas() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::InterrogatorVishas; RegisterScarletMonasteryCreatureAI(boss_interrogator_vishas); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp index ea50964b88e..1a2324e7d7f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp @@ -25,6 +25,8 @@ #include "Spell.h" #include "SpellInfo.h" +namespace ScarletMonastery::MograineAndWhitemane +{ enum Says { // Scarlet Commander Mograine @@ -409,10 +411,12 @@ struct npc_high_inquisitor_whitemane : public ScriptedAI bool _below50PctHealth; bool _resurrectedMograine; }; - +} void AddSC_boss_mograine_and_whitemane() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::MograineAndWhitemane; RegisterScarletMonasteryCreatureAI(npc_scarlet_commander_mograine); RegisterScarletMonasteryCreatureAI(npc_high_inquisitor_whitemane); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp index ced6858fb9c..a325898f75d 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "scarlet_monastery.h" +namespace ScarletMonastery::Scorn +{ enum Spells { SPELL_LICHSLAP = 28873, @@ -94,8 +96,11 @@ class boss_scorn : public CreatureScript return GetScarletMonasteryAI(creature); } }; +} void AddSC_boss_scorn() { + using namespace ScarletMonastery; + using namespace ScarletMonastery::Scorn; new boss_scorn(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 55f0cfe6e4c..8028d02e0ef 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -23,6 +23,8 @@ #include "Map.h" #include "scarlet_monastery.h" +namespace ScarletMonastery +{ ObjectData const creatureData[] = { { BOSS_INTERROGATOR_VISHAS, DATA_INTERROGATOR_VISHAS }, @@ -206,8 +208,10 @@ class instance_scarlet_monastery : public InstanceMapScript return new instance_scarlet_monastery_InstanceMapScript(map); } }; +} void AddSC_instance_scarlet_monastery() { + using namespace ScarletMonastery; new instance_scarlet_monastery(); } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h index 9859cce402f..be2bb5b723a 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace ScarletMonastery +{ #define SMScriptName "instance_scarlet_monastery" #define DataHeader "SM" @@ -82,6 +84,6 @@ inline AI* GetScarletMonasteryAI(T* obj) } #define RegisterScarletMonasteryCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetScarletMonasteryAI) - +} #endif // SCARLET_M_ diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp index 7161d2c8acd..b6e5d71b20f 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_darkmaster_gandling.cpp @@ -33,6 +33,8 @@ Category: Scholomance #include "SpellScript.h" #include "TemporarySummon.h" +namespace Scholomance::DarkmasterGandling +{ enum Says { YELL_SUMMONED = 0 @@ -377,9 +379,12 @@ class spell_shadow_portal_rooms : public SpellScriptLoader return new spell_shadow_portal_rooms_SpellScript(); } }; +} void AddSC_boss_darkmaster_gandling() { + using namespace Scholomance; + using namespace Scholomance::DarkmasterGandling; new boss_darkmaster_gandling(); new spell_shadow_portal(); new spell_shadow_portal_rooms(); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp index 4a61e82ffff..63f93feaa81 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_death_knight_darkreaver.cpp @@ -25,6 +25,8 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace Scholomance::DeathKnightDarkreaver +{ class boss_death_knight_darkreaver : public CreatureScript { public: @@ -55,8 +57,11 @@ class boss_death_knight_darkreaver : public CreatureScript }; }; +} void AddSC_boss_death_knight_darkreaver() { + using namespace Scholomance; + using namespace Scholomance::DeathKnightDarkreaver; new boss_death_knight_darkreaver(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp index b1fa301d52c..5796bc8714d 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_doctor_theolen_krastinov.cpp @@ -26,6 +26,8 @@ Category: Scholomance #include "ScriptedCreature.h" #include "scholomance.h" +namespace Scholomance::DoctorTheolenKrastinov +{ enum Say { EMOTE_FRENZY_KILL = 0, @@ -106,8 +108,11 @@ class boss_doctor_theolen_krastinov : public CreatureScript } }; +} void AddSC_boss_theolenkrastinov() { + using namespace Scholomance; + using namespace Scholomance::DoctorTheolenKrastinov; new boss_doctor_theolen_krastinov(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp index e92f2cbba7d..1ae38c546d8 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_illucia_barov.cpp @@ -26,6 +26,8 @@ Category: Scholomance #include "ScriptedCreature.h" #include "scholomance.h" +namespace Scholomance::IlluciaBarov +{ enum Spells { SPELL_CURSEOFAGONY = 18671, @@ -107,8 +109,11 @@ class boss_illucia_barov : public CreatureScript return new boss_illuciabarovAI(creature); } }; +} void AddSC_boss_illuciabarov() { + using namespace Scholomance; + using namespace Scholomance::IlluciaBarov; new boss_illucia_barov(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp index a1fb159ef39..3db62db5bdf 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_instructor_malicia.cpp @@ -26,6 +26,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "scholomance.h" +namespace Scholomance::InstructorMalicia +{ enum Spells { SPELL_CALLOFGRAVES = 17831, @@ -152,8 +154,11 @@ class boss_instructor_malicia : public CreatureScript } }; +} void AddSC_boss_instructormalicia() { + using namespace Scholomance; + using namespace Scholomance::InstructorMalicia; new boss_instructor_malicia(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp index b4feff53fbb..d2fd89d6bb1 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_jandice_barov.cpp @@ -19,6 +19,8 @@ #include "scholomance.h" #include "ScriptedCreature.h" +namespace Scholomance::JandiceBarov +{ enum Spells { SPELL_CURSE_OF_BLOOD = 24673, @@ -120,8 +122,11 @@ class boss_jandice_barov : public CreatureScript return GetScholomanceAI(creature); } }; +} void AddSC_boss_jandicebarov() { + using namespace Scholomance; + using namespace Scholomance::JandiceBarov; new boss_jandice_barov(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp index e2595820ff3..315d211b99e 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kirtonos_the_herald.cpp @@ -26,6 +26,8 @@ #include "scholomance.h" #include "ScriptedCreature.h" +namespace Scholomance::KirtonosTheHerald +{ enum Says { EMOTE_SUMMONED = 0 @@ -302,9 +304,12 @@ class go_brazier_of_the_herald : public GameObjectScript return GetScholomanceAI(go); } }; +} void AddSC_boss_kirtonos_the_herald() { + using namespace Scholomance; + using namespace Scholomance::KirtonosTheHerald; new boss_kirtonos_the_herald(); new go_brazier_of_the_herald; } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp index e2a97399857..5a9415b0033 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_kormok.cpp @@ -20,6 +20,8 @@ #include "ScriptedCreature.h" #include "SpellScript.h" +namespace Scholomance::Kormok +{ enum Spells { SPELL_SHADOWBOLT_VOLLEY = 20741, @@ -207,9 +209,12 @@ class spell_kormok_summon_bone_minions : SpellScriptLoader return new spell_kormok_summon_bone_minionsSpellScript(); } }; +} void AddSC_boss_kormok() { + using namespace Scholomance; + using namespace Scholomance::Kormok; new boss_kormok(); new spell_kormok_summon_bone_mages(); new spell_kormok_summon_bone_minions(); diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp index b5cdbb5fd42..5e3e9862ac3 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lord_alexei_barov.cpp @@ -26,6 +26,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "scholomance.h" +namespace Scholomance::LordAlexeiBarov +{ enum Spells { SPELL_IMMOLATE = 20294, @@ -101,8 +103,11 @@ class boss_lord_alexei_barov : public CreatureScript return new boss_lordalexeibarovAI(creature); } }; +} void AddSC_boss_lordalexeibarov() { + using namespace Scholomance; + using namespace Scholomance::LordAlexeiBarov; new boss_lord_alexei_barov(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp index 6d133fd2b82..5a99dbf34b6 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_lorekeeper_polkelt.cpp @@ -26,6 +26,8 @@ Category: Scholomance #include "ScriptedCreature.h" #include "scholomance.h" +namespace Scholomance::LorekeeperPolkelt +{ enum Spells { SPELL_VOLATILEINFECTION = 24928, @@ -106,8 +108,11 @@ class boss_lorekeeper_polkelt : public CreatureScript return new boss_lorekeeperpolkeltAI(creature); } }; +} void AddSC_boss_lorekeeperpolkelt() { + using namespace Scholomance; + using namespace Scholomance::LorekeeperPolkelt; new boss_lorekeeper_polkelt(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp index 7af1e8f56c0..07075c432ab 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_ras_frostwhisper.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace Scholomance::RasFrostWhisper +{ enum Spells { SPELL_FROSTBOLT = 21369, @@ -121,8 +123,11 @@ class boss_boss_ras_frostwhisper : public CreatureScript return new boss_rasfrostAI(creature); } }; +} void AddSC_boss_rasfrost() { + using namespace Scholomance; + using namespace Scholomance::RasFrostWhisper; new boss_boss_ras_frostwhisper(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp index 29f322c8be0..80a3c14ec6c 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_the_ravenian.cpp @@ -26,6 +26,8 @@ Category: Scholomance #include "ScriptedCreature.h" #include "scholomance.h" +namespace Scholomance::TheRavenian +{ enum Spells { SPELL_TRAMPLE = 15550, @@ -106,8 +108,11 @@ class boss_the_ravenian : public CreatureScript return new boss_theravenianAI(creature); } }; +} void AddSC_boss_theravenian() { + using namespace Scholomance; + using namespace Scholomance::TheRavenian; new boss_the_ravenian(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp index 3f02d23d54f..01d3aa81989 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/boss_vectus.cpp @@ -18,6 +18,8 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace Scholomance::Vectus +{ enum Emotes { EMOTE_FRENZY = 0 @@ -115,8 +117,11 @@ class boss_vectus : public CreatureScript return new boss_vectusAI(creature); } }; +} void AddSC_boss_vectus() { + using namespace Scholomance; + using namespace Scholomance::Vectus; new boss_vectus(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index 1187f4b58e6..6846d791ac2 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/server/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -22,6 +22,8 @@ #include "Player.h" #include "scholomance.h" +namespace Scholomance +{ Position const GandlingLoc = { 180.7712f, -5.428603f, 75.57024f, 1.291544f }; class instance_scholomance : public InstanceMapScript @@ -179,8 +181,10 @@ class instance_scholomance : public InstanceMapScript return new instance_scholomance_InstanceMapScript(map); } }; +} void AddSC_instance_scholomance() { + using namespace Scholomance; new instance_scholomance(); } diff --git a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h index 651f1c26625..2a017f1d077 100644 --- a/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h +++ b/src/server/scripts/EasternKingdoms/Scholomance/scholomance.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace Scholomance +{ #define ScholomanceScriptName "instance_scholomance" #define DataHeader "SC" @@ -61,5 +63,6 @@ inline AI* GetScholomanceAI(T* obj) { return GetInstanceAI(obj, ScholomanceScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp index e702a7e70f5..fa18a9d9f28 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp @@ -30,6 +30,8 @@ #include "SpellScript.h" #include "CreatureAIImpl.h" +namespace ShadowfangKeep::ApothecaryHummel +{ enum ApothecarySpells { SPELL_ALLURING_PERFUME = 68589, @@ -572,9 +574,12 @@ class spell_apothecary_cologne_spill : public SpellScriptLoader return new spell_apothecary_cologne_spill_AuraScript(); } }; +} void AddSC_boss_apothecary_hummel() { + using namespace ShadowfangKeep; + using namespace ShadowfangKeep::ApothecaryHummel; new boss_apothecary_hummel(); new npc_apothecary_baxter(); new npc_apothecary_frye(); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_ashbury.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_ashbury.cpp index e04d3cda9b6..77ea9fe6f8b 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_ashbury.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_ashbury.cpp @@ -27,6 +27,8 @@ #include "InstanceScript.h" #include "Map.h" +namespace ShadowfangKeep::BaronAshbury +{ enum Spells { // Baron Ashbury @@ -287,9 +289,12 @@ class spell_ashbury_dark_archangel_form : public AuraScript AfterEffectApply.Register(&spell_ashbury_dark_archangel_form::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_baron_ashbury() { + using namespace ShadowfangKeep; + using namespace ShadowfangKeep::BaronAshbury; RegisterShadowfangKeepCreatureAI(boss_baron_ashbury); RegisterSpellScript(spell_ashbury_asphyxiate); RegisterSpellScript(spell_ashbury_pain_and_suffering); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_silverlaine.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_silverlaine.cpp index b084f1b27de..80419db0937 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_silverlaine.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_baron_silverlaine.cpp @@ -26,6 +26,8 @@ #include "InstanceScript.h" #include "ObjectAccessor.h" +namespace ShadowfangKeep::BaronSilverlaine +{ enum Texts { SAY_AGGRO = 0, @@ -394,9 +396,12 @@ class spell_sfk_summon_worgen_spirit : public SpellScript OnEffectHitTarget.Register(&spell_sfk_summon_worgen_spirit::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; +} void AddSC_boss_baron_silverlaine() { + using namespace ShadowfangKeep; + using namespace ShadowfangKeep::BaronSilverlaine; RegisterShadowfangKeepCreatureAI(boss_baron_silverlaine); RegisterShadowfangKeepCreatureAI(npc_sfk_worgen_spirit); RegisterSpellScript(spell_sfk_summon_worgen_spirit); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_commander_springvale.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_commander_springvale.cpp index f12b1e89e1f..428c914937d 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_commander_springvale.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_commander_springvale.cpp @@ -27,6 +27,8 @@ #include "CreatureAIImpl.h" #include "Map.h" +namespace ShadowfangKeep::CommanderSpringvale +{ enum Spells { // Commander Springvale @@ -524,9 +526,12 @@ class spell_sfk_unholy_empowerment : public SpellScriptLoader return new spell_sfk_unholy_empowerment_SpellScript(); } }; +} void AddSC_boss_commander_springvale() { + using namespace ShadowfangKeep; + using namespace ShadowfangKeep::CommanderSpringvale; new boss_commander_springvale(); new npc_wailing_guardsman(); new npc_tormented_officer(); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_godfrey.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_godfrey.cpp index 3456e37ff38..b37dd00c1f7 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_godfrey.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_godfrey.cpp @@ -27,6 +27,8 @@ #include "InstanceScript.h" #include "ObjectAccessor.h" +namespace ShadowfangKeep::LordGodfrey +{ enum Texts { SAY_AGGRO_ALLIANCE = 0, @@ -352,9 +354,12 @@ class spell_godfrey_cursed_bullets : public AuraScript private: uint32 _baseDamage = 0; }; +} void AddSC_boss_lord_godfrey() { + using namespace ShadowfangKeep; + using namespace ShadowfangKeep::LordGodfrey; RegisterShadowfangKeepCreatureAI(boss_lord_godfrey); RegisterSpellScript(spell_godfrey_summon_bloodthirsty_ghouls); RegisterSpellScript(spell_godfrey_pistol_barrage); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_walden.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_walden.cpp index 5f10503ec4f..53741094a79 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_walden.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_lord_walden.cpp @@ -27,6 +27,8 @@ #include "InstanceScript.h" #include "MotionMaster.h" +namespace ShadowfangKeep::LordWalden +{ enum Texts { SAY_AGGRO = 0, @@ -304,9 +306,12 @@ class spell_walden_toxic_catalyst : public SpellScript OnObjectAreaTargetSelect.Register(&spell_walden_toxic_catalyst::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY); } }; +} void AddSC_boss_lord_walden() { + using namespace ShadowfangKeep; + using namespace ShadowfangKeep::LordWalden; RegisterShadowfangKeepCreatureAI(boss_lord_walden); RegisterSpellScript(spell_walden_toxic_coagulent); RegisterSpellScript(spell_walden_conjure_poisonous_mixture); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp index fc74b0ec417..cda6ec3e75a 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/instance_shadowfang_keep.cpp @@ -26,6 +26,8 @@ #include "EventMap.h" #include "CreatureAI.h" +namespace ShadowfangKeep +{ ObjectData const creatureData[] = { { BOSS_BARON_ASHBURY, DATA_BARON_ASHBURY }, @@ -300,8 +302,10 @@ class instance_shadowfang_keep : public InstanceMapScript return new instance_shadowfang_keep_InstanceMapScript(map); } }; +} void AddSC_instance_shadowfang_keep() { + using namespace ShadowfangKeep; new instance_shadowfang_keep(); } diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 75482787ce7..80cf66194c6 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -26,6 +26,8 @@ #include "Player.h" #include "InstanceScript.h" +namespace ShadowfangKeep +{ enum Events { }; @@ -146,9 +148,11 @@ class at_sfk_gargoyle_event : public OnlyOnceAreaTriggerScript return true; } }; +} void AddSC_shadowfang_keep() { + using namespace ShadowfangKeep; RegisterSpellScript(spell_sfk_shield_of_bones); new at_sfk_outside_troups(); new at_sfk_outside_ivar_bloodfang(); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h index 7b8be7d9bc4..a8bf4dbb3c1 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.h @@ -21,6 +21,8 @@ #include "CreatureAIImpl.h" #include "Creature.h" +namespace ShadowfangKeep +{ #define DataHeader "SK" #define SKScriptName "instance_shadowfang_keep" @@ -110,5 +112,6 @@ AI* GetShadowfangKeepAI(Creature* creature) } #define RegisterShadowfangKeepCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetShadowfangKeepAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_balnazzar.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_balnazzar.cpp index ccdeef693cc..88c6a3851ba 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_balnazzar.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_balnazzar.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::Balnazzar +{ enum Spells { // Balnazzar @@ -118,8 +120,11 @@ struct boss_balnazzar : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_balnazzar() { + using namespace Stratholme; + using namespace Stratholme::Balnazzar; RegisterStratholmeCreatureAI(boss_balnazzar); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp index d06cc4ac010..94c28bdd381 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baron_rivendare.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::BaronRivendare +{ enum Says { SAY_BARON_RUN_START = 0, @@ -176,8 +178,11 @@ class boss_baron_rivendare : public CreatureScript return GetStratholmeAI(creature); } }; +} void AddSC_boss_baron_rivendare() { + using namespace Stratholme; + using namespace Stratholme::BaronRivendare; new boss_baron_rivendare(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index 71218683781..ed192e19730 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -22,6 +22,8 @@ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::BaronessAnastari +{ enum Spells { SPELL_BANSHEEWAIL = 16565, @@ -136,8 +138,11 @@ struct boss_baroness_anastari : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_baroness_anastari() { + using namespace Stratholme; + using namespace Stratholme::BaronessAnastari; RegisterStratholmeCreatureAI(boss_baroness_anastari); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp index 0d65a62ab13..0897282b4bc 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_cannon_master_willey.cpp @@ -25,6 +25,8 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace Stratholme::CannonMasterWlley +{ //front, left #define ADD_1X 3553.851807f #define ADD_1Y -2945.885986f @@ -229,8 +231,11 @@ class boss_cannon_master_willey : public CreatureScript }; }; +} void AddSC_boss_cannon_master_willey() { + using namespace Stratholme; + using namespace Stratholme::CannonMasterWlley; new boss_cannon_master_willey(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp index 698979d0a41..bf2ab37f948 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_magistrate_barthilas.cpp @@ -26,6 +26,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::MagistrateBarthilas +{ enum Spells { SPELL_DRAININGBLOW = 16793, @@ -139,10 +141,12 @@ class boss_magistrate_barthilas : public CreatureScript DoMeleeAttackIfReady(); } }; - }; +} void AddSC_boss_magistrate_barthilas() { + using namespace Stratholme; + using namespace Stratholme::MagistrateBarthilas; new boss_magistrate_barthilas(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp index c2c38bbf3a6..88f993040e5 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_maleki_the_pallid.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::MalekiThePallid +{ enum Spells { SPELL_FROSTBOLT = 17503, @@ -120,8 +122,11 @@ class boss_maleki_the_pallid : public CreatureScript return GetStratholmeAI(creature); } }; +} void AddSC_boss_maleki_the_pallid() { + using namespace Stratholme; + using namespace Stratholme::MalekiThePallid; new boss_maleki_the_pallid(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp index 75523473a01..7baa798a83e 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_nerubenkan.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::Nerubenkan +{ enum Spells { SPELL_ENCASINGWEBS = 4962, @@ -127,8 +129,11 @@ class boss_nerubenkan : public CreatureScript return GetStratholmeAI(creature); } }; +} void AddSC_boss_nerubenkan() { + using namespace Stratholme; + using namespace Stratholme::Nerubenkan; new boss_nerubenkan(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp index 4986176174c..a523b95a0c5 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_order_of_silver_hand.cpp @@ -35,6 +35,8 @@ EndScriptData */ # Once Aurius is defeated, he should be the one summoning the ghosts. #####*/ +namespace Stratholme::OrderOfSilverHand +{ enum SH_CreatureIds { SH_GREGOR = 17910, @@ -164,8 +166,11 @@ class boss_silver_hand_bosses : public CreatureScript return GetStratholmeAI(creature); } }; +} void AddSC_boss_order_of_silver_hand() { + using namespace Stratholme; + using namespace Stratholme::OrderOfSilverHand; new boss_silver_hand_bosses(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp index 6612432a076..5f73fa23426 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_postmaster_malown.cpp @@ -26,6 +26,9 @@ EndScriptData */ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::PostmasterMalown +{ + //Spell ID to summon this guy is 24627 "Summon Postmaster Malown" //He should be spawned along with three other elites once the third postbox has been opened @@ -133,8 +136,11 @@ class boss_postmaster_malown : public CreatureScript return GetStratholmeAI(creature); } }; +} void AddSC_boss_postmaster_malown() { + using namespace Stratholme; + using namespace Stratholme::PostmasterMalown; new boss_postmaster_malown(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp index 3c14a595918..a34b9b33347 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_ramstein_the_gorger.cpp @@ -28,6 +28,8 @@ EndScriptData */ #include "stratholme.h" #include "TemporarySummon.h" +namespace Stratholme::RamsteinTheGorger +{ enum Spells { SPELL_TRAMPLE = 5568, @@ -112,8 +114,11 @@ class boss_ramstein_the_gorger : public CreatureScript return GetStratholmeAI(creature); } }; +} void AddSC_boss_ramstein_the_gorger() { + using namespace Stratholme; + using namespace Stratholme::RamsteinTheGorger; new boss_ramstein_the_gorger(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp index 5f89fd79e20..919af2b39aa 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_timmy_the_cruel.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "stratholme.h" +namespace Stratholme::TimmyTheCruel +{ enum Texts { // Timmy the Cruel @@ -105,8 +107,11 @@ struct boss_timmy_the_cruel : public BossAI private: bool _enraged; }; +} void AddSC_boss_timmy_the_cruel() { + using namespace Stratholme; + using namespace Stratholme::TimmyTheCruel; RegisterStratholmeCreatureAI(boss_timmy_the_cruel); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp index 12e9ba30150..60963011634 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/instance_stratholme.cpp @@ -28,6 +28,8 @@ #include "Player.h" #include "stratholme.h" +namespace Stratholme +{ enum InstanceEvents { EVENT_BARON_RUN = 1, @@ -487,8 +489,10 @@ class instance_stratholme : public InstanceMapScript return new instance_stratholme_InstanceMapScript(map); } }; +} void AddSC_instance_stratholme() { + using namespace Stratholme; new instance_stratholme(); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp index e19d756215a..e2aba54b630 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.cpp @@ -42,6 +42,8 @@ EndContentData */ #include "SpellScript.h" #include "stratholme.h" +namespace Stratholme +{ /*###### ## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist) ######*/ @@ -331,9 +333,11 @@ class spell_ysida_saved_credit : public SpellScript OnEffectHitTarget.Register(&spell_ysida_saved_credit::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; +} void AddSC_stratholme() { + using namespace Stratholme; new go_gauntlet_gate(); new npc_restless_soul(); new npc_spectral_ghostly_citizen(); diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h index 5905cadcc5b..f4b0affef90 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace Stratholme +{ #define StratholmeScriptName "instance_stratholme" #define DataHeader "STR" @@ -129,5 +131,6 @@ inline AI* GetStratholmeAI(T* obj) } #define RegisterStratholmeCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetStratholmeAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp index 5f13c0234d6..3ebb759b926 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/instance_sunken_temple.cpp @@ -28,6 +28,8 @@ EndScriptData */ #include "Map.h" #include "sunken_temple.h" +namespace SunkenTemple +{ enum Gameobject { GO_ATALAI_STATUE1 = 148830, @@ -203,8 +205,10 @@ class instance_sunken_temple : public InstanceMapScript return new instance_sunken_temple_InstanceMapScript(map); } }; +} void AddSC_instance_sunken_temple() { + using namespace SunkenTemple; new instance_sunken_temple(); } diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp index e89870b97e6..f5976d32736 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.cpp @@ -34,6 +34,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "sunken_temple.h" +namespace SunkenTemple +{ /*##### # at_malfurion_Stormrage_trigger #####*/ @@ -86,9 +88,11 @@ class go_atalai_statue : public GameObjectScript return GetSunkenTempleAI(go); } }; +} void AddSC_sunken_temple() { + using namespace SunkenTemple; new at_malfurion_stormrage(); new go_atalai_statue(); } diff --git a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h index 3940a168a2c..fc5f0f5a261 100644 --- a/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h +++ b/src/server/scripts/EasternKingdoms/SunkenTemple/sunken_temple.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace SunkenTemple +{ #define STScriptName "instance_sunken_temple" #define DataHeader "ST" @@ -33,5 +35,6 @@ inline AI* GetSunkenTempleAI(T* obj) { return GetInstanceAI(obj, STScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp index f4bd1769e30..5641172ed5f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_brutallus.cpp @@ -28,6 +28,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "sunwell_plateau.h" +namespace SunwellPlateau::Brutallus +{ enum Quotes { YELL_INTRO = 0, @@ -343,8 +345,11 @@ class boss_brutallus : public CreatureScript return GetSunwellPlateauAI(creature); } }; +} void AddSC_boss_brutallus() { + using namespace SunwellPlateau; + using namespace SunwellPlateau::Brutallus; new boss_brutallus(); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp index 5e9b2de3381..727a50f01a9 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_eredar_twins.cpp @@ -22,6 +22,8 @@ #include "sunwell_plateau.h" #include "SpellInfo.h" +namespace SunwellPlateau::EredarTwins +{ enum Quotes { YELL_INTRO_SAC_1 = 0, @@ -757,9 +759,12 @@ class npc_shadow_image : public CreatureScript } }; }; +} void AddSC_boss_eredar_twins() { + using namespace SunwellPlateau; + using namespace SunwellPlateau::EredarTwins; new boss_sacrolash(); new boss_alythess(); new npc_shadow_image(); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 6189a5cd1e6..9f58c629ebf 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -31,6 +31,8 @@ EndScriptData */ #include "sunwell_plateau.h" #include "TemporarySummon.h" +namespace SunwellPlateau::Felwyst +{ enum Yells { YELL_BIRTH = 0, @@ -577,9 +579,12 @@ class npc_felmyst_trail : public CreatureScript return GetSunwellPlateauAI(creature); } }; +} void AddSC_boss_felmyst() { + using namespace SunwellPlateau; + using namespace SunwellPlateau::Felwyst; new boss_felmyst(); new npc_felmyst_vapor(); new npc_felmyst_trail(); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index cff4eb80bf8..b251ed2351f 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -28,6 +28,8 @@ #include "TemporarySummon.h" #include "WorldSession.h" +namespace SunwellPlateau::Kalecgos +{ enum Yells { SAY_SATH_AGGRO = 0, @@ -774,9 +776,12 @@ class spell_kalecgos_curse_of_boundless_agony : public AuraScript AfterEffectRemove.Register(&spell_kalecgos_curse_of_boundless_agony::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); } }; +} void AddSC_boss_kalecgos() { + using namespace SunwellPlateau; + using namespace SunwellPlateau::Kalecgos; RegisterSunwellPlateauCreatureAI(boss_kalecgos); RegisterSunwellPlateauCreatureAI(boss_sathrovarr); RegisterSunwellPlateauCreatureAI(boss_kalecgos_human); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index eae4a4726f2..b45c53b6358 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -36,6 +36,8 @@ EndScriptData */ #include "sunwell_plateau.h" #include "TemporarySummon.h" +namespace SunwellPlateau::KilJaeden +{ /*** Speech and sounds***/ enum Yells { @@ -1463,9 +1465,12 @@ class npc_sinster_reflection : public CreatureScript return GetSunwellPlateauAI(creature); } }; +} void AddSC_boss_kiljaeden() { + using namespace SunwellPlateau; + using namespace SunwellPlateau::KilJaeden; new go_orb_of_the_blue_flight(); new boss_kalecgos_kj(); new boss_kiljaeden(); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp index 6c1df7a5ba2..813efbe0bec 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_muru.cpp @@ -23,6 +23,8 @@ #include "SpellScript.h" #include "sunwell_plateau.h" +namespace SunwellPlateau::Muru +{ enum Spells { // Muru's spells @@ -713,9 +715,12 @@ class spell_summon_blood_elves_periodic : public SpellScriptLoader return new spell_summon_blood_elves_periodic_AuraScript(); } }; +} void AddSC_boss_muru() { + using namespace SunwellPlateau; + using namespace SunwellPlateau::Muru; new boss_muru(); new boss_entropius(); new npc_muru_portal(); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp index c360c942445..4a58715fda0 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/instance_sunwell_plateau.cpp @@ -34,6 +34,8 @@ 5 - Kil'Jaeden */ +namespace SunwellPlateau +{ DoorData const doorData[] = { { GO_FIRE_BARRIER, DATA_FELMYST, DOOR_TYPE_PASSAGE }, @@ -234,8 +236,10 @@ class instance_sunwell_plateau : public InstanceMapScript return new instance_sunwell_plateau_InstanceMapScript(map); } }; +} void AddSC_instance_sunwell_plateau() { + using namespace SunwellPlateau; new instance_sunwell_plateau(); } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp index a583555a460..9f87a3cae98 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.cpp @@ -30,6 +30,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "sunwell_plateau.h" +namespace SunwellPlateau +{ /*###### ## npc_prophet_velen ######*/ @@ -61,5 +63,9 @@ enum LiadrinnSpeeches #define CS_GOSSIP2 "What went wrong?" #define CS_GOSSIP3 "Why did they stop?" #define CS_GOSSIP4 "Your insight is appreciated." +} -void AddSC_sunwell_plateau() { } +void AddSC_sunwell_plateau() +{ + using namespace SunwellPlateau; +} diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h index ad72559252e..1a971082307 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/sunwell_plateau.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace SunwellPlateau +{ #define SunwellPlateauScriptName "instance_sunwell_plateau" #define DataHeader "SWP" @@ -122,5 +124,6 @@ inline AI* GetSunwellPlateauAI(T* obj) } #define RegisterSunwellPlateauCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetSunwellPlateauAI) +} #endif // SUNWELL_PLATEAU_H diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp index 922790d807b..35dd5f11701 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_hogger.cpp @@ -22,6 +22,8 @@ #include "ScriptedCreature.h" #include "the_stockade.h" +namespace TheStockade::Hogger +{ enum Says { SAY_AGGRO = 0, @@ -164,9 +166,12 @@ struct npc_warden_thelwater : public ScriptedAI private: EventMap _events; }; +} void AddSC_boss_hogger() { + using namespace TheStockade; + using namespace TheStockade::Hogger; RegisterStormwindStockadeAI(boss_hogger); RegisterStormwindStockadeAI(npc_warden_thelwater); } diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp index 2f87ae913a4..e5a57aa37dc 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_lord_overheat.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "the_stockade.h" +namespace TheStockade::Lordoverheat +{ enum Spells { SPELL_FIREBALL = 12466, @@ -96,8 +98,11 @@ struct boss_lord_overheat : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_lord_overheat() { + using namespace TheStockade; + using namespace TheStockade::Lordoverheat; RegisterStormwindStockadeAI(boss_lord_overheat); } diff --git a/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp index ed07c3b5d48..df630910ef9 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/boss_randolph_moloch.cpp @@ -22,6 +22,8 @@ #include "ScriptedCreature.h" #include "the_stockade.h" +namespace TheStockade::RandolphMoloch +{ enum Spells { // Randolph Moloch @@ -198,9 +200,12 @@ struct npc_mortimer_moloch : public ScriptedAI private: EventMap _events; }; +} void AddSC_boss_randolph_moloch() { + using namespace TheStockade; + using namespace TheStockade::RandolphMoloch; RegisterStormwindStockadeAI(boss_randolph_moloch); RegisterStormwindStockadeAI(npc_mortimer_moloch); } diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp index d233a851589..f878aa53402 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp @@ -20,6 +20,8 @@ #include "Map.h" #include "the_stockade.h" +namespace TheStockade +{ enum SpawnGroups { SPAWN_GROUP_ALLIANCE_ENTRANCE = 450 @@ -56,8 +58,10 @@ class instance_the_stockade : public InstanceMapScript return new instance_the_stockade_InstanceMapScript(map); } }; +} void AddSC_instance_the_stockade() { + using namespace TheStockade; new instance_the_stockade(); } diff --git a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h index 2d5f734aed1..a9d410e0056 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h +++ b/src/server/scripts/EasternKingdoms/TheStockade/the_stockade.h @@ -21,6 +21,8 @@ #include "CreatureAIImpl.h" #include "MotionMaster.h" +namespace TheStockade +{ #define StormwindStockadeScriptName "instance_the_stockade" #define DataHeader "SS" @@ -49,5 +51,5 @@ inline AI* GetStormwindStockadeAI(T* obj) } #define RegisterStormwindStockadeAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetStormwindStockadeAI) - +} #endif diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_commander_ulthok.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_commander_ulthok.cpp index baead96d9bf..2f2db68b4f7 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_commander_ulthok.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_commander_ulthok.cpp @@ -25,6 +25,8 @@ #include "Player.h" #include "InstanceScript.h" +namespace ThroneOfTheTides::CommanderUlthok +{ enum Texts { // Commander Ulthok @@ -216,9 +218,12 @@ class spell_ulthok_dark_fissure : public AuraScript OnEffectPeriodic.Register(&spell_ulthok_dark_fissure::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); } }; +} void AddSC_boss_commander_ulthok() { + using namespace ThroneOfTheTides; + using namespace ThroneOfTheTides::CommanderUlthok; RegisterThroneOfTheTidesCreatureAI(boss_commander_ulthok); RegisterSpellScript(spell_ulthok_dark_fissure); } diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_lady_nazjar.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_lady_nazjar.cpp index dd29af994de..ab85143b852 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_lady_nazjar.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_lady_nazjar.cpp @@ -28,6 +28,8 @@ #include "InstanceScript.h" #include "MotionMaster.h" +namespace ThroneOfTheTides::LadyNazjar +{ enum Texts { SAY_AGGRO = 0, @@ -510,9 +512,12 @@ class spell_nazjar_waterspout_targeting : public SpellScript OnEffectHitTarget.Register(&spell_nazjar_waterspout_targeting::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; +} void AddSC_boss_lady_nazjar() { + using namespace ThroneOfTheTides; + using namespace ThroneOfTheTides::LadyNazjar; RegisterThroneOfTheTidesCreatureAI(boss_lady_nazjar); RegisterThroneOfTheTidesCreatureAI(npc_nazjar_nazjar_honor_guard); RegisterThroneOfTheTidesCreatureAI(npc_nazjar_nazjar_tempest_witch); diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_mindbender_gursha.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_mindbender_gursha.cpp index cd70d9727ce..041eb8d2007 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_mindbender_gursha.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_mindbender_gursha.cpp @@ -15,6 +15,12 @@ * with this program. If not, see . */ +namespace ThroneOfTheTides::MindbenderGursha +{ +} + void AddSC_boss_mindbender_gursha() { + using namespace ThroneOfTheTides; + using namespace ThroneOfTheTides::MindbenderGursha; } diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp index b5f96b66a83..3ba2290c393 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp @@ -33,6 +33,8 @@ #include "ObjectAccessor.h" #include "Map.h" +namespace ThroneOfTheTides::Ozumat +{ enum Texts { // Neptulon @@ -896,9 +898,12 @@ class spell_ozumat_purify : public SpellScript OnObjectAreaTargetSelect.Register(&spell_ozumat_purify::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); } }; +} void AddSC_boss_ozumat() { + using namespace ThroneOfTheTides; + using namespace ThroneOfTheTides::Ozumat; RegisterThroneOfTheTidesCreatureAI(boss_ozumat); RegisterThroneOfTheTidesCreatureAI(npc_ozumat_neptulon); RegisterThroneOfTheTidesCreatureAI(npc_ozumat_vicious_mindlasher); diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp index ee1cf8f5681..2d3e5d803fb 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/instance_throne_of_the_tides.cpp @@ -28,6 +28,8 @@ #include "Player.h" #include "TemporarySummon.h" +namespace ThroneOfTheTides +{ ObjectData const creatureData[] = { { BOSS_LADY_NAZJAR, DATA_LADY_NAZJAR }, @@ -660,8 +662,10 @@ class instance_throne_of_the_tides : public InstanceMapScript return new instance_throne_of_the_tides_InstanceMapScript(map); } }; +} void AddSC_instance_throne_of_the_tides() { + using namespace ThroneOfTheTides; new instance_throne_of_the_tides(); } diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp index bf4d9b2acd8..bb870c9c830 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.cpp @@ -29,6 +29,8 @@ #include "Transport.h" #include "Vehicle.h" +namespace ThroneOfTheTides +{ enum OzumatVehicleBig { SEAT_TENTACLE_BLOCK = 0, @@ -516,9 +518,11 @@ class at_tott_neptulon_intro : public AreaTriggerScript return true; } }; +} void AddSC_throne_of_the_tides() { + using namespace ThroneOfTheTides; RegisterThroneOfTheTidesCreatureAI(npc_tott_ozumat_vehicle_big); RegisterThroneOfTheTidesCreatureAI(npc_tott_lady_nazjar); RegisterSpellScript(spell_tott_trigger_murloc); diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h index b7e836f93b6..14d6b931a52 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/throne_of_the_tides.h @@ -21,6 +21,8 @@ #include "CreatureAIImpl.h" #include "Position.h" +namespace ThroneOfTheTides +{ #define TotTScriptName "instance_throne_of_the_tides" #define DataHeader "TOTT" @@ -242,5 +244,6 @@ inline AI* GetThroneOfTheTodesAI(T* obj) } #define RegisterThroneOfTheTidesCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetThroneOfTheTodesAI) +} #endif // THRONEOFTHETIDES_H_ diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp index d2eb3189162..4e0b1e03eb6 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_archaedas.cpp @@ -35,6 +35,8 @@ EndScriptData */ #include "SpellInfo.h" #include "uldaman.h" +namespace Uldaman::Archaedas +{ enum Says { SAY_AGGRO = 0, @@ -408,11 +410,14 @@ class go_altar_of_archaedas : public GameObjectScript return GetUldamanAI(go); } }; +} //This is the actual function called only once durring InitScripts() //It must define all handled functions that are to be run in this script void AddSC_boss_archaedas() { + using namespace Uldaman; + using namespace Uldaman::Archaedas; new boss_archaedas(); new npc_archaedas_minions(); new npc_stonekeepers(); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp index 9ab249d9c3d..3d339139387 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/boss_ironaya.cpp @@ -25,6 +25,8 @@ EndScriptData */ #include "ScriptMgr.h" #include "ScriptedCreature.h" +namespace Uldaman::Ironaya +{ enum Ironaya { SPELL_ARCINGSMASH = 8374, @@ -104,10 +106,13 @@ class boss_ironaya : public CreatureScript return new boss_ironayaAI(creature); } }; +} //This is the actual function called only once durring InitScripts() //It must define all handled functions that are to be run in this script void AddSC_boss_ironaya() { + using namespace Uldaman; + using namespace Uldaman::Ironaya; new boss_ironaya(); } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 124ef88e035..5271145a180 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -32,6 +32,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "uldaman.h" +namespace Uldaman +{ enum Spells { SPELL_ARCHAEDAS_AWAKEN = 10347, @@ -526,8 +528,10 @@ class instance_uldaman : public InstanceMapScript return new instance_uldaman_InstanceMapScript(map); } }; +} void AddSC_instance_uldaman() { + using namespace Uldaman; new instance_uldaman(); } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp index 986f89bcb35..c21abbb6eef 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.cpp @@ -36,6 +36,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "uldaman.h" +namespace Uldaman +{ /*###### ## npc_jadespine_basilisk ######*/ @@ -154,9 +156,11 @@ class AreaTrigger_at_map_chamber : public AreaTriggerScript return true; } }; +} void AddSC_uldaman() { + using namespace Uldaman; new npc_jadespine_basilisk(); new go_keystone_chamber(); new AreaTrigger_at_map_chamber(); diff --git a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h index 595354f1c92..7fc2d59d01a 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h +++ b/src/server/scripts/EasternKingdoms/Uldaman/uldaman.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace Uldaman +{ #define UldamanScriptName "instance_uldaman" #define DataHeader "UD" @@ -49,5 +51,6 @@ inline AI* GetUldamanAI(T* obj) { return GetInstanceAI(obj, UldamanScriptName); } +} #endif diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index 5b75969bb38..617efee2437 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -30,6 +30,8 @@ #include "TemporarySummon.h" #include "Weather.h" +namespace ZulAman::Akilzon +{ enum Texts { // Akil'zon @@ -669,9 +671,12 @@ class spell_akilzon_summon_amani_kidnapper : public SpellScript OnDestinationTargetSelect.Register(&spell_akilzon_summon_amani_kidnapper::SetDest, EFFECT_0, TARGET_DEST_CASTER); } }; +} void AddSC_boss_akilzon() { + using namespace ZulAman; + using namespace ZulAman::Akilzon; RegisterZulAamanCreatureAI(boss_akilzon); RegisterZulAamanCreatureAI(npc_akilzon_soaring_eagle); RegisterZulAamanCreatureAI(npc_akilzon_amani_kidnapper); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp index d1a528aa582..501effe7e89 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_daakara.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "zulaman.h" +namespace ZulAman::Daakara +{ enum Texts { }; @@ -73,8 +75,11 @@ struct boss_daakara : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_daakara() { + using namespace ZulAman; + using namespace ZulAman::Daakara; RegisterZulAamanCreatureAI(boss_daakara); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp index 5fc4bb391ef..1508dd9fba2 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp @@ -23,6 +23,8 @@ #include "SpellInfo.h" #include "zulaman.h" +namespace ZulAman::Halazzi +{ enum Texts { }; @@ -71,8 +73,11 @@ struct boss_halazzi : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_halazzi() { + using namespace ZulAman; + using namespace ZulAman::Halazzi; RegisterZulAamanCreatureAI(boss_halazzi); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index b22e06f498e..e52c1698289 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -25,6 +25,8 @@ #include "TemporarySummon.h" #include "zulaman.h" +namespace ZulAman::HexlordMalacrass +{ enum Texts { }; @@ -75,8 +77,11 @@ struct boss_hexlord_malacrass : public BossAI events.Update(diff); } }; +} void AddSC_boss_hex_lord_malacrass() { + using namespace ZulAman; + using namespace ZulAman::HexlordMalacrass; RegisterZulAamanCreatureAI(boss_hexlord_malacrass); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 63f2528ea22..45659a002ea 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -26,6 +26,8 @@ #include "SpellScript.h" #include "zulaman.h" +namespace ZulAman::Janalai +{ enum Texts { // Jan'alai @@ -580,9 +582,12 @@ class spell_janalai_hatch_eggs : public SpellScript OnEffectHitTarget.Register(&spell_janalai_hatch_eggs::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY); } }; +} void AddSC_boss_janalai() { + using namespace ZulAman; + using namespace ZulAman::Janalai; RegisterZulAamanCreatureAI(boss_janalai); RegisterZulAamanCreatureAI(npc_janalai_amanishi_hatcher); RegisterZulAamanCreatureAI(npc_janalai_amani_dragonhawk_hatchling); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 13d2a8a87ac..38aece9af99 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -23,6 +23,8 @@ #include "ScriptedCreature.h" #include "zulaman.h" +namespace ZulAman::Nalorakk +{ enum Texts { }; @@ -75,8 +77,11 @@ struct boss_nalorakk : public BossAI DoMeleeAttackIfReady(); } }; +} void AddSC_boss_nalorakk() { + using namespace ZulAman; + using namespace ZulAman::Nalorakk; RegisterZulAamanCreatureAI(boss_nalorakk); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp index 04d9f9fc661..8c978aadc47 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp @@ -23,6 +23,8 @@ #include "MotionMaster.h" #include "zulaman.h" +namespace ZulAman +{ ObjectData const creatureData[] = { { BOSS_AKILZON, DATA_ALKILZON }, @@ -258,8 +260,10 @@ class instance_zulaman : public InstanceMapScript return new instance_zulaman_InstanceScript(map); } }; +} void AddSC_instance_zulaman() { + using namespace ZulAman; new instance_zulaman(); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp index 232295160f1..071d145f0c2 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp @@ -28,6 +28,8 @@ #include "SpellScript.h" #include "zulaman.h" +namespace ZulAman +{ enum VoljinTexts { // Vol'jin @@ -456,9 +458,11 @@ struct npc_zulaman_amanishi_guardian : public ScriptedAI bool _enraged; bool _firstGuardian; }; +} void AddSC_zulaman() { + using namespace ZulAman; RegisterZulAamanCreatureAI(npc_zulaman_voljin); RegisterZulAamanCreatureAI(npc_zulaman_amanishi_guardian); } diff --git a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h index 4b70d31dc12..0da15e05e6a 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h +++ b/src/server/scripts/EasternKingdoms/ZulAman/zulaman.h @@ -20,6 +20,8 @@ #include "CreatureAIImpl.h" +namespace ZulAman +{ uint32 const EncounterCount = 6; #define ZulAmanScriptName "instance_zulaman" #define DataHeader "ZA" @@ -104,5 +106,6 @@ inline AI* GetZulAmanAI(T* obj) } #define RegisterZulAamanCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetZulAmanAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_bloodlord_mandokir.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_bloodlord_mandokir.cpp index 4c5ac8ddc85..25d60742cac 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_bloodlord_mandokir.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_bloodlord_mandokir.cpp @@ -27,6 +27,8 @@ #include "SpellScript.h" #include "zulgurub.h" +namespace ZulGurub::BloodlordMandokir +{ enum Yells { SAY_AGGRO = 0, @@ -668,9 +670,12 @@ class achievement_ohganot_so_fast : public AchievementCriteriaScript return target && target->GetAI()->GetData(DATA_OHGANOT_SO_FAST); } }; +} void AddSC_boss_mandokir() { + using namespace ZulGurub; + using namespace ZulGurub::BloodlordMandokir; RegisterZulGurubCreatureAI(boss_bloodlord_mandokir); RegisterZulGurubCreatureAI(npc_mandokir_ohgan); RegisterZulGurubCreatureAI(npc_mandokir_chained_spirit); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index b3884f2eb1f..f6ad5ff1c23 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -20,6 +20,8 @@ #include "ScriptedCreature.h" #include "zulgurub.h" +namespace ZulGurub::Grilek +{ enum Yells { }; @@ -87,8 +89,11 @@ class boss_grilek : public CreatureScript return new boss_grilekAI(creature); } }; +} void AddSC_boss_grilek() { + using namespace ZulGurub; + using namespace ZulGurub::Grilek; new boss_grilek(); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp index 39435b2a592..6317a6b3a3e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hazzarah.cpp @@ -20,6 +20,8 @@ #include "ScriptedCreature.h" #include "zulgurub.h" +namespace ZulGurub::Hazzarah +{ enum Yells { }; @@ -87,8 +89,11 @@ class boss_hazzarah : public CreatureScript return new boss_hazzarahAI(creature); } }; +} void AddSC_boss_hazzarah() { + using namespace ZulGurub; + using namespace ZulGurub::Hazzarah; new boss_hazzarah(); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priest_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priest_venoxis.cpp index 8eb51a4bbec..9623ee1bb20 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priest_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priest_venoxis.cpp @@ -29,6 +29,8 @@ #include "ObjectAccessor.h" #include "Map.h" +namespace ZulGurub::HighPriestVenoxis +{ enum Yells { SAY_AGGRO = 0, @@ -595,9 +597,12 @@ class spell_venom_withdrawal : public SpellScript OnEffectHitTarget.Register(&spell_venom_withdrawal::HandleKnockback, EFFECT_2, SPELL_EFFECT_LEAP_BACK); } }; +} void AddSC_boss_high_priest_venoxis() { + using namespace ZulGurub; + using namespace ZulGurub::HighPriestVenoxis; RegisterZulGurubCreatureAI(boss_high_priest_venoxis); RegisterSpellScript(spell_venoxis_venomous_effusion); RegisterSpellScript(spell_venoxis_whispers_of_hethiss); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priestess_kilnara.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priestess_kilnara.cpp index 303bb14089d..ac889cb2d01 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priestess_kilnara.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_high_priestess_kilnara.cpp @@ -25,6 +25,8 @@ #include "SpellScript.h" #include "zulgurub.h" +namespace ZulGurub::HighPriestesKilnara +{ enum Yells { // High Priestess Kilnara @@ -464,9 +466,12 @@ class spell_kilnara_gaping_wound : public SpellScript OnObjectAreaTargetSelect.Register(&spell_kilnara_gaping_wound::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); } }; +} void AddSC_boss_high_priestess_kilnara() { + using namespace ZulGurub; + using namespace ZulGurub::HighPriestesKilnara; RegisterZulGurubCreatureAI(boss_high_priestess_kilnara); RegisterZulGurubCreatureAI(npc_kilnara_pride_of_bethekk); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp index 70d85dc67bf..ab3c187a5e6 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo_the_godbreaker.cpp @@ -29,6 +29,8 @@ #include "SpellInfo.h" #include "zulgurub.h" +namespace ZulGurub::JindoTheGodbreaker +{ enum Yells { // Jin'do the Godbreaker @@ -675,9 +677,12 @@ struct spell_jindo_body_slam : public SpellScript OnEffectHitTarget.Register(&spell_jindo_body_slam::HandleShieldBreakEffect, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); } }; +} void AddSC_boss_jindo_the_godbreaker() { + using namespace ZulGurub; + using namespace ZulGurub::JindoTheGodbreaker; RegisterZulGurubCreatureAI(boss_jindo_the_godbreaker); RegisterZulGurubCreatureAI(npc_jindo_gurubashi_spirit_warrior); RegisterSpellScript(spell_jindo_shadow_spike); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp index c6870eae8fa..b04639bb7e5 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_renataki.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "zulgurub.h" +namespace ZulGurub::Renataki +{ enum Yells { }; @@ -83,8 +85,11 @@ class boss_renataki : public CreatureScript return new boss_renatakiAI(creature); } }; +} void AddSC_boss_renataki() { + using namespace ZulGurub; + using namespace ZulGurub::Renataki; new boss_renataki(); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp index 24db7f1f97e..2f11a9466d2 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_wushoolay.cpp @@ -19,6 +19,8 @@ #include "ScriptedCreature.h" #include "zulgurub.h" +namespace ZulGurub::Wuhsoolay +{ enum Yells { }; @@ -86,8 +88,11 @@ class boss_wushoolay : public CreatureScript return new boss_wushoolayAI(creature); } }; +} void AddSC_boss_wushoolay() { + using namespace ZulGurub; + using namespace ZulGurub::Wuhsoolay; new boss_wushoolay(); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp index 77f4e2479a4..4a6645619a2 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_zanzil.cpp @@ -27,6 +27,8 @@ #include "SpellScript.h" #include "zulgurub.h" +namespace ZulGurub::Zanzil +{ enum Yells { // Zanzil @@ -648,9 +650,12 @@ class spell_zanzil_frostburn_formula : public AuraScript DoCheckProc.Register(&spell_zanzil_frostburn_formula::CheckProc); } }; +} void AddSC_boss_zanzil() { + using namespace ZulGurub; + using namespace ZulGurub::Zanzil; RegisterZulGurubCreatureAI(boss_zanzil); RegisterZulGurubCreatureAI(npc_zanzil_zanzili_berserker); RegisterSpellScript(spell_zanzil_zanzili_fire); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp index baad8be83f6..c48ff5f9454 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp @@ -24,6 +24,8 @@ #include "Map.h" #include "zulgurub.h" +namespace ZulGurub +{ ObjectData const creatureData[] = { { BOSS_HIGH_PRIEST_VENOXIS, DATA_HIGH_PRIEST_VENOXIS }, @@ -228,8 +230,10 @@ class instance_zulgurub : public InstanceMapScript return new instance_zulgurub_InstanceMapScript(map); } }; +} void AddSC_instance_zulgurub() { + using namespace ZulGurub; new instance_zulgurub(); } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp index 958e55857cb..c4787b7ace6 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp @@ -27,6 +27,8 @@ #include "SpellScript.h" #include "Vehicle.h" +namespace ZulGurub +{ enum RollingBoulders { SPELL_ROLLING_BOULDERS_PERIODIC_AURA = 96837, @@ -662,9 +664,11 @@ class spell_zulgurub_toad_explode : public SpellScript OnEffectHitTarget.Register(&spell_zulgurub_toad_explode::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY); } }; +} void AddSC_zulgurub() { + using namespace ZulGurub; RegisterZulGurubCreatureAI(npc_zulgurub_berserking_boulder_roller); RegisterZulGurubCreatureAI(npc_zulgurub_venomguard_destroyer); RegisterZulGurubCreatureAI(npc_zulgurub_tiki_lord_mu_loa); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h index e659ea245e5..fccb7185c2b 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h +++ b/src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.h @@ -23,6 +23,8 @@ #define DataHeader "ZG" #define ZGScriptName "instance_zulgurub" +namespace ZulGurub +{ uint32 const EncounterCount = 5; enum ZGDataTypes @@ -151,5 +153,6 @@ inline AI* GetZulGurubAI(T* obj) } #define RegisterZulGurubCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetZulGurubAI) +} #endif diff --git a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp index 81c288796c5..08ebb87a3f8 100644 --- a/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_blasted_lands.cpp @@ -26,6 +26,8 @@ Quest support: 3628. #include "Player.h" #include "Group.h" +namespace BlastedLands +{ enum DeathlyUsher { SPELL_TELEPORT_SINGLE = 12885, @@ -75,8 +77,10 @@ class spell_razelikh_teleport_group : public SpellScriptLoader return new spell_razelikh_teleport_group_SpellScript(); } }; +} void AddSC_blasted_lands() { + using namespace BlastedLands; new spell_razelikh_teleport_group(); } diff --git a/src/server/scripts/EasternKingdoms/zone_dun_morogh.cpp b/src/server/scripts/EasternKingdoms/zone_dun_morogh.cpp index c1b6ca1ed93..e752cec1dfd 100644 --- a/src/server/scripts/EasternKingdoms/zone_dun_morogh.cpp +++ b/src/server/scripts/EasternKingdoms/zone_dun_morogh.cpp @@ -19,6 +19,8 @@ #include "MotionMaster.h" #include "ScriptedCreature.h" +namespace DunMorogh +{ enum FrozenMountaineer { DATA_SET_ICE_BROKEN = 1, @@ -82,8 +84,10 @@ class npc_frozen_mountaineer : public CreatureScript return new npc_frozen_mountaineerAI(creature); } }; +} void AddSC_dun_morogh() { + using namespace DunMorogh; new npc_frozen_mountaineer(); } diff --git a/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp b/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp index e84b12e3d23..051569afc37 100644 --- a/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp +++ b/src/server/scripts/EasternKingdoms/zone_dun_morogh_area_coldridge_valley.cpp @@ -25,6 +25,8 @@ #include "SpellScript.h" #include "TemporarySummon.h" +namespace CodridgeValley +{ enum WoundedColdridgeMountaineer { NPC_JOREN_IRONSTOCK = 37081, @@ -453,9 +455,11 @@ class spell_low_health: public SpellScriptLoader return new spell_low_health_SpellScript(); } }; +} void AddSC_dun_morogh_area_coldridge_valley() { + using namespace CodridgeValley; new npc_wounded_coldridge_mountaineer(); new npc_wounded_milita(); new npc_milos_gyro(); diff --git a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp index 7d638824e2f..2e86b451408 100644 --- a/src/server/scripts/EasternKingdoms/zone_duskwood.cpp +++ b/src/server/scripts/EasternKingdoms/zone_duskwood.cpp @@ -27,6 +27,8 @@ EndScriptData */ #include "ScriptedCreature.h" #include "TemporarySummon.h" +namespace Duskwood +{ enum TwilightCorrupter { NPC_TWILIGHT_CORRUPTER = 15625, @@ -156,9 +158,11 @@ class at_twilight_grove : public AreaTriggerScript return false; }; }; +} void AddSC_duskwood() { + using namespace Duskwood; new boss_twilight_corrupter(); new at_twilight_grove(); } diff --git a/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp b/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp index d1b27df7524..2ec4d8af4eb 100644 --- a/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_elwynn_forest.cpp @@ -27,6 +27,8 @@ #include "ScriptMgr.h" #include "SpellScript.h" +namespace ElwynnForest +{ enum Northshire { NPC_STORWIND_INFANTRY = 49869, @@ -762,9 +764,11 @@ struct npc_cameron : public ScriptedAI bool _started; GuidVector _childrenGUIDs; }; +} void AddSC_elwynn_forest() { + using namespace ElwynnForest; RegisterCreatureAI(npc_stormwind_infantry); RegisterCreatureAI(npc_blackrock_battle_worg); RegisterCreatureAI(npc_injured_stormwind_infantry_dummy); diff --git a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp index 4e8f701eef6..028ca1fdff6 100644 --- a/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ghostlands.cpp @@ -34,6 +34,8 @@ EndContentData */ #include "TemporarySummon.h" #include "WorldSession.h" +namespace Ghostlands +{ /*###### ## npc_ranger_lilatha @@ -142,8 +144,10 @@ class npc_ranger_lilatha : public CreatureScript return new npc_ranger_lilathaAI(creature); } }; +} void AddSC_ghostlands() { + using namespace Ghostlands; new npc_ranger_lilatha(); } diff --git a/src/server/scripts/EasternKingdoms/zone_hillsbrad_foothills.cpp b/src/server/scripts/EasternKingdoms/zone_hillsbrad_foothills.cpp index 3e72a7e3b10..74ffc21e6a1 100644 --- a/src/server/scripts/EasternKingdoms/zone_hillsbrad_foothills.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hillsbrad_foothills.cpp @@ -31,6 +31,8 @@ #include "TemporarySummon.h" #include "Vehicle.h" +namespace HillsbradFoothills +{ enum PlansVsZombies { // Quest related @@ -1294,9 +1296,11 @@ class spell_brazie_spit : public SpellScript OnObjectAreaTargetSelect.Register(&spell_brazie_spit::FilterTargets, EFFECT_ALL, TARGET_UNIT_CONE_CASTER_TO_DEST_ENEMY); } }; +} void AddSC_hillsbrad_foothills() { + using namespace HillsbradFoothills; RegisterCreatureAI(npc_brazie_the_bonatist_vehicle); RegisterCreatureAI(npc_brazie_fertilitize_o_tron_2000); RegisterCreatureAI(npc_brazie_spot); diff --git a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp index a2bff479144..5f1ddf7b36e 100644 --- a/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_hinterlands.cpp @@ -31,6 +31,8 @@ EndContentData */ #include "Player.h" #include "ScriptedEscortAI.h" +namespace Hinterlands +{ /*###### ## npc_oox09hl ######*/ @@ -234,9 +236,11 @@ class npc_sharpbeak : public CreatureScript return new npc_sharpbeak_AI(creature); } }; +} void AddSC_hinterlands() { + using namespace Hinterlands; new npc_oox09hl(); new npc_sharpbeak(); } diff --git a/src/server/scripts/EasternKingdoms/zone_ironforge.cpp b/src/server/scripts/EasternKingdoms/zone_ironforge.cpp index 2e2596f745f..b51721462c1 100644 --- a/src/server/scripts/EasternKingdoms/zone_ironforge.cpp +++ b/src/server/scripts/EasternKingdoms/zone_ironforge.cpp @@ -15,6 +15,11 @@ * with this program. If not, see . */ +namespace Ironforge +{ +} + void AddSC_ironforge() { + using namespace Ironforge; } diff --git a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp index a1634172d77..aaef7f69310 100644 --- a/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp +++ b/src/server/scripts/EasternKingdoms/zone_redridge_mountains.cpp @@ -27,6 +27,8 @@ Script Data End */ #include "Player.h" #include "ScriptedCreature.h" +namespace RedridgeMountains +{ enum DumpyKeeshan { NPC_BIGEARL = 43248, @@ -377,9 +379,11 @@ class npc_redridge_citizen : public CreatureScript return new npc_redridge_citizenAI(creature); } }; +} void AddSC_redridge_mountains() { + using namespace RedridgeMountains; new npc_big_earl(); new npc_dumpy_and_keeshan(); new npc_bridge_worker_alex(); diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index fe49a87dbd0..8610477d495 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -31,6 +31,8 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Player.h" +namespace SilverpineForest +{ /*###### ## npc_deathstalker_erland ######*/ @@ -128,6 +130,7 @@ class npc_deathstalker_erland : public CreatureScript return new npc_deathstalker_erlandAI(creature); } }; +} /*###### ## AddSC @@ -135,5 +138,6 @@ class npc_deathstalker_erland : public CreatureScript void AddSC_silverpine_forest() { + using namespace SilverpineForest; new npc_deathstalker_erland(); } diff --git a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp index bd514c13afb..2af5f3df3a9 100644 --- a/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp +++ b/src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp @@ -15,6 +15,11 @@ * with this program. If not, see . */ +namespace StormwindCity +{ +} + void AddSC_stormwind_city() { + using namespace StormwindCity; } diff --git a/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp b/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp index f370f0419de..c5d967ba5c9 100644 --- a/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp +++ b/src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp @@ -15,6 +15,11 @@ * with this program. If not, see . */ +namespace SwampOfSorrows +{ +} + void AddSC_swamp_of_sorrows() { + using namespace SwampOfSorrows; } diff --git a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp index b573ca76177..c11c8af1889 100644 --- a/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp +++ b/src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp @@ -15,6 +15,11 @@ * with this program. If not, see . */ +namespace TirisfalGlades +{ +} + void AddSC_tirisfal_glades() { + using namespace TirisfalGlades; } diff --git a/src/server/scripts/EasternKingdoms/zone_twilight_highlands.cpp b/src/server/scripts/EasternKingdoms/zone_twilight_highlands.cpp index 1986348cfe0..626f0f7c67d 100644 --- a/src/server/scripts/EasternKingdoms/zone_twilight_highlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_twilight_highlands.cpp @@ -25,6 +25,8 @@ #include "SpellAuraEffects.h" #include "SpellScript.h" +namespace TwilightHighlands +{ enum Points { POINT_NONE = 0, @@ -398,9 +400,11 @@ class spell_th_poison : public AuraScript OnEffectPeriodic.Register(&spell_th_poison::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); } }; +} void AddSC_twilight_highlands() { + using namespace TwilightHighlands; RegisterCreatureAI(npc_th_gurgthock); RegisterSpellScript(spell_th_grab_targeting); RegisterSpellScript(spell_th_charge); diff --git a/src/server/scripts/EasternKingdoms/zone_undercity.cpp b/src/server/scripts/EasternKingdoms/zone_undercity.cpp index b787d691822..cb26aa7843e 100644 --- a/src/server/scripts/EasternKingdoms/zone_undercity.cpp +++ b/src/server/scripts/EasternKingdoms/zone_undercity.cpp @@ -35,6 +35,8 @@ EndContentData */ #include "ScriptedCreature.h" #include "ScriptedGossip.h" +namespace Undercity +{ /*###### ## npc_lady_sylvanas_windrunner ######*/ @@ -320,6 +322,7 @@ class npc_highborne_lamenter : public CreatureScript } }; }; +} /*###### ## AddSC @@ -327,6 +330,7 @@ class npc_highborne_lamenter : public CreatureScript void AddSC_undercity() { + using namespace Undercity; new npc_lady_sylvanas_windrunner(); new npc_highborne_lamenter(); } diff --git a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp index 6a2c7f188d8..31fc4cefb98 100644 --- a/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_western_plaguelands.cpp @@ -33,6 +33,8 @@ EndContentData */ #include "Player.h" #include "WorldSession.h" +namespace WesternPlaguelands +{ /*###### ## npc_the_scourge_cauldron ######*/ @@ -150,9 +152,11 @@ class npc_andorhal_tower : public CreatureScript } }; }; +} void AddSC_western_plaguelands() { + using namespace WesternPlaguelands; new npc_the_scourge_cauldron(); new npc_andorhal_tower(); } diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp index 0b362ac6c82..add282bd69c 100644 --- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp +++ b/src/server/scripts/EasternKingdoms/zone_westfall.cpp @@ -31,6 +31,8 @@ #include "ObjectMgr.h" #include "Group.h" +namespace Westfall +{ enum WestfallQuest { QUEST_MURDER_WAS_THE_CASE_THAT_THEY_GAVE_ME = 26209, @@ -1599,9 +1601,11 @@ class spell_westfall_sniper_fire : public SpellScript OnEffectHitTarget.Register(&spell_westfall_sniper_fire::HandleDummyEffect, EFFECT_0, SPELL_EFFECT_DUMMY); } }; +} void AddSC_westfall() { + using namespace Westfall; RegisterSpellScript(spell_westfall_unbound_energy); RegisterCreatureAI(npc_westfall_overloaded_harvest_golem); RegisterSpellScript(spell_westfall_reaping_blows); diff --git a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp index 2e9204cb82e..4554225b4e4 100644 --- a/src/server/scripts/EasternKingdoms/zone_wetlands.cpp +++ b/src/server/scripts/EasternKingdoms/zone_wetlands.cpp @@ -32,6 +32,8 @@ EndContentData */ #include "ScriptedEscortAI.h" #include "Player.h" +namespace Wetlands +{ /*###### ## npc_tapoke_slim_jahn ######*/ @@ -163,6 +165,7 @@ class npc_mikhail : public CreatureScript return new npc_mikhailAI(creature); } }; +} /*###### ## AddSC @@ -170,6 +173,7 @@ class npc_mikhail : public CreatureScript void AddSC_wetlands() { + using namespace Wetlands; new npc_tapoke_slim_jahn(); new npc_mikhail(); }