summaryrefslogtreecommitdiff
path: root/src/echar
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-10 14:50:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-16 15:52:35 +0300
commit38c48c78eb1d5822565504363863918e39e0cd4a (patch)
tree740ed3f18baff57e0ac33e6e8405d217546429d3 /src/echar
parent2ed4142dfcde097648857f41f8064b0a19c350c7 (diff)
downloadplugin-38c48c78eb1d5822565504363863918e39e0cd4a.tar.gz
plugin-38c48c78eb1d5822565504363863918e39e0cd4a.tar.bz2
plugin-38c48c78eb1d5822565504363863918e39e0cd4a.tar.xz
plugin-38c48c78eb1d5822565504363863918e39e0cd4a.zip
Fix compilation after HPM update in server.
Diffstat (limited to 'src/echar')
-rw-r--r--src/echar/char.c10
-rw-r--r--src/echar/config.c2
-rw-r--r--src/echar/init.c20
3 files changed, 11 insertions, 21 deletions
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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 <stdio.h>
#include <stdlib.h>
#include <string.h>
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 <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -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);