diff options
author | shennetsind <ind@henn.et> | 2013-05-16 18:21:41 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-16 18:21:41 -0300 |
commit | cb9b70eae92e401f4b644b95d2fa87e781d5ce82 (patch) | |
tree | bfaf32d1c8c98e286be645431a2d9192d9ae9402 /src/map/clif.c | |
parent | 7f7ec56cb5832b6c6899b9d7c9a43c16f3aea0d5 (diff) | |
download | hercules-cb9b70eae92e401f4b644b95d2fa87e781d5ce82.tar.gz hercules-cb9b70eae92e401f4b644b95d2fa87e781d5ce82.tar.bz2 hercules-cb9b70eae92e401f4b644b95d2fa87e781d5ce82.tar.xz hercules-cb9b70eae92e401f4b644b95d2fa87e781d5ce82.zip |
Fixed cash shop for 2011-11-22
Special Thanks to Yommy, and M45T3R!
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 15d6aeb9d..0c5143ffd 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -16869,7 +16869,27 @@ void clif_parse_CashShopBuy(int fd, struct map_session_data *sd) { } } +/* [Ind/Hercules] */ +void clif_parse_CashShopReqTab(int fd, struct map_session_data *sd) { + short tab = RFIFOW(fd, 2); + int j; + if( tab < 0 || tab > CASHSHOP_TAB_MAX ) + return; + + WFIFOHEAD(fd, 10 + ( clif->cs.item_count[tab] * 6 ) ); + WFIFOW(fd, 0) = 0x8c0; + WFIFOW(fd, 2) = 10 + ( clif->cs.item_count[tab] * 6 ); + WFIFOL(fd, 4) = tab; + WFIFOW(fd, 8) = clif->cs.item_count[tab]; + + for( j = 0; j < clif->cs.item_count[tab]; j++ ) { + WFIFOW(fd, 10 + ( 6 * j ) ) = clif->cs.data[tab][j]->id; + WFIFOL(fd, 12 + ( 6 * j ) ) = clif->cs.data[tab][j]->price; + } + + WFIFOSET(fd, 10 + ( clif->cs.item_count[tab] * 6 )); +} /* [Ind/Hercules] */ void clif_maptypeproperty2(struct block_list *bl,enum send_target t) { #if PACKETVER >= 20121010 @@ -16970,7 +16990,6 @@ int clif_parse(int fd) { return 0; cmd = RFIFOW(fd,0); - // filter out invalid / unsupported packets if (cmd > MAX_PACKET_DB || packet_db[cmd].len == 0) { ShowWarning("clif_parse: Received unsupported packet (packet 0x%04x, %d bytes received), disconnecting session #%d.\n", cmd, RFIFOREST(fd), fd); @@ -17813,6 +17832,7 @@ void clif_defaults(void) { /* RagExe Cash Shop [Ind/Hercules] */ clif->pCashShopOpen = clif_parse_CashShopOpen; clif->pCashShopClose = clif_parse_CashShopClose; + clif->pCashShopReqTab = clif_parse_CashShopReqTab; clif->pCashShopSchedule = clif_parse_CashShopSchedule; clif->pCashShopBuy = clif_parse_CashShopBuy; /* */ |