From 0cc7a35dad52c6e99e1636f022f708b8c0750e14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Sat, 27 Nov 2021 21:21:12 +0000 Subject: [PATCH 1/2] Merge selfkill --- ryzom/client/src/commands.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ryzom/client/src/commands.cpp b/ryzom/client/src/commands.cpp index 00d2b9e4f..18f2eb779 100644 --- a/ryzom/client/src/commands.cpp +++ b/ryzom/client/src/commands.cpp @@ -408,6 +408,18 @@ NLMISC_COMMAND(afk, "Set the player as 'away from keyboard'","[]") return true; } +NLMISC_COMMAND(selfkill, "Kill the player ","") +{ + CBitMemStream out; + if(!GenericMsgHeaderMngr.pushNameToStream("COMMAND:SELFKILL", out)) + { + nlwarning("Unknown message name COMMAND:SELFKILL"); + return false; + } + NetMngr.push(out); + return true; +} + bool randomCheckCharset(std::string const& str) { std::string::const_iterator it, itEnd = str.end(); From e1b611f2199e5110b975bd2d07588fe3b6825ff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Sat, 27 Nov 2021 21:21:26 +0000 Subject: [PATCH 2/2] Inventory fixes --- ryzom/client/src/interface_v3/action_handler_item.cpp | 7 +++---- .../src/interface_v3/interface_expr_user_fct_game.cpp | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ryzom/client/src/interface_v3/action_handler_item.cpp b/ryzom/client/src/interface_v3/action_handler_item.cpp index 9bbf9fbc8..8870a9f21 100644 --- a/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -1960,16 +1960,15 @@ class CHandlerItemMenuCheck : public IActionHandler for(i=0;isetActive(invId!=INVENTORIES::guild && - (uint)invId!=INVENTORIES::pet_animal+i && + pMoveToPa[i]->setActive((uint)invId!=INVENTORIES::pet_animal+i && invMngr.isInventoryPresent((INVENTORIES::TInventory)(INVENTORIES::pet_animal+i)) ); } if (pMoveToGuild) - pMoveToGuild->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::guild)); + pMoveToGuild->setActive(invId!=INVENTORIES::guild && invMngr.isInventoryPresent(INVENTORIES::guild)); if (pMoveToRoom) - pMoveToRoom->setActive(invId==INVENTORIES::bag && invMngr.isInventoryPresent(INVENTORIES::player_room)); + pMoveToRoom->setActive(invId!=INVENTORIES::player_room && invMngr.isInventoryPresent(INVENTORIES::player_room)); // std case: can drop / destroy if(pDrop) pDrop->setActive(invId!=INVENTORIES::guild); diff --git a/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp b/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp index 4c21fee47..b6dde9379 100644 --- a/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp +++ b/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp @@ -799,7 +799,11 @@ static DECLARE_INTERFACE_USER_FCT(getAnimalInventoryStateText) // According to server status, change the inventory text uint status= (uint)args[0].getInteger(); - if(ANIMAL_STATUS::isInStable((ANIMAL_STATUS::EAnimalStatus)status)) + if(ANIMAL_STATUS::isInBag((ANIMAL_STATUS::EAnimalStatus)status)) + { + result.setString("uiAnimalInBag"); + } + else if(ANIMAL_STATUS::isInStable((ANIMAL_STATUS::EAnimalStatus)status)) { result.setString("uiAnimalInStable"); }