diff options
author | ariel- <ariel-@users.noreply.github.com> | 2016-08-01 05:46:25 -0300 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-02-11 21:09:01 +0100 |
commit | 41fad95ad87458ad642d209d470bbb79697d0be3 (patch) | |
tree | c1440d7e0ea90e93bafa9726b9ee677844fdf531 | |
parent | 5264374fd657b5e42811631ab9a6d94e539aea46 (diff) |
Core/Battlegrounds: do not teleport GMs if out of bounds before starting
(cherry picked from commit 80a463bccb4275f77ce5dd6cd4ae33ee2ba90862)
-rw-r--r-- | src/server/game/Battlegrounds/Battleground.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 2e8ffaad876..32c964d171d 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -299,8 +299,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) @@ -309,6 +313,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff) player->TeleportTo(GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation()); } } + } } } |