From fdaad96c9547b4cc19125a5864dff836b05b1a3f Mon Sep 17 00:00:00 2001 From: Carlos Pessoa Date: Thu, 18 Apr 2024 23:32:58 -0300 Subject: [PATCH 1/2] fix: gold pouch using in the Obtain method --- src/game/game.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/game.cpp b/src/game/game.cpp index cac0b596ebf..5e5485e657a 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -5384,6 +5384,11 @@ void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t categor return; } + if (container->getID() == ITEM_GOLD_POUCH && !isLootContainer) { + player->sendTextMessage(MESSAGE_FAILURE, "You can only set the gold pouch as a loot container."); + return; + } + if (container->getHoldingPlayer() != player) { player->sendCancelMessage("You must be holding the container to set it as a loot container."); return; From ea99fa6be57e99c43af1c865c0bb52bb6ca5c277 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 19 Apr 2024 02:33:36 +0000 Subject: [PATCH 2/2] Code format - (Clang-format) --- src/game/game.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index 5e5485e657a..a11fde62c2c 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -5385,9 +5385,9 @@ void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t categor } if (container->getID() == ITEM_GOLD_POUCH && !isLootContainer) { - player->sendTextMessage(MESSAGE_FAILURE, "You can only set the gold pouch as a loot container."); - return; - } + player->sendTextMessage(MESSAGE_FAILURE, "You can only set the gold pouch as a loot container."); + return; + } if (container->getHoldingPlayer() != player) { player->sendCancelMessage("You must be holding the container to set it as a loot container.");