mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 07:57:12 +01:00
Add sell all button to NPC trade
This commit is contained in:
@@ -698,9 +698,14 @@ void ProtocolGame::parsePlayerGoods(const InputMessagePtr& msg)
|
||||
int size = msg->getU8();
|
||||
for(int i = 0; i < size; i++) {
|
||||
int itemId = msg->getU16();
|
||||
int count = msg->getU8();
|
||||
int amount;
|
||||
|
||||
goods.push_back(std::make_tuple(Item::create(itemId), count));
|
||||
if(g_game.getFeature(Otc::GameDoubleShopSellAmount))
|
||||
amount = msg->getU16();
|
||||
else
|
||||
amount = msg->getU8();
|
||||
|
||||
goods.push_back(std::make_tuple(Item::create(itemId), amount));
|
||||
}
|
||||
|
||||
g_game.processPlayerGoods(money, goods);
|
||||
|
||||
Reference in New Issue
Block a user