Skip to content

Commit

Permalink
Chat: Disallow tping to bg or arena using go xyz command
Browse files Browse the repository at this point in the history
  • Loading branch information
killerwife committed Aug 26, 2023
1 parent 36a62f0 commit 2be3ec7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/game/Chat/Level1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,15 @@ bool ChatHandler::HandleGoXYZCommand(char* args)
float z = (float)atof(pz);
uint32 mapid;
if (pmapid)
{
mapid = (uint32)atoi(pmapid);
MapEntry const* mapEntry = sMapStore.LookupEntry(mapid);
if (!mapEntry || mapEntry->IsBattleGroundOrArena())
{
PSendSysMessage("Map %u is battleground or arena. Not allowed through XYZ command.", mapid);
return false;
}
}
else
mapid = _player->GetMapId();

Expand Down

0 comments on commit 2be3ec7

Please sign in to comment.