From 8cd863ff443190b30f0173cb96c5a4a63e323cd6 Mon Sep 17 00:00:00 2001 From: Riasan Date: Mon, 22 Feb 2021 16:13:02 +0100 Subject: [PATCH] Added: new privs TESTER for teleport via Map / Command --- code/ryzom/client/src/connection.cpp | 1 + code/ryzom/client/src/connection.h | 1 + code/ryzom/client/src/game_context_menu.cpp | 2 +- code/ryzom/client/src/interface_v3/group_map.cpp | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 82564354e..b4d7b5296 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -193,6 +193,7 @@ 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); } +bool hasPrivilegeTESTER() { return (UserPrivileges.find(":TESTER:") != 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 79a72fb0e..72a44d31c 100644 --- a/code/ryzom/client/src/connection.h +++ b/code/ryzom/client/src/connection.h @@ -52,6 +52,7 @@ bool hasPrivilegeEM(); bool hasPrivilegeEG(); bool hasPrivilegeVG(); bool hasPrivilegeOBSERVER(); +bool hasPrivilegeTESTER(); // connection with the server. (login, shard list, etc.). diff --git a/code/ryzom/client/src/game_context_menu.cpp b/code/ryzom/client/src/game_context_menu.cpp index 78e58c4b5..1306c0704 100644 --- a/code/ryzom/client/src/game_context_menu.cpp +++ b/code/ryzom/client/src/game_context_menu.cpp @@ -267,7 +267,7 @@ void CGameContextMenu::update() setupContextMenuCantTalk(); // can't talk by default - bool showGMOptions = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()); + bool showGMOptions = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER() || hasPrivilegeTESTER()); if (_TextInvisible) _TextInvisible->setActive(showGMOptions); diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 9bae00d6c..35a1fc4e6 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -2654,7 +2654,7 @@ void CGroupMap::createContinentLandMarks() static void hideTeleportButtonsInPopupMenuIfNotEnoughPriv() { - bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()); + bool showTeleport = (hasPrivilegeDEV() || hasPrivilegeSGM() || hasPrivilegeGM() || hasPrivilegeVG() || hasPrivilegeSG() || hasPrivilegeEM() || hasPrivilegeEG() || hasPrivilegeOBSERVER()|| hasPrivilegeTESTER()); CInterfaceManager *im = CInterfaceManager::getInstance(); CInterfaceElement *ie = CWidgetManager::getInstance()->getElementFromId("ui:interface:map_menu:teleport");