From f7faf20254a120a90b8ee8eb55a284a6351aabc3 Mon Sep 17 00:00:00 2001 From: Carbenium Date: Mon, 22 Jun 2020 16:10:34 +0200 Subject: Battlefields: Move BF scripts out of game This commit introduces the usual script interface for battlefields. --- src/server/game/Scripting/ScriptMgr.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/server/game/Scripting/ScriptMgr.h') diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index 8f5199b860c..f255a3b06a3 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -26,6 +26,7 @@ class AccountMgr; class AuctionHouseObject; class Aura; class AuraScript; +class Battlefield; class Battleground; class BattlegroundMap; class Channel; @@ -463,6 +464,17 @@ class TC_GAME_API OnlyOnceAreaTriggerScript : public AreaTriggerScript void ResetAreaTriggerDone(Player const* /*player*/, AreaTriggerEntry const* /*trigger*/); }; +class TC_GAME_API BattlefieldScript : public ScriptObject +{ + protected: + + BattlefieldScript(char const* name); + + public: + + virtual Battlefield* GetBattlefield() const = 0; +}; + class TC_GAME_API BattlegroundScript : public ScriptObject { protected: @@ -938,6 +950,10 @@ class TC_GAME_API ScriptMgr bool OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger); + public: /* BattlefieldScript */ + + Battlefield* CreateBattlefield(uint32 scriptId); + public: /* BattlegroundScript */ Battleground* CreateBattleground(BattlegroundTypeId typeId); -- cgit v1.2.3