From 38c48c78eb1d5822565504363863918e39e0cd4a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 10 Aug 2015 14:50:09 +0300 Subject: Fix compilation after HPM update in server. --- src/Makefile.am | 4 +++- src/echar/char.c | 10 +++++---- src/echar/config.c | 2 ++ src/echar/init.c | 20 +++--------------- src/ecommon/config.c | 2 ++ src/ecommon/init.c | 13 ++---------- src/elogin/config.c | 2 ++ src/elogin/init.c | 7 ++++--- src/elogin/login.c | 2 ++ src/elogin/parse.c | 14 +++++++------ src/elogin/send.c | 2 ++ src/emap/atcommand.c | 4 +++- src/emap/clif.c | 6 ++++-- src/emap/data/itemd.c | 2 ++ src/emap/data/mapd.c | 2 ++ src/emap/data/npcd.c | 2 ++ src/emap/data/session.c | 6 ++++-- src/emap/init.c | 49 ++++---------------------------------------- src/emap/itemdb.c | 2 ++ src/emap/lang.c | 2 ++ src/emap/mail.c | 2 ++ src/emap/map.c | 4 +++- src/emap/mob.c | 2 ++ src/emap/npc.c | 2 ++ src/emap/parse.c | 20 ++++++++++-------- src/emap/pc.c | 2 ++ src/emap/permission.c | 2 ++ src/emap/quest.c | 2 ++ src/emap/script.c | 2 ++ src/emap/send.c | 2 ++ src/emap/skill.c | 2 ++ src/emap/status.c | 2 ++ src/emap/unit.c | 2 ++ src/emap/utils/formatutils.c | 2 ++ 34 files changed, 99 insertions(+), 102 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 04c76a5..b5ff844 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -83,7 +83,9 @@ MAP_SRC = emap/atcommand.c \ ecommon/init.c \ ecommon/init.h -SHARED_CFLAGS = -pipe -ffast-math -Wall -Wextra -Wno-sign-compare \ +# need remove -Wno-unused + +SHARED_CFLAGS = -pipe -ffast-math -fvisibility=hidden -rdynamic -Wall -Wextra -Wno-sign-compare -Wno-unused \ -DPCRE_SUPPORT -I../../.. -I../../../../3rdparty -DPACKETVER=20150000 SHARED_LDFLAGS = -avoid-version -Wl,--no-undefined diff --git a/src/echar/char.c b/src/echar/char.c index 409da75..78b04b9 100644 --- a/src/echar/char.c +++ b/src/echar/char.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -97,7 +99,7 @@ void echar_parse_char_connect_pre(int *fdPtr, struct char_session_data *sd, uint void echar_parse_char_connect_post(int *fdPtr, struct char_session_data *sd, uint32 *ipl) { - sd = (struct char_session_data*)session[*fdPtr]->session_data; + sd = (struct char_session_data*)sockt->session[*fdPtr]->session_data; if (sd) sd->version = tmpVersion; } @@ -136,7 +138,7 @@ void echar_parse_char_ping(int *fdPtr) const int fd = *fdPtr; RFIFOSKIP(fd, 6); - struct char_session_data* sd = (struct char_session_data*)session[fd]->session_data; + struct char_session_data* sd = (struct char_session_data*)sockt->session[fd]->session_data; if (!sd) { hookStop(); @@ -161,7 +163,7 @@ void echar_parse_change_paassword(int fd) { if (chr->login_fd < 0) return; - struct char_session_data* sd = (struct char_session_data*)session[fd]->session_data; + struct char_session_data* sd = (struct char_session_data*)sockt->session[fd]->session_data; if (!sd) return; WFIFOHEAD(chr->login_fd, 54); @@ -179,7 +181,7 @@ void echar_parse_login_password_change_ack(int charFd) const int status = RFIFOB(charFd, 6); int fd = -1; - ARR_FIND( 0, sockt->fd_max, fd, session[fd] && (sd = (struct char_session_data*)session[fd]->session_data) && sd->auth && sd->account_id == accountId ); + ARR_FIND( 0, sockt->fd_max, fd, sockt->session[fd] && (sd = (struct char_session_data*)sockt->session[fd]->session_data) && sd->auth && sd->account_id == accountId ); if (fd < sockt->fd_max && fd >= 0) { WFIFOHEAD(fd, 3); diff --git a/src/echar/config.c b/src/echar/config.c index 83bfba0..cc5f087 100644 --- a/src/echar/config.c +++ b/src/echar/config.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/echar/init.c b/src/echar/init.c index 6fdd887..e45b682 100644 --- a/src/echar/init.c +++ b/src/echar/init.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -11,6 +13,7 @@ #include "common/mmo.h" #include "common/socket.h" #include "common/strlib.h" +#include "common/timer.h" #include "char/char.h" #include "char/geoip.h" #include "char/int_auction.h" @@ -44,22 +47,6 @@ HPExport struct hplugin_info pinfo = HPExport void plugin_init (void) { - chr = GET_SYMBOL("chr"); - geoip = GET_SYMBOL("geoip"); - inter_auction = GET_SYMBOL("inter_auction"); - inter_elemental = GET_SYMBOL("inter_elemental"); - inter_guild = GET_SYMBOL("inter_guild"); - inter_homunculus = GET_SYMBOL("inter_homunculus"); - inter_mail = GET_SYMBOL("inter_mail"); - inter_mercenary = GET_SYMBOL("inter_mercenary"); - inter_party = GET_SYMBOL("inter_party"); - inter_pet = GET_SYMBOL("inter_pet"); - inter_quest = GET_SYMBOL("inter_quest"); - inter_storage = GET_SYMBOL("inter_storage"); - inter = GET_SYMBOL("inter"); - loginif = GET_SYMBOL("loginif"); - mapif = GET_SYMBOL("mapif"); - addPacket(0x0061, 50, echar_parse_change_paassword, hpParse_Char); addPacket(0x5001, 7, echar_parse_login_password_change_ack, hpParse_FromLogin); @@ -75,7 +62,6 @@ HPExport void plugin_init (void) HPExport void server_preinit (void) { interfaces_init_common(); - mapindex = GET_SYMBOL("mapindex"); setDefaultMap(); addMapInterConf("default_map", config_default_map); diff --git a/src/ecommon/config.c b/src/ecommon/config.c index 0395dd7..413adf0 100644 --- a/src/ecommon/config.c +++ b/src/ecommon/config.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/ecommon/init.c b/src/ecommon/init.c index d0304b2..35da63b 100644 --- a/src/ecommon/init.c +++ b/src/ecommon/init.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -17,17 +19,6 @@ void interfaces_init_common(void) { - iMalloc = GET_SYMBOL("iMalloc"); - strlib = GET_SYMBOL("strlib"); - session = GET_SYMBOL("session"); - sockt = GET_SYMBOL("sockt"); - sv = GET_SYMBOL("sv"); - StrBuf = GET_SYMBOL("StrBuf"); - SQL = GET_SYMBOL("SQL"); - timer = GET_SYMBOL("timer"); - libconfig = GET_SYMBOL("libconfig"); - sysinfo = GET_SYMBOL("sysinfo"); - DB = GET_SYMBOL("DB"); } void setDefaultMap(void) diff --git a/src/elogin/config.c b/src/elogin/config.c index 6abaa6c..dc0b10f 100644 --- a/src/elogin/config.c +++ b/src/elogin/config.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/elogin/init.c b/src/elogin/init.c index 7d112ea..8e75241 100644 --- a/src/elogin/init.c +++ b/src/elogin/init.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -10,6 +12,8 @@ #include "common/mmo.h" #include "common/socket.h" #include "common/strlib.h" +#include "common/timer.h" +#include "common/mapindex.h" #include "login/login.h" #include "ecommon/init.h" @@ -31,8 +35,6 @@ HPExport void plugin_init (void) { interfaces_init_common(); - login = GET_SYMBOL("login"); - addPacket(0x7530, 22, login_parse_version, hpParse_Login); addPacket(0x027c, 95, elogin_parse_client_login2, hpParse_Login); addPacket(0x5000, 54, elogin_parse_change_paassword, hpParse_FromChar); @@ -44,7 +46,6 @@ HPExport void plugin_init (void) HPExport void server_preinit (void) { - iMalloc = GET_SYMBOL("iMalloc"); addLoginConf("update_server", config_update_server); } diff --git a/src/elogin/login.c b/src/elogin/login.c index 3766a1e..ef64ce4 100644 --- a/src/elogin/login.c +++ b/src/elogin/login.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/elogin/parse.c b/src/elogin/parse.c index 657ef7e..53857e6 100644 --- a/src/elogin/parse.c +++ b/src/elogin/parse.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -23,7 +25,7 @@ int clientVersion = 0; void login_parse_version(int fd) { - struct login_session_data* sd = (struct login_session_data*)session[fd]->session_data; + struct login_session_data* sd = (struct login_session_data*)sockt->session[fd]->session_data; if (!sd) return; @@ -67,7 +69,7 @@ int elogin_parse_client_login_pre(int *fdPtr, return 1; } - short *ptr = RFIFOP(fd, 2); + short *ptr = (short*)RFIFOP(fd, 2); if (*ptr == 20) *ptr = clientVersion; return 0; @@ -77,7 +79,7 @@ int elogin_parse_client_login_post(int retVal, int *fdPtr, struct login_session_data* sd, const char *const ip __attribute__ ((unused))) { - sd = (struct login_session_data*)session[*fdPtr]->session_data; + sd = (struct login_session_data*)sockt->session[*fdPtr]->session_data; if (sd) sd->version = clientVersion; return retVal; @@ -104,13 +106,13 @@ void elogin_parse_client_login2(int fd) safestrncpy(email, (const char*)RFIFOP(fd, 51), 40); clienttype = RFIFOB(fd, 50); - struct login_session_data* sd = (struct login_session_data*)session[fd]->session_data; + struct login_session_data* sd = (struct login_session_data*)sockt->session[fd]->session_data; if (!sd) return; char ip[16]; - uint32 ipl = session[fd]->client_addr; - ip2str(ipl, ip); + uint32 ipl = sockt->session[fd]->client_addr; + sockt->ip2str(ipl, ip); sd->clienttype = clienttype; sd->version = clientVersion; sd->passwdenc = 0; diff --git a/src/elogin/send.c b/src/elogin/send.c index bcee1b5..021d40f 100644 --- a/src/elogin/send.c +++ b/src/elogin/send.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/atcommand.c b/src/emap/atcommand.c index c697b22..2647169 100644 --- a/src/emap/atcommand.c +++ b/src/emap/atcommand.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -47,7 +49,7 @@ const char* eatcommand_msgfd(int *fdPtr, int *msgPtr) { const int msg_number = *msgPtr; const int fd = *fdPtr; - struct map_session_data *sd = session_isValid(fd) ? session[fd]->session_data : NULL; + struct map_session_data *sd = sockt->session_is_valid(fd) ? sockt->session[fd]->session_data : NULL; if (!(msg_number >= 0 && msg_number < MAX_MSG)) { hookStop(); diff --git a/src/emap/clif.c b/src/emap/clif.c index 9ebc21e..69ed4f2 100644 --- a/src/emap/clif.c +++ b/src/emap/clif.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -95,7 +97,7 @@ void eclif_charnameack(int *fdPtr, struct block_list *bl) if (bl->type == BL_NPC) { int fd = *fdPtr; - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd) { hookStop(); @@ -138,7 +140,7 @@ void eclif_charnameack(int *fdPtr, struct block_list *bl) if (md->guardian_data && md->guardian_data->g) return; // allow default code to work int fd = *fdPtr; - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd) { hookStop(); diff --git a/src/emap/data/itemd.c b/src/emap/data/itemd.c index e7af7f2..6768ad4 100644 --- a/src/emap/data/itemd.c +++ b/src/emap/data/itemd.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/data/mapd.c b/src/emap/data/mapd.c index cb1a506..e1f7969 100644 --- a/src/emap/data/mapd.c +++ b/src/emap/data/mapd.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/data/npcd.c b/src/emap/data/npcd.c index 183db46..7da1690 100644 --- a/src/emap/data/npcd.c +++ b/src/emap/data/npcd.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/data/session.c b/src/emap/data/session.c index c3c3ffa..0275ca5 100644 --- a/src/emap/data/session.c +++ b/src/emap/data/session.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -17,11 +19,11 @@ struct SessionExt *session_get(int fd) { - struct SessionExt *data = getFromSession(session[fd], 0); + struct SessionExt *data = getFromSession(sockt->session[fd], 0); if (!data) { data = session_create(); - addToSession(session[fd], data, 0, true); + addToSession(sockt->session[fd], data, 0, true); } return data; } diff --git a/src/emap/init.c b/src/emap/init.c index 32a8859..105f308 100644 --- a/src/emap/init.c +++ b/src/emap/init.c @@ -1,15 +1,19 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include #include "common/HPMi.h" #include "common/malloc.h" +#include "common/mapindex.h" #include "common/mmo.h" #include "common/socket.h" #include "common/strlib.h" +#include "common/timer.h" #include "map/channel.h" #include "map/chat.h" #include "map/chrif.h" @@ -68,8 +72,6 @@ HPExport struct hplugin_info pinfo = HPExport void plugin_init (void) { -// HPM_map_add_group_permission = GET_SYMBOL("addGroupPermission"); - status_init(); addAtcommand("setskill", setSkill); @@ -185,49 +187,6 @@ HPExport void server_preinit (void) { interfaces_init_common(); - atcommand = GET_SYMBOL("atcommand"); - battle = GET_SYMBOL("battle"); - bg = GET_SYMBOL("battlegrounds"); - buyingstore = GET_SYMBOL("buyingstore"); - clif = GET_SYMBOL("clif"); - chrif = GET_SYMBOL("chrif"); - guild = GET_SYMBOL("guild"); - gstorage = GET_SYMBOL("gstorage"); - homun = GET_SYMBOL("homun"); - map = GET_SYMBOL("map"); - ircbot = GET_SYMBOL("ircbot"); - itemdb = GET_SYMBOL("itemdb"); - logs = GET_SYMBOL("logs"); - mail = GET_SYMBOL("mail"); - instance = GET_SYMBOL("instance"); - script = GET_SYMBOL("script"); - searchstore = GET_SYMBOL("searchstore"); - skill = GET_SYMBOL("skill"); - vending = GET_SYMBOL("vending"); - pc = GET_SYMBOL("pc"); - pcg = GET_SYMBOL("pc_groups"); - party = GET_SYMBOL("party"); - storage = GET_SYMBOL("storage"); - trade = GET_SYMBOL("trade"); - status = GET_SYMBOL("status"); - chat = GET_SYMBOL("chat"); - duel = GET_SYMBOL("duel"); - elemental = GET_SYMBOL("elemental"); - intif = GET_SYMBOL("intif"); - mercenary = GET_SYMBOL("mercenary"); - mob = GET_SYMBOL("mob"); - unit = GET_SYMBOL("unit"); - npc = GET_SYMBOL("npc"); - mapreg = GET_SYMBOL("mapreg"); - pet = GET_SYMBOL("pet"); - path = GET_SYMBOL("path"); - quest = GET_SYMBOL("quest"); - npc_chat = GET_SYMBOL("npc_chat"); - libpcre = GET_SYMBOL("libpcre"); - mapit = GET_SYMBOL("mapit"); - mapindex = GET_SYMBOL("mapindex"); - channel = GET_SYMBOL("channel"); - setDefaultMap(); addMapInterConf("default_map", config_default_map); addMapInterConf("default_x", config_default_x); diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c index 54003ba..522e405 100644 --- a/src/emap/itemdb.c +++ b/src/emap/itemdb.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/lang.c b/src/emap/lang.c index d6a1910..5ddc29d 100644 --- a/src/emap/lang.c +++ b/src/emap/lang.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/mail.c b/src/emap/mail.c index a3d92c8..cc47728 100644 --- a/src/emap/mail.c +++ b/src/emap/mail.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/map.c b/src/emap/map.c index 55f4245..c6c722c 100644 --- a/src/emap/map.c +++ b/src/emap/map.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -70,7 +72,7 @@ void emap_online_list(int fd) return; } - TBL_PC* ssd = (TBL_PC*)session[fd]->session_data; + TBL_PC* ssd = (TBL_PC*)sockt->session[fd]->session_data; if (!ssd) { aFree(buf); diff --git a/src/emap/mob.c b/src/emap/mob.c index c4c8bcf..df5d263 100644 --- a/src/emap/mob.c +++ b/src/emap/mob.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/npc.c b/src/emap/npc.c index 16fe2bb..07de4cb 100644 --- a/src/emap/npc.c +++ b/src/emap/npc.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/parse.c b/src/emap/parse.c index c5179cd..520bb35 100644 --- a/src/emap/parse.c +++ b/src/emap/parse.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include @@ -36,7 +38,7 @@ void map_parse_join_channel(int fd) { char name[24]; char *p; - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; int res = 0; if (!sd) return; @@ -66,7 +68,7 @@ void map_parse_part_channel(int fd) { char name[24]; char *p; - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; int k; if (!sd) return; @@ -111,7 +113,7 @@ void map_parse_pet_say(int fd) { char message[500]; - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd || !sd->pd) return; @@ -124,7 +126,7 @@ void map_parse_pet_say(int fd) void map_parse_pet_emote(int fd) { - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd || !sd->pd) return; const time_t t = time(NULL); @@ -153,7 +155,7 @@ void map_parse_get_online_list(int fd) void map_parse_pet_move(int fd) { - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd || !sd->pd) return; short x = RFIFOW(fd, 6); @@ -166,7 +168,7 @@ void map_parse_pet_move(int fd) void map_parse_pet_dir(int fd) { - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd || !sd->pd) return; unit->setdir(&sd->pd->bl, RFIFOB(fd, 8)); @@ -176,7 +178,7 @@ void map_parse_homun_say(int fd) { char message[500]; - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd) return; const int len = RFIFOW(fd, 2); @@ -191,7 +193,7 @@ void map_parse_homun_say(int fd) void map_parse_homun_emote(int fd) { - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd) return; const time_t t = time(NULL); @@ -210,7 +212,7 @@ void map_parse_homun_emote(int fd) void map_parse_homun_dir(int fd) { - TBL_PC* sd = (TBL_PC*)session[fd]->session_data; + TBL_PC* sd = (TBL_PC*)sockt->session[fd]->session_data; if (!sd || !sd->pd) return; if (sd->md && sd->md->db) diff --git a/src/emap/pc.c b/src/emap/pc.c index c0957d9..15742c2 100644 --- a/src/emap/pc.c +++ b/src/emap/pc.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/permission.c b/src/emap/permission.c index b05b04b..5aaf1a4 100644 --- a/src/emap/permission.c +++ b/src/emap/permission.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/quest.c b/src/emap/quest.c index 5ad82f6..88158dc 100644 --- a/src/emap/quest.c +++ b/src/emap/quest.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/script.c b/src/emap/script.c index d492430..656d415 100644 --- a/src/emap/script.c +++ b/src/emap/script.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/send.c b/src/emap/send.c index a951ad6..2ef2d49 100644 --- a/src/emap/send.c +++ b/src/emap/send.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/skill.c b/src/emap/skill.c index b909feb..2449d85 100644 --- a/src/emap/skill.c +++ b/src/emap/skill.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/status.c b/src/emap/status.c index 912a96c..935a2a4 100644 --- a/src/emap/status.c +++ b/src/emap/status.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/unit.c b/src/emap/unit.c index 54dca56..9fc77da 100644 --- a/src/emap/unit.c +++ b/src/emap/unit.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include diff --git a/src/emap/utils/formatutils.c b/src/emap/utils/formatutils.c index 70a7541..b5c3baf 100644 --- a/src/emap/utils/formatutils.c +++ b/src/emap/utils/formatutils.c @@ -1,6 +1,8 @@ // Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL. // Copyright (c) 2014 Evol developers +#include "common/hercules.h" + #include #include #include -- cgit v1.2.3-70-g09d2