summaryrefslogtreecommitdiff
path: root/src/char/char.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/char.h')
-rw-r--r--src/char/char.h125
1 files changed, 62 insertions, 63 deletions
diff --git a/src/char/char.h b/src/char/char.h
index 516598fbe..e79cc1898 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -2,12 +2,13 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
-#ifndef COMMON_CHAR_H
-#define COMMON_CHAR_H
+#ifndef CHAR_CHAR_H
+#define CHAR_CHAR_H
-#include "../common/cbasetypes.h"
-#include "../common/core.h" // CORE_ST_LAST
-#include "../common/db.h"
+#include "common/hercules.h"
+#include "common/core.h" // CORE_ST_LAST
+#include "common/db.h"
+#include "common/mmo.h"
enum E_CHARSERVER_ST {
CHARSERVER_ST_RUNNING = CORE_ST_LAST,
@@ -63,58 +64,6 @@ enum {
TABLE_GUILD_STORAGE,
};
-#ifdef HERCULES_CORE
-extern int char_name_option;
-extern char char_name_letters[];
-extern bool char_gm_read;
-extern int autosave_interval;
-extern int save_log;
-extern char db_path[];
-extern char char_db[256];
-extern char scdata_db[256];
-extern char cart_db[256];
-extern char inventory_db[256];
-extern char charlog_db[256];
-extern char storage_db[256];
-extern char interlog_db[256];
-extern char skill_db[256];
-extern char memo_db[256];
-extern char guild_db[256];
-extern char guild_alliance_db[256];
-extern char guild_castle_db[256];
-extern char guild_expulsion_db[256];
-extern char guild_member_db[256];
-extern char guild_position_db[256];
-extern char guild_skill_db[256];
-extern char guild_storage_db[256];
-extern char party_db[256];
-extern char pet_db[256];
-extern char mail_db[256];
-extern char auction_db[256];
-extern char quest_db[256];
-extern char homunculus_db[256];
-extern char skill_homunculus_db[256];
-extern char mercenary_db[256];
-extern char mercenary_owner_db[256];
-extern char ragsrvinfo_db[256];
-extern char elemental_db[256];
-extern char interreg_db[32];
-extern char acc_reg_num_db[32];
-extern char acc_reg_str_db[32];
-extern char char_reg_str_db[32];
-extern char char_reg_num_db[32];
-
-extern int db_use_sql_item_db;
-extern int db_use_sql_mob_db;
-extern int db_use_sql_mob_skill_db;
-
-extern int guild_exp_rate;
-extern int log_inter;
-
-void char_load_defaults();
-void char_defaults();
-#endif // HERCULES_CORE
-
struct char_auth_node {
int account_id;
int char_id;
@@ -145,7 +94,7 @@ struct char_interface {
int new_display;
char *CHAR_CONF_NAME;
- char *LAN_CONF_NAME;
+ char *NET_CONF_NAME; ///< Network config filename
char *SQL_CONF_NAME;
char *INTER_CONF_NAME;
@@ -256,7 +205,7 @@ struct char_interface {
int (*parse_frommap) (int fd);
int (*search_mapserver) (unsigned short map, uint32 ip, uint16 port);
int (*mapif_init) (int fd);
- int (*lan_subnetcheck) (uint32 ip);
+ uint32 (*lan_subnet_check) (uint32 ip);
void (*delete2_ack) (int fd, int char_id, uint32 result, time_t delete_date);
void (*delete2_accept_actual_ack) (int fd, int char_id, uint32 result);
void (*delete2_accept_ack) (int fd, int char_id, uint32 result);
@@ -289,7 +238,7 @@ struct char_interface {
void (*parse_char_delete2_accept) (int fd, struct char_session_data* sd);
void (*parse_char_delete2_cancel) (int fd, struct char_session_data* sd);
void (*login_map_server_ack) (int fd, uint8 flag);
- void (*parse_char_login_map_server) (int fd);
+ void (*parse_char_login_map_server) (int fd, uint32 ipl);
void (*parse_char_pincode_check) (int fd, struct char_session_data* sd);
void (*parse_char_pincode_window) (int fd, struct char_session_data* sd);
void (*parse_char_pincode_change) (int fd, struct char_session_data* sd);
@@ -305,12 +254,62 @@ struct char_interface {
int (*check_connect_login_server) (int tid, int64 tick, int id, intptr_t data);
int (*online_data_cleanup_sub) (DBKey key, DBData *data, va_list ap);
int (*online_data_cleanup) (int tid, int64 tick, int id, intptr_t data);
- int (*lan_config_read) (const char *lancfgName);
void (*sql_config_read) (const char* cfgName);
void (*config_dispatch) (char *w1, char *w2);
int (*config_read) (const char* cfgName);
};
-struct char_interface *chr;
+#ifdef HERCULES_CORE
+extern int char_name_option;
+extern char char_name_letters[];
+extern bool char_gm_read;
+extern int autosave_interval;
+extern int save_log;
+extern char db_path[];
+extern char char_db[256];
+extern char scdata_db[256];
+extern char cart_db[256];
+extern char inventory_db[256];
+extern char charlog_db[256];
+extern char storage_db[256];
+extern char interlog_db[256];
+extern char skill_db[256];
+extern char memo_db[256];
+extern char guild_db[256];
+extern char guild_alliance_db[256];
+extern char guild_castle_db[256];
+extern char guild_expulsion_db[256];
+extern char guild_member_db[256];
+extern char guild_position_db[256];
+extern char guild_skill_db[256];
+extern char guild_storage_db[256];
+extern char party_db[256];
+extern char pet_db[256];
+extern char mail_db[256];
+extern char auction_db[256];
+extern char quest_db[256];
+extern char homunculus_db[256];
+extern char skill_homunculus_db[256];
+extern char mercenary_db[256];
+extern char mercenary_owner_db[256];
+extern char ragsrvinfo_db[256];
+extern char elemental_db[256];
+extern char acc_reg_num_db[32];
+extern char acc_reg_str_db[32];
+extern char char_reg_str_db[32];
+extern char char_reg_num_db[32];
+
+extern int db_use_sql_item_db;
+extern int db_use_sql_mob_db;
+extern int db_use_sql_mob_skill_db;
+
+extern int guild_exp_rate;
+extern int log_inter;
+
+void char_load_defaults();
+void char_defaults();
+#endif // HERCULES_CORE
+
+HPShared struct char_interface *chr;
-#endif /* COMMON_CHAR_H */
+#endif /* CHAR_CHAR_H */