Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Nov 14, 2024
1 parent ab4ca50 commit b157da4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/BattleGround/BattleGroundMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class BattleGroundMgr

uint32 CreateBattleGround(BattleGroundTypeId /*bgTypeId*/, uint32 /*minPlayersPerTeam*/, uint32 /*maxPlayersPerTeam*/, uint32 /*levelMin*/, uint32 /*levelMax*/, char const* /*battleGroundName*/, uint32 /*mapId*/, float /*team1StartLocX*/, float /*team1StartLocY*/, float /*team1StartLocZ*/, float /*team1StartLocO*/, float /*team2StartLocX*/, float /*team2StartLocY*/, float /*team2StartLocZ*/, float /*team2StartLocO*/, float /*startMaxDist*/, uint32 /*playerSkinReflootId*/);

void AddBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId, BattleGround* bg);;
void AddBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId, BattleGround* bg);
void RemoveBattleGround(uint32 instanceId, BattleGroundTypeId bgTypeId) { m_battleGrounds[bgTypeId].erase(instanceId); }

void CreateInitialBattleGrounds();
Expand Down
3 changes: 3 additions & 0 deletions src/game/Maps/Map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,9 @@ void BattleGroundMap::Update(const uint32& diff)
{
Map::Update(diff);

if (!m_bg)
return;

if (!m_bg->GetPlayersSize())
{
// BG is empty
Expand Down

0 comments on commit b157da4

Please sign in to comment.