aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-08-01 05:46:25 -0300
committerariel- <ariel-@users.noreply.github.com>2016-08-01 05:47:17 -0300
commit80a463bccb4275f77ce5dd6cd4ae33ee2ba90862 (patch)
tree6295d6a88d75e95d04652d9e82d2f49656e8f393 /src
parentbfda0ba91d2b686177f471052637f837f8a6c1c4 (diff)
Core/Battlegrounds: do not teleport GMs if out of bounds before starting
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index f33ee1ce9fc..79b07aa5b65 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -283,8 +283,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)
@@ -293,6 +297,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff)
player->TeleportTo(GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation());
}
}
+ }
}
}