From 139b03f0f16b0fa928efaa029ab745e2bf18c57f Mon Sep 17 00:00:00 2001 From: Ulu Kyn Date: Thu, 10 Oct 2019 12:46:23 +0200 Subject: [PATCH] Added: Add OBSERVER privs to teleport from map option --HG-- branch : atys --- code/ryzom/client/src/connection.cpp | 1 + code/ryzom/client/src/connection.h | 1 + code/ryzom/client/src/interface_v3/group_map.cpp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index dd776b7fb..1336a5495 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -183,6 +183,7 @@ bool hasPrivilegeSG() { return (UserPrivileges.find(":SG:") != std::string::npos bool hasPrivilegeG() { return (UserPrivileges.find(":G:") != std::string::npos); } bool hasPrivilegeEM() { return (UserPrivileges.find(":EM:") != std::string::npos); } bool hasPrivilegeEG() { return (UserPrivileges.find(":EG:") != std::string::npos); } +bool hasPrivilegeOBSERVER() { return (UserPrivileges.find(":OBSERVER:") != std::string::npos); } // Restore the video mode (fullscreen for example) after the connection (done in a window) diff --git a/code/ryzom/client/src/connection.h b/code/ryzom/client/src/connection.h index a424e80e9..a01da5151 100644 --- a/code/ryzom/client/src/connection.h +++ b/code/ryzom/client/src/connection.h @@ -51,6 +51,7 @@ bool hasPrivilegeG(); bool hasPrivilegeEM(); bool hasPrivilegeEG(); bool hasPrivilegeVG(); +bool hasPrivilegeOBSERVER(); // connection with the server. (login, shard list, etc.). diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 66c967353..a5d0c4470 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -2646,7 +2646,7 @@ void CGroupMap::createContinentLandMarks() static void hideTeleportButtonsInPopupMenuIfNotEnoughPriv() { - bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG()); + bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()); CInterfaceManager *im = CInterfaceManager::getInstance(); CInterfaceElement *ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:map_menu:teleport");