Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
Scripts/EasterKingdoms: moved scripts into their corresponding namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovahlord committed Dec 9, 2023
1 parent 22c843d commit ea30806
Show file tree
Hide file tree
Showing 249 changed files with 1,167 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"

namespace AlteracValley
{
enum Spells
{
SPELL_CHARGE = 22911,
Expand Down Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#include "ObjectAccessor.h"
#include "ScriptedCreature.h"

namespace AlteracValley::Balinda
{
enum Spells
{
SPELL_ARCANE_EXPLOSION = 46608,
Expand Down Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"

namespace AlteracValley::Drekthar
{
enum Spells
{
SPELL_WHIRLWIND = 15589,
Expand Down Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"

namespace AlteracValley::Galvangar
{
enum Spells
{
SPELL_CLEAVE = 15284,
Expand Down Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"

namespace AlteracValley::Vanndar
{
enum Yells
{
YELL_AGGRO = 0,
Expand Down Expand Up @@ -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;
}
3 changes: 3 additions & 0 deletions src/server/scripts/EasternKingdoms/BaradinHold/baradin_hold.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include "CreatureAIImpl.h"

namespace BaradinHold
{
#define DataHeader "BH"
#define BHScriptName "instance_baradin_hold"

Expand Down Expand Up @@ -63,5 +65,6 @@ inline AI* GetBaradinHoldAI(T* obj)
}

#define RegisterBaradinHoldCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBaradinHoldAI)
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "SpellInfo.h"
#include "SpellScript.h"

namespace BaradinHold::Alizabal
{
enum Texts
{
// Alizabal
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "TemporarySummon.h"
#include "Vehicle.h"

namespace BaradinHold::Occuthar
{
enum Spells
{
SPELL_SEARING_SHADOWS = 96913,
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "SpellScript.h"
#include "SpellAuraEffects.h"

namespace BaradinHold::Argaloth
{
enum Texts
{
SAY_ANNOUNCE_FEL_FIRESTORM = 0
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "InstanceScript.h"
#include "Map.h"

namespace BaradinHold
{
ObjectData const creatureData[] =
{
{ BOSS_ARGALOTH, DATA_ARGALOTH },
Expand Down Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@

#include <vector>

namespace BastionOfTwilight
{
enum PhaseTwist
{
// Events
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -219,5 +221,6 @@ AI* GetBastionOfTwilightAI(GameObject* go)
{
return GetInstanceAI<AI>(go, BoTScriptName);
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
#include "MotionMaster.h"
#include "Map.h"

namespace BastionOfTwilight::AscendantCouncil
{
enum Texts
{
// Ascendant Council
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "Vehicle.h"
#include "bastion_of_twilight.h"

namespace BastionOfTwilight::Chogall
{
enum Texts
{
// Cho'Gall
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "MotionMaster.h"
#include "bastion_of_twilight.h"

namespace BastionOfTwilight::HalfusWyrmbreaker
{
enum Spells
{
// Halfus Wyrmbreaker
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
#include "Map.h"
#include "bastion_of_twilight.h"

namespace BastionOfTwilight::TheralionAndValiona
{
enum Texts
{
// Theralion and Valiona
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#include "MotionMaster.h"
#include "TemporarySummon.h"

namespace BastionOfTwilight
{
ObjectData const creatureData[] =
{
{ BOSS_HALFUS_WYRMBREAKER, DATA_HALFUS_WYRMBREAKER },
Expand Down Expand Up @@ -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();
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "TemporarySummon.h"
#include "InstanceScript.h"

namespace BlackrockCaverns
{
/*#####
# npc_fire_cyclone
#####*/
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#include "CreatureAIImpl.h"
#include "Position.h"

namespace BlackrockCaverns
{
#define BCScriptName "instance_blackrock_caverns"
#define DataHeader "BRC"

Expand Down Expand Up @@ -109,5 +111,6 @@ inline AI* GetBlackrockCavernsAI(T* obj)
}

#define RegisterBlackrockCavernsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetBlackrockCavernsAI)
}

#endif // BLACKROCKCAVERNS_H_
Loading

0 comments on commit ea30806

Please sign in to comment.