From f3f5dc92d06cc2483b61e1a8e109f3c11b21fc37 Mon Sep 17 00:00:00 2001 From: MUN1Z Date: Mon, 20 Nov 2023 17:57:05 -0300 Subject: [PATCH] fix: adjustments to block move inbox store items to floor --- src/game/game.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/game/game.cpp b/src/game/game.cpp index 8d16fd624e6..a31720a773d 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -1102,6 +1102,17 @@ void Game::playerMoveThing(uint32_t playerId, const Position &fromPos, uint16_t playerMoveCreature(player, movingCreature, movingCreature->getPosition(), tile); } } else if (thing->getItem()) { + + if (thing->getItem()->isStoreItem()) { + // '0x40' -> To store inbox. + // '0x41' -> To depot. + // '0x42:0x50' -> To all depot slot. + if (toPos.y < 0x40 || toPos.y > 0x50) { + player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); + return; + } + } + std::shared_ptr toCylinder = internalGetCylinder(player, toPos); if (!toCylinder) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE);