From fd967652cefe640fc52054966b240346335abbae Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 16 Dec 2021 15:41:41 +0100 Subject: [PATCH 1/2] UI:SAVE:ENABLE_RUMORS enable/disbale rumours --- ryzom/client/src/game_context_menu.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ryzom/client/src/game_context_menu.cpp b/ryzom/client/src/game_context_menu.cpp index c3163225d..363abdd80 100644 --- a/ryzom/client/src/game_context_menu.cpp +++ b/ryzom/client/src/game_context_menu.cpp @@ -460,11 +460,14 @@ void CGameContextMenu::update() fameValue = pLeafFame->getValue8(); } + + bool enable_rumors = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:ENABLE_RUMORS")->getValueBool(); + if (_TextNews) - _TextNews->setActive(!UserEntity->isFighting() && !UserEntity->isRiding() && selection && !canAttack() && selection->isNPC() && fameValue >= -30); + _TextNews->setActive(enable_rumors && !UserEntity->isFighting() && !UserEntity->isRiding() && selection && !canAttack() && selection->isNPC() && fameValue >= -30); if (_TextNewsAgressive) - _TextNewsAgressive->setActive(!UserEntity->isFighting() && !UserEntity->isRiding() && selection && !canAttack() && selection->isNPC() && fameValue < -30); + _TextNewsAgressive->setActive(enable_rumors && !UserEntity->isFighting() && !UserEntity->isRiding() && selection && !canAttack() && selection->isNPC() && fameValue < -30); if (_TextDuel && _TextUnDuel) From ab842cfc00d5fc6939767b15cd463be11713230f Mon Sep 17 00:00:00 2001 From: Nuno Date: Thu, 16 Dec 2021 15:42:58 +0100 Subject: [PATCH 2/2] Right click and select a mission moves the player close to npc --- .../src/interface_v3/action_handler_game.cpp | 18 +++++++++++++++++- ryzom/client/src/user_entity.cpp | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ryzom/client/src/interface_v3/action_handler_game.cpp b/ryzom/client/src/interface_v3/action_handler_game.cpp index f05ffb271..eac07fa64 100644 --- a/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -497,7 +497,7 @@ REGISTER_ACTION_HANDLER(CHandlerContextCreateGuild, "context_create_guild"); // *************************************************************************** // GCM Mission option // *************************************************************************** -class CHandlerContextMissionOption : public IActionHandler +class CHandlerContextOpenMissionOption : public IActionHandler { public: void execute (CCtrlBase * /* pCaller */, const std::string &sParams) @@ -524,9 +524,25 @@ public: } } }; +REGISTER_ACTION_HANDLER(CHandlerContextOpenMissionOption, "open_mission_option"); + + +class CHandlerContextMissionOption : public IActionHandler +{ +public: + void execute (CCtrlBase * /* pCaller */, const std::string &sParams) + { + std::string id = getParam(sParams, "id"); + sint intId; + if (!fromString(id, intId)) return; + UserEntity->moveToMission(UserEntity->targetSlot(), 3.0, intId); + } +}; REGISTER_ACTION_HANDLER(CHandlerContextMissionOption, "mission_option"); + + // *************************************************************************** // GCM Missions // *************************************************************************** diff --git a/ryzom/client/src/user_entity.cpp b/ryzom/client/src/user_entity.cpp index 90d4b28b6..2f74ca19d 100644 --- a/ryzom/client/src/user_entity.cpp +++ b/ryzom/client/src/user_entity.cpp @@ -1611,7 +1611,7 @@ void CUserEntity::moveToAction(CEntityCL *ent) case CUserEntity::Mission: { string param = toString("id=%d", _MoveToMissionId); - CAHManager::getInstance()->runActionHandler("mission_option", 0, param); + CAHManager::getInstance()->runActionHandler("open_mission_option", 0, param); } break; // Dynamic Mission