Scripts/World: moved all scripts into their own respective namespaces

This commit is contained in:
Ovahlord committed 2023-12-08 19:47:17 +01:00
1 parent cd107956f5
commit d5f1aea2d2
12 files changed
+59 -5

No files matched your search

@@ -21,6 +21,8 @@
#include "Player.h"
#include "Creature.h"
namespace AchievementScripts
{
class achievement_arena_kills : public AchievementCriteriaScript
{
public:
@@ -107,9 +109,11 @@ class achievement_killed_exp_or_honor_target : public AchievementCriteriaScript
return target && player->isHonorOrXPTarget(target);
}
};
}
void AddSC_achievement_scripts()
{
using namespace AchievementScripts;
new achievement_arena_kills("achievement_arena_2v2_kills", ARENA_TYPE_2v2);
new achievement_arena_kills("achievement_arena_3v3_kills", ARENA_TYPE_3v3);
new achievement_arena_kills("achievement_arena_5v5_kills", ARENA_TYPE_5v5);
@@ -20,6 +20,8 @@
#include "Player.h"
#include "WorldSession.h"
namespace ActionIpLogger
{
enum IPLoggingTypes
{
@@ -305,10 +307,11 @@ public:
return;
}
};
}
void AddSC_action_ip_logger()
{
using namespace ActionIpLogger;
new AccountActionIpLogger();
new CharacterActionIpLogger();
new CharacterDeleteActionIpLogger();
@@ -44,6 +44,8 @@ EndContentData */
#include "ScriptedCreature.h"
#include "TemporarySummon.h"
namespace AreatriggerScripts
{
/*######
## at_coilfang_waterfall
######*/
@@ -464,9 +466,11 @@ public:
return true;
}
};
}
void AddSC_areatrigger_scripts()
{
using namespace AreatriggerScripts;
new AreaTrigger_at_coilfang_waterfall();
new AreaTrigger_at_legion_teleporter();
new AreaTrigger_at_stormwright_shelf();
+4
View File
@@ -22,6 +22,8 @@
#include "Log.h"
#include "Player.h"
namespace ChatLog
{
class ChatLogScript : public PlayerScript
{
public:
@@ -152,8 +154,10 @@ class ChatLogScript : public PlayerScript
}
}
};
}
void AddSC_chat_log()
{
using namespace ChatLog;
new ChatLogScript();
}
+4
View File
@@ -24,6 +24,8 @@
#include "SpellMgr.h"
#include "World.h"
namespace DuelReset
{
class DuelResetScript : public PlayerScript
{
public:
@@ -108,8 +110,10 @@ class DuelResetScript : public PlayerScript
pet->GetSpellHistory()->ResetAllCooldowns();
}
};
}
void AddSC_duel_reset()
{
using namespace DuelReset;
new DuelResetScript();
}
+5
View File
@@ -59,6 +59,9 @@ EndContentData */
#include "TemporarySummon.h"
#include "WorldSession.h"
namespace GoScripts
{
/*######
## go_cat_figurine
######*/
@@ -1941,9 +1944,11 @@ struct go_cauldron_of_battle : public GameObjectAI
}
}
};
}
void AddSC_go_scripts()
{
using namespace GoScripts;
new go_cat_figurine();
new go_barov_journal();
new go_gilded_brazier();
+5
View File
@@ -36,6 +36,9 @@ EndContentData */
#include "ScriptedCreature.h"
#include "SpellInfo.h"
namespace Guards
{
enum GuardGeneric
{
GENERIC_CREATURE_COOLDOWN = 5000,
@@ -409,9 +412,11 @@ public:
return new guard_shattrath_aldorAI(creature);
}
};
}
void AddSC_guards()
{
using namespace Guards;
new guard_generic();
new guard_shattrath_aldor();
new guard_shattrath_scryer();
@@ -38,6 +38,9 @@ EndContentData */
#include "SpellMgr.h"
#include "TemporarySummon.h"
namespace ItemScripts
{
/*#####
# item_only_for_flight
#####*/
@@ -409,9 +412,11 @@ class item_generic_limit_chance_above_60 : public ItemScript
return true;
}
};
}
void AddSC_item_scripts()
{
using namespace ItemScripts;
new item_only_for_flight();
new item_nether_wraith_beacon();
new item_gor_dreks_ointment();
@@ -21,6 +21,9 @@
#include "SpellInfo.h"
#include "SpellMgr.h"
namespace MobGenericCreature
{
class trigger_periodic : public CreatureScript
{
public:
@@ -56,8 +59,10 @@ public:
return new trigger_periodicAI(creature);
}
};
}
void AddSC_generic_creature()
{
using namespace MobGenericCreature;
new trigger_periodic();
}
+9 -4
View File
@@ -30,6 +30,9 @@ EndScriptData */
#include "Player.h"
#include "WorldSession.h"
namespace NpcInnkeeper
{
enum Spells
{
SPELL_TRICK_OR_TREATED = 24755,
@@ -38,18 +41,18 @@ enum Spells
#define LOCALE_TRICK_OR_TREAT_0 "Trick or Treat!"
#define LOCALE_TRICK_OR_TREAT_2 "Des bonbons ou des blagues!"
#define LOCALE_TRICK_OR_TREAT_3 "Süßes oder Saures!"
#define LOCALE_TRICK_OR_TREAT_6 "¡Truco o trato!"
#define LOCALE_TRICK_OR_TREAT_3 "Süßes oder Saures!"
#define LOCALE_TRICK_OR_TREAT_6 "¡Truco o trato!"
#define LOCALE_INNKEEPER_0 "Make this inn my home."
#define LOCALE_INNKEEPER_2 "Faites de cette auberge votre foyer."
#define LOCALE_INNKEEPER_3 "Ich möchte dieses Gasthaus zu meinem Heimatort machen."
#define LOCALE_INNKEEPER_3 "Ich möchte dieses Gasthaus zu meinem Heimatort machen."
#define LOCALE_INNKEEPER_6 "Fija tu hogar en esta taberna."
#define LOCALE_VENDOR_0 "I want to browse your goods."
#define LOCALE_VENDOR_2 "Je voudrais regarder vos articles."
#define LOCALE_VENDOR_3 "Ich sehe mich nur mal um."
#define LOCALE_VENDOR_6 "Quiero ver tus mercancías."
#define LOCALE_VENDOR_6 "Quiero ver tus mercancías."
class npc_innkeeper : public CreatureScript
{
@@ -162,8 +165,10 @@ class npc_innkeeper : public CreatureScript
return new npc_innkeeperAI(creature);
}
};
}
void AddSC_npc_innkeeper()
{
using namespace NpcInnkeeper;
new npc_innkeeper();
}
@@ -32,6 +32,9 @@ EndScriptData */
#include "SpellMgr.h"
#include "WorldSession.h"
namespace NpcProfessions
{
/*
A few notes for future developement:
- It's possible blacksmithing still require some tweaks and adjustments due to the way we _have_ to use reputation.
@@ -1085,9 +1088,11 @@ enum MultiProfessionTrainer
GOSSIP_MENU_LEATHERWORKING = 12198,
GOSSIP_MENU_TAILORING = 12199
};
}
void AddSC_npc_professions()
{
using namespace NpcProfessions;
new npc_prof_blacksmith();
new npc_engineering_tele_trinket();
new npc_prof_leather();
@@ -38,6 +38,9 @@
#include "Vehicle.h"
#include "World.h"
namespace NpcSpecial
{
/*########
# npc_air_force_bots
#########*/
@@ -3142,9 +3145,11 @@ private:
EventMap _events;
bool _hit;
};
}
void AddSC_npcs_special()
{
using namespace NpcSpecial;
new npc_air_force_bots();
new npc_chicken_cluck();
new npc_dancing_flames();