Skip to content

Commit

Permalink
fix: gold pouch condition (#2327)
Browse files Browse the repository at this point in the history
Close #2294
  • Loading branch information
omarcopires authored Feb 27, 2024
1 parent ecd84ca commit a43d91c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5285,7 +5285,8 @@ void Game::playerSetManagedContainer(uint32_t playerId, ObjectCategory_t categor
}

std::shared_ptr<Container> 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;
}
Expand Down

0 comments on commit a43d91c

Please sign in to comment.