summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/buyingstore.c2
-rw-r--r--src/map/clif.c27
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/packets.h1
4 files changed, 23 insertions, 9 deletions
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index 58a1f925f..d2e2a2c20 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -383,7 +383,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int
// notify clients
clif->buyingstore_delete_item(sd, index, amount, pl_sd->buyingstore.items[listidx].price);
- clif->buyingstore_update_item(pl_sd, nameid, amount);
+ clif->buyingstore_update_item(pl_sd, nameid, amount, sd->status.char_id, zeny);
}
if( map->save_settings&128 ) {
diff --git a/src/map/clif.c b/src/map/clif.c
index eb6f848e9..7e4f6b825 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16911,18 +16911,31 @@ void clif_buyingstore_trade_failed_buyer(struct map_session_data* sd, short resu
/// Updates the zeny limit and an item in the buying store item list (ZC_UPDATE_ITEM_FROM_BUYING_STORE).
/// 081b <name id>.W <amount>.W <limit zeny>.L
-void clif_buyingstore_update_item(struct map_session_data* sd, unsigned short nameid, unsigned short amount)
+void clif_buyingstore_update_item(struct map_session_data* sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny)
{
int fd;
+#if PACKETVER < 20141016 // TODO : not sure for client date [Napster]
+ const int cmd = 0x81b;
+#else
+ const int cmd = 0x9e6;
+#endif
+ const int len = packet_len(cmd);
nullpo_retv(sd);
fd = sd->fd;
- WFIFOHEAD(fd,packet_len(0x81b));
- WFIFOW(fd,0) = 0x81b;
- WFIFOW(fd,2) = nameid;
- WFIFOW(fd,4) = amount; // amount of nameid received
- WFIFOL(fd,6) = sd->buyingstore.zenylimit;
- WFIFOSET(fd,packet_len(0x81b));
+ WFIFOHEAD(fd, len);
+ WFIFOW(fd, 0) = cmd;
+ WFIFOW(fd, 2) = nameid;
+ WFIFOW(fd, 4) = amount; // amount of nameid received
+#if PACKETVER < 20141016
+ WFIFOL(fd, 6) = sd->buyingstore.zenylimit;
+#else
+ WFIFOL(fd, 6) = zeny; // zeny
+ WFIFOL(fd, 10) = sd->buyingstore.zenylimit;
+ WFIFOL(fd, 14) = char_id; // GID
+ WFIFOL(fd, 18) = (int)time(NULL); // date
+#endif
+ WFIFOSET(fd, len);
}
/// Deletes item from inventory, that was sold to a buying store (ZC_ITEM_DELETE_BUYING_STORE).
diff --git a/src/map/clif.h b/src/map/clif.h
index 60c03d6e0..8f6950666 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -1058,7 +1058,7 @@ struct clif_interface {
void (*buyingstore_disappear_entry_single) (struct map_session_data* sd, struct map_session_data* pl_sd);
void (*buyingstore_itemlist) (struct map_session_data* sd, struct map_session_data* pl_sd);
void (*buyingstore_trade_failed_buyer) (struct map_session_data* sd, short result);
- void (*buyingstore_update_item) (struct map_session_data* sd, unsigned short nameid, unsigned short amount);
+ void (*buyingstore_update_item) (struct map_session_data* sd, unsigned short nameid, unsigned short amount, uint32 char_id, int zeny);
void (*buyingstore_delete_item) (struct map_session_data* sd, short index, unsigned short amount, int price);
void (*buyingstore_trade_failed_seller) (struct map_session_data* sd, short result, unsigned short nameid);
/* search store-related */
diff --git a/src/map/packets.h b/src/map/packets.h
index 236728bf8..33fa5236d 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -2821,6 +2821,7 @@ packet(0x96e,-1,clif->ackmergeitems);
packet(0x09DF,7);
packet(0x0a00,269);
packet(0x09e5,18); // ZC_DELETEITEM_FROM_MCSTORE2
+ packet(0x09e6,22); // ZC_UPDATE_ITEM_FROM_BUYING_STORE2
#endif
/* Roulette System [Yommy/Hercules] */