diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-08 23:25:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-15 11:47:30 +0300 |
commit | e4f78d0a13233181cec890b24c77748e32b2fd03 (patch) | |
tree | 548b3bcc77904039b6535b71053e722ea3f61e6f /src/char/inter.h | |
parent | 1c3205f761b1894a7f2347f8ab1275f1791dbcbc (diff) | |
download | hercules-e4f78d0a13233181cec890b24c77748e32b2fd03.tar.gz hercules-e4f78d0a13233181cec890b24c77748e32b2fd03.tar.bz2 hercules-e4f78d0a13233181cec890b24c77748e32b2fd03.tar.xz hercules-e4f78d0a13233181cec890b24c77748e32b2fd03.zip |
Add most functions from inter.c to interfaces.
Diffstat (limited to 'src/char/inter.h')
-rw-r--r-- | src/char/inter.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/src/char/inter.h b/src/char/inter.h index d7d7c3c2b..c315d5772 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -11,17 +11,6 @@ struct accreg; -int inter_init_sql(const char *file); -void inter_final(void); -int inter_parse_frommap(int fd); -int inter_mapif_init(int fd); -int mapif_send_gmaccounts(void); -int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason); -void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int account_id, const char *userid, const char *user_pass, const char *email, const char *last_ip, const char *lastlogin, const char *pin_code, const char *birthdate, int group_id, int logincount, int state); - -int inter_log(char *fmt, ...) __attribute__((format(printf, 1, 2))); -int inter_vlog(char *fmt, va_list ap); - #define inter_cfgName "conf/inter-server.conf" extern unsigned int party_share_level; @@ -29,6 +18,29 @@ extern unsigned int party_share_level; extern Sql* sql_handle; extern Sql* lsql_handle; -int inter_accreg_tosql(int account_id, int char_id, struct accreg *reg, int type); +void inter_defaults(void); + +struct inter_interface { + const char* (*msg_txt) (int msg_number); + bool (*msg_config_read) (const char *cfg_name, bool allow_override); + void (*do_final_msg) (void); + const char* (*job_name) (int class_); + void (*vmsg_to_fd) (int fd, int u_fd, int aid, char* msg, va_list ap); + void (*msg_to_fd) (int fd, int u_fd, int aid, char *msg, ...); + void (*savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string); + int (*accreg_fromsql) (int account_id,int char_id, int fd, int type); + int (*config_read) (const char* cfgName); + int (*vlog) (char* fmt, va_list ap); + int (*log) (char* fmt, ...); + int (*init_sql) (const char *file); + int (*mapif_init) (int fd); + int (*check_ttl_wisdata_sub) (DBKey key, DBData *data, va_list ap); + int (*check_ttl_wisdata) (void); + int (*check_length) (int fd, int length); + int (*parse_frommap) (int fd); + void (*final) (void); +}; + +struct inter_interface *inter; #endif /* CHAR_INTER_H */ |