summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-28 13:10:55 -0300
committershennetsind <ind@henn.et>2013-06-28 13:10:55 -0300
commit852aaacc10faf384ab17c75fc386bb7491d09bd2 (patch)
tree193dc1433e93a6ff98e3a5ee23061a51329dc318 /src/map
parent8f0d1462716e0e7581e0145ce5f6575d59146fa1 (diff)
downloadhercules-852aaacc10faf384ab17c75fc386bb7491d09bd2.tar.gz
hercules-852aaacc10faf384ab17c75fc386bb7491d09bd2.tar.bz2
hercules-852aaacc10faf384ab17c75fc386bb7491d09bd2.tar.xz
hercules-852aaacc10faf384ab17c75fc386bb7491d09bd2.zip
Minor chrif.c interface adjustment
Special Thanks to Takkun for pointing it out. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/chrif.c10
-rw-r--r--src/map/chrif.h9
2 files changed, 10 insertions, 9 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 9e8b18d3b..80c82354c 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -456,7 +456,7 @@ int chrif_connectack(int fd) {
ShowStatus("Successfully logged on to Char Server (Connection: '"CL_WHITE"%d"CL_RESET"').\n",fd);
chrif_state = 1;
- chrif->chrif_connected = 1;
+ chrif->connected = 1;
chrif_sendmap(fd);
@@ -1331,9 +1331,9 @@ int chrif_char_online(struct map_session_data *sd) {
/// Called when the connection to Char Server is disconnected.
void chrif_on_disconnect(void) {
- if( chrif->chrif_connected != 1 )
+ if( chrif->connected != 1 )
ShowWarning("Connection to Char Server lost.\n\n");
- chrif->chrif_connected = 0;
+ chrif->connected = 0;
chrif->other_mapserver_count = 0; //Reset counter. We receive ALL maps from all map-servers on reconnect.
iMap->eraseallipport();
@@ -1544,7 +1544,7 @@ static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_
realloc_fifo(char_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
chrif_connect(char_fd);
- chrif->chrif_connected = (chrif_state == 2);
+ chrif->connected = (chrif_state == 2);
srvinfo = 0;
} else {
if (srvinfo == 0) {
@@ -1657,7 +1657,7 @@ void chrif_defaults(void) {
/* vars */
- chrif->chrif_connected = 0;
+ chrif->connected = 0;
chrif->other_mapserver_count = 0;
/* funcs */
diff --git a/src/map/chrif.h b/src/map/chrif.h
index faabedeed..1af652cea 100644
--- a/src/map/chrif.h
+++ b/src/map/chrif.h
@@ -1,11 +1,15 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+
#ifndef _CHRIF_H_
#define _CHRIF_H_
+
#include "../common/cbasetypes.h"
#include <time.h>
+
enum sd_state { ST_LOGIN, ST_LOGOUT, ST_MAPCHANGE };
+
struct auth_node {
int account_id, char_id;
int login_id1, login_id2, sex, fd;
@@ -16,9 +20,6 @@ struct auth_node {
enum sd_state state; //To track whether player was login in/out or changing maps.
};
-
-
-
/*=====================================
* Interface : chrif.h
* Generated by HerculesInterfaceMaker
@@ -28,7 +29,7 @@ struct chrif_interface {
/* vars */
- int chrif_connected;
+ int connected;
int other_mapserver_count; //Holds count of how many other map servers are online (apart of this instance) [Skotlex]
/* funcs */