diff options
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.cpp | 3 | ||||
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 67f47e2733d..9d123881401 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1449,7 +1449,10 @@ void Battleground::SetBgMap(BattlegroundMap* map) { m_Map = map; if (map) + { _pvpStatIds = sDB2Manager.GetPVPStatIDsForMap(map->GetId()); + OnMapSet(map); + } else _pvpStatIds = nullptr; } diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 843f1c57f1d..a3e0ca3ee32 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -494,6 +494,9 @@ class TC_GAME_API Battleground : public ZoneScript return &itr->second; } + // Called when valid BattlegroundMap is assigned to the battleground + virtual void OnMapSet([[maybe_unused]] BattlegroundMap* map) { } + protected: // this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground void EndNow(); |