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/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 ++ 23 files changed, 63 insertions(+), 60 deletions(-) (limited to 'src/emap') 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-60-g2f50