Core/ChatCommands: Allow to use "tele" command inside of a battleground

Allow GameMasters with ".gm on" tag to use ".tele" command inside of a battleground to tele around.

(cherry picked from commit 0b9cd22a6b)
This commit is contained in:
jackpoz
2015-06-15 21:35:05 +02:00
committed by DDuarte
parent e4e903ba95
commit d9133adbb7

View File

@@ -319,7 +319,7 @@ public:
}
MapEntry const* map = sMapStore.LookupEntry(tele->mapId);
if (!map || map->IsBattlegroundOrArena())
if (!map || (map->IsBattlegroundOrArena() && (me->GetMapId() != tele->mapId || !me->IsGameMaster())))
{
handler->SendSysMessage(LANG_CANNOT_TELE_TO_BG);
handler->SetSentErrorMessage(true);