From a43d91ceafc92b7ca22cf8639330b072240e4e63 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 27 Feb 2024 16:48:25 -0300 Subject: [PATCH] fix: gold pouch condition (#2327) Close #2294 --- src/game/game.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index ddccb42dbcf..c17f16b1a17 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -5285,7 +5285,8 @@ void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t categor } std::shared_ptr container = thing->getContainer(); - if (!container || (container->getID() == ITEM_GOLD_POUCH && category != OBJECTCATEGORY_GOLD && !g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__))) { + auto allowConfig = !g_configManager().getBoolean(TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, __FUNCTION__) || !g_configManager().getBoolean(TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, __FUNCTION__); + if (!container || (container->getID() == ITEM_GOLD_POUCH && category != OBJECTCATEGORY_GOLD) && !allowConfig) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); return; }