summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-05-06 21:14:46 -0300
committerpanikon <panikon@zoho.com>2014-05-06 21:14:46 -0300
commit9a425c11b61fb6f4e299013c7d8d9841129b8f45 (patch)
treeb8e8bc56c6e51679c23fe2de0e268f49b29f7288 /src/map/clif.c
parent9cf6b362a0d5e2f52c017d747c0fa8f69a1a273f (diff)
downloadhercules-9a425c11b61fb6f4e299013c7d8d9841129b8f45.tar.gz
hercules-9a425c11b61fb6f4e299013c7d8d9841129b8f45.tar.bz2
hercules-9a425c11b61fb6f4e299013c7d8d9841129b8f45.tar.xz
hercules-9a425c11b61fb6f4e299013c7d8d9841129b8f45.zip
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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c6
1 files changed, 6 insertions, 0 deletions
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 ) {