diff options
author | Shauren <shauren.trinity@gmail.com> | 2022-12-20 01:03:58 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-12-20 01:03:58 +0100 |
commit | 21940405e009f5c1d201eb96d96ea251a3313af3 (patch) | |
tree | 1f9ec696204922f921ff1e32da3714f8706bd28c /src/server/game/Battlegrounds/Battleground.h | |
parent | 85d5f4bc0683d99cfaab244a8f0355b463f93267 (diff) |
Core/Battlegrounds: Made Battleground inherit ZoneScript
Closes #28480
Diffstat (limited to 'src/server/game/Battlegrounds/Battleground.h')
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 8096026b840..a1fe02d0881 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -22,6 +22,7 @@ #include "ObjectGuid.h" #include "Position.h" #include "SharedDefines.h" +#include "ZoneScript.h" #include <map> #include <vector> @@ -250,7 +251,7 @@ This class is used to: 3. some certain cases, same for all battlegrounds 4. It has properties same for all battlegrounds */ -class TC_GAME_API Battleground +class TC_GAME_API Battleground : public ZoneScript { public: Battleground(BattlegroundTemplate const* battlegroundTemplate); @@ -271,7 +272,7 @@ class TC_GAME_API Battleground virtual void DestroyGate(Player* /*player*/, GameObject* /*go*/) { } - void TriggerGameEvent(uint32 gameEventId); + void TriggerGameEvent(uint32 gameEventId, WorldObject* source = nullptr, WorldObject* target = nullptr) override; /* Battleground */ // Get methods: @@ -429,7 +430,7 @@ class TC_GAME_API Battleground virtual void EventPlayerClickedOnFlag(Player* /*player*/, GameObject* /*target_obj*/) { } void EventPlayerLoggedIn(Player* player); void EventPlayerLoggedOut(Player* player); - virtual void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/, WorldObject* /*invoker*/ = nullptr) { } + void ProcessEvent(WorldObject* /*obj*/, uint32 /*eventId*/, WorldObject* /*invoker*/) override { } // this function can be used by spell to interact with the BG map virtual void DoAction(uint32 /*action*/, ObjectGuid /*var*/) { } |