From 778559c7b9cd182f9ce94df6badbce1926df6469 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 9 Oct 2013 17:58:58 +0200 Subject: [PATCH] Protocol 10.10 fixed containers --- src/client/protocolgameparse.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 42255e43..f216ebf7 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -629,10 +629,10 @@ void ProtocolGame::parseCloseContainer(const InputMessagePtr& msg) void ProtocolGame::parseContainerAddItem(const InputMessagePtr& msg) { int containerId = msg->getU8(); - ItemPtr item = getItem(msg); if(g_game.getFeature(Otc::GameContainerPagination)) { msg->getU16(); // slot } + ItemPtr item = getItem(msg); g_game.processContainerAddItem(containerId, item); } @@ -655,7 +655,10 @@ void ProtocolGame::parseContainerRemoveItem(const InputMessagePtr& msg) int slot; if(g_game.getFeature(Otc::GameContainerPagination)) { slot = msg->getU16(); - getItem(msg); + + int itemId = msg->getU16(); + if(itemId != 0) + getItem(msg, itemId); } else { slot = msg->getU8(); }