Protocol 10.10 fixed containers

master
Sam 11 years ago
parent 3aac0ac0ec
commit 778559c7b9

@ -629,10 +629,10 @@ void ProtocolGame::parseCloseContainer(const InputMessagePtr& msg)
void ProtocolGame::parseContainerAddItem(const InputMessagePtr& msg) void ProtocolGame::parseContainerAddItem(const InputMessagePtr& msg)
{ {
int containerId = msg->getU8(); int containerId = msg->getU8();
ItemPtr item = getItem(msg);
if(g_game.getFeature(Otc::GameContainerPagination)) { if(g_game.getFeature(Otc::GameContainerPagination)) {
msg->getU16(); // slot msg->getU16(); // slot
} }
ItemPtr item = getItem(msg);
g_game.processContainerAddItem(containerId, item); g_game.processContainerAddItem(containerId, item);
} }
@ -655,7 +655,10 @@ void ProtocolGame::parseContainerRemoveItem(const InputMessagePtr& msg)
int slot; int slot;
if(g_game.getFeature(Otc::GameContainerPagination)) { if(g_game.getFeature(Otc::GameContainerPagination)) {
slot = msg->getU16(); slot = msg->getU16();
getItem(msg);
int itemId = msg->getU16();
if(itemId != 0)
getItem(msg, itemId);
} else { } else {
slot = msg->getU8(); slot = msg->getU8();
} }

Loading…
Cancel
Save