Core/RBAC: Create new permissions 'Allow to use CMSG_WORLD_TELEPORT opcode' and 'Allow to use CMSG_WHOIS opcode'

This commit is contained in:
Spp committed 2013-02-25 15:48:18 +01:00
1 parent e99dd15915
commit ea2e6052b2
3 files changed
+25 -2

No files matched your search

+2 -2
View File
@@ -1248,7 +1248,7 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recvData)
sLog->outDebug(LOG_FILTER_NETWORKIO, "CMSG_WORLD_TELEPORT: Player = %s, Time = %u, map = %u, x = %f, y = %f, z = %f, o = %f",
GetPlayer()->GetName().c_str(), time, mapid, PositionX, PositionY, PositionZ, Orientation);
if (AccountMgr::IsAdminAccount(GetSecurity()))
if (HasPermission(RBAC_PERM_OPCODE_WORLD_TELEPORT))
GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
else
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
@@ -1260,7 +1260,7 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recvData)
std::string charname;
recvData >> charname;
if (!AccountMgr::IsAdminAccount(GetSecurity()))
if (HasPermission(RBAC_PERM_OPCODE_WHOIS))
{
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
return;