From 4a5e0e2f3567265b9cd4e6f0cd00e3287fbedd08 Mon Sep 17 00:00:00 2001 From: ariel- Date: Mon, 1 Aug 2016 05:46:25 -0300 Subject: [PATCH] Core/Battlegrounds: do not teleport GMs if out of bounds before starting --- src/server/game/Battlegrounds/Battleground.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index dce7fe1c31d..44ff283f94a 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -290,8 +290,12 @@ inline void Battleground::_CheckSafePositions(uint32 diff) m_ValidStartPositionTimer = 0; for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) + { if (Player* player = ObjectAccessor::FindPlayer(itr->first)) { + if (player->IsGameMaster()) + continue; + Position pos = player->GetPosition(); Position const* startPos = GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(player->GetBGTeam())); if (pos.GetExactDistSq(startPos) > maxDist) @@ -300,6 +304,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff) player->TeleportTo(GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation()); } } + } } }