Protocol 10.10 fixed containers

This commit is contained in:
Sam 2013-10-09 17:58:58 +02:00
parent 3aac0ac0ec
commit 778559c7b9
1 changed files with 5 additions and 2 deletions

View File

@ -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();
}