From 2eca9af92c4eb9e6d34d43ac41817a6beb6f3bf1 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 27 Feb 2024 16:25:14 -0300 Subject: [PATCH] fix: gold pouch condition --- 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; }