Skip to content

Commit

Permalink
fix: block gold pouch using in the obtain method (opentibiabr#2559)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlospess0a authored Apr 19, 2024
1 parent fceeac1 commit 955fdde
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 955fdde

Please sign in to comment.