aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.h
diff options
context:
space:
mode:
authorJeremy <Golrag@users.noreply.github.com>2024-03-28 19:29:22 +0100
committerGitHub <noreply@github.com>2024-03-28 19:29:22 +0100
commitbe11f42a16d1fa0482e9572bf54e99e4dedd3c78 (patch)
tree3d33413d7ed5cada34d7ced7f430380731160d5b /src/server/game/Maps/Map.h
parent78635f640ee3b632a487a50dcf492ae62c2a0933 (diff)
Core/Battlegrounds: Move to scripts (#29799)
* Introduce new BattlegroundScript class for map/bg specific scripts * Remove all sub, zone specific, battleground classes except Arena * Move all bg zone scripts to new BattlegroundScripts class in script folder * Remove ZoneScript from Battleground class * Remove some unused hooks from Battleground
Diffstat (limited to 'src/server/game/Maps/Map.h')
-rw-r--r--src/server/game/Maps/Map.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/Maps/Map.h b/src/server/game/Maps/Map.h
index 0339d92a6ee..901e03e0264 100644
--- a/src/server/game/Maps/Map.h
+++ b/src/server/game/Maps/Map.h
@@ -46,6 +46,7 @@
class Battleground;
class BattlegroundMap;
+class BattlegroundScript;
class CreatureGroup;
class GameObjectModel;
class Group;
@@ -909,12 +910,22 @@ class TC_GAME_API BattlegroundMap : public Map
void SetUnload();
//void UnloadAll(bool pForce);
void RemoveAllPlayers() override;
+ void Update(uint32 diff) override;
virtual void InitVisibilityDistance() override;
Battleground* GetBG() const { return m_bg; }
void SetBG(Battleground* bg) { m_bg = bg; }
+
+ uint32 GetScriptId() const { return _scriptId; }
+ std::string const& GetScriptName() const;
+ BattlegroundScript* GetBattlegroundScript() { return _battlegroundScript.get(); }
+ BattlegroundScript const* GetBattlegroundScript() const { return _battlegroundScript.get(); }
+
+ void InitScriptData();
private:
Battleground* m_bg;
+ std::unique_ptr<BattlegroundScript> _battlegroundScript;
+ uint32 _scriptId;
};
template<class T, class CONTAINER>