summaryrefslogtreecommitdiff
path: root/src/map/buyingstore.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-07-10 05:35:29 +0300
committerAndrei Karas <akaras@inbox.ru>2018-07-15 20:36:25 +0300
commitb8d36d894c8e1c931ba2143c763cd2e562c8572e (patch)
tree3ba193955434d8da2392dfc8c29aef8de7d1ccdf /src/map/buyingstore.c
parentd172c28f9b25a780235c7c7a7f4db9ca9866f531 (diff)
downloadhercules-b8d36d894c8e1c931ba2143c763cd2e562c8572e.tar.gz
hercules-b8d36d894c8e1c931ba2143c763cd2e562c8572e.tar.bz2
hercules-b8d36d894c8e1c931ba2143c763cd2e562c8572e.tar.xz
hercules-b8d36d894c8e1c931ba2143c763cd2e562c8572e.zip
Update packet CZ_REQ_TRADE_BUYING_STORE.
Diffstat (limited to 'src/map/buyingstore.c')
-rw-r--r--src/map/buyingstore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index 03a63291d..4b853bf75 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -241,7 +241,7 @@ static void buyingstore_open(struct map_session_data *sd, int account_id)
clif->buyingstore_itemlist(sd, pl_sd);
}
-static void buyingstore_trade(struct map_session_data *sd, int account_id, unsigned int buyer_id, const uint8 *itemlist, unsigned int count)
+static void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int buyer_id, const struct PACKET_CZ_REQ_TRADE_BUYING_STORE_sub* itemlist, unsigned int count)
{
int zeny = 0;
unsigned int i, weight, listidx, k;
@@ -292,9 +292,9 @@ static void buyingstore_trade(struct map_session_data *sd, int account_id, unsig
unsigned short nameid, amount;
int index;
- index = RBUFW(itemlist,i*6+0)-2;
- nameid = RBUFW(itemlist,i*6+2);
- amount = RBUFW(itemlist,i*6+4);
+ index = itemlist[i].index - 2;
+ nameid = itemlist[i].itemId;
+ amount = itemlist[i].amount;
if( i )
{// duplicate check. as the client does this too, only malicious intent should be caught here