Skip to content

Commit

Permalink
Protocol 10.10 fixed containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam committed Oct 9, 2013
1 parent 3aac0ac commit 778559c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

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

1 comment on commit 778559c

@TheSumm
Copy link
Collaborator

@TheSumm TheSumm commented on 778559c Oct 9, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes #358

Please sign in to comment.