From 9a425c11b61fb6f4e299013c7d8d9841129b8f45 Mon Sep 17 00:00:00 2001 From: panikon Date: Tue, 6 May 2014 21:14:46 -0300 Subject: Bug fixes and other changes #Fixed issue where a corrupted map cache would lead to a crash *Moved Big-endian compatibility functions to common/utils.h #Fixed issue 8162 *http://hercules.ws/board/tracker/issue-8162-loadnpc-doesnt-trigger-oninit-of-duplicate-npcs/ *Added options to npc_parse_duplicate #Fixed issue 8169 *http://hercules.ws/board/tracker/issue-8169-script-command-guildskill-skill-idlevel-not-working-as-intended/ *Changed *guildskill behavior, now it behaves exactly as depicted in the documentation *Updated *guildskill documentation #Added missing GBI types to mapif_parse_GuildBasicInfoChange now it's possible to change guild exp, lv, skill point and skill information #GeoIP revamp *GeoIP module was partially rewritten *Added several data checks to prevent corruption and crashes *Updated GeoIP database *See https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/GeoIP.c for more information #Added packetver checks regarding NST_MARKET *Now *tradertype warns if user is trying to use this feature with older clients --- src/map/clif.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 2fbf64e09..24dcfebf4 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -18179,6 +18179,7 @@ void clif_parse_NPCShopClosed(int fd, struct map_session_data *sd) { } /* NPC Market (by Ind after an extensive debugging of the packet, only possible thanks to Yommy <3) */ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { +#if PACKETVER >= 20131223 struct npc_item_list *shop = nd->u.scr.shop->item; unsigned short shop_size = nd->u.scr.shop->items, i, c; struct item_data *id = NULL; @@ -18199,12 +18200,14 @@ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) { npcmarket_open.PacketLength = 4 + ( sizeof(npcmarket_open.list[0]) * c ); clif->send(&npcmarket_open,npcmarket_open.PacketLength,&sd->bl,SELF); +#endif } void clif_parse_NPCMarketClosed(int fd, struct map_session_data *sd) { /* TODO track the state <3~ */ sd->npc_shopid = 0; } void clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_npc_market_purchase *req, unsigned char response) { +#if PACKETVER >= 20131223 unsigned short c = 0; npcmarket_result.PacketType = npcmarketresultackType; @@ -18237,11 +18240,14 @@ void clif_npc_market_purchase_ack(struct map_session_data *sd, struct packet_npc npcmarket_result.PacketLength = 5 + ( sizeof(npcmarket_result.list[0]) * c );; clif->send(&npcmarket_result,npcmarket_result.PacketLength,&sd->bl,SELF); +#endif } void clif_parse_NPCMarketPurchase(int fd, struct map_session_data *sd) { +#if PACKETVER >= 20131223 struct packet_npc_market_purchase *p = P2PTR(fd); clif->npc_market_purchase_ack(sd,p,npc->market_buylist(sd,(p->PacketLength - 4) / sizeof(p->list[0]),p)); +#endif } /* */ unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) { -- cgit v1.2.3-60-g2f50