summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-02-20 03:00:09 +0100
committerHaru <haru@dotalux.com>2016-03-20 18:32:07 +0100
commit13dcf1e6c32b672e72f70a6cdbb42b4c3a2df3d8 (patch)
tree28d87e3e5219d5beb5e2dcf0f714e27184818940 /src/char
parent68c5122499f0cc2f4ce224c1ac82b6ec47d6abbe (diff)
downloadhercules-13dcf1e6c32b672e72f70a6cdbb42b4c3a2df3d8.tar.gz
hercules-13dcf1e6c32b672e72f70a6cdbb42b4c3a2df3d8.tar.bz2
hercules-13dcf1e6c32b672e72f70a6cdbb42b4c3a2df3d8.tar.xz
hercules-13dcf1e6c32b672e72f70a6cdbb42b4c3a2df3d8.zip
Dropped typedefs from union DBKey and struct DBData
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c12
-rw-r--r--src/char/char.h12
-rw-r--r--src/char/int_guild.c4
-rw-r--r--src/char/int_guild.h2
-rw-r--r--src/char/inter.c2
-rw-r--r--src/char/inter.h2
6 files changed, 17 insertions, 17 deletions
diff --git a/src/char/char.c b/src/char/char.c
index df59eafc9..01262fdcb 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -171,7 +171,7 @@ static DBMap* auth_db; // int account_id -> struct char_auth_node*
/**
* @see DBCreateData
*/
-static DBData char_create_online_char_data(DBKey key, va_list args)
+static struct DBData char_create_online_char_data(union DBKey key, va_list args)
{
struct online_char_data* character;
CREATE(character, struct online_char_data, 1);
@@ -313,7 +313,7 @@ void char_set_char_offline(int char_id, int account_id)
/**
* @see DBApply
*/
-static int char_db_setoffline(DBKey key, DBData *data, va_list ap)
+static int char_db_setoffline(union DBKey key, struct DBData *data, va_list ap)
{
struct online_char_data* character = (struct online_char_data*)DB->data2ptr(data);
int server_id = va_arg(ap, int);
@@ -333,7 +333,7 @@ static int char_db_setoffline(DBKey key, DBData *data, va_list ap)
/**
* @see DBApply
*/
-static int char_db_kickoffline(DBKey key, DBData *data, va_list ap)
+static int char_db_kickoffline(union DBKey key, struct DBData *data, va_list ap)
{
struct online_char_data* character = (struct online_char_data*)DB->data2ptr(data);
int server_id = va_arg(ap, int);
@@ -388,7 +388,7 @@ void char_set_all_offline_sql(void)
/**
* @see DBCreateData
*/
-static DBData char_create_charstatus(DBKey key, va_list args)
+static struct DBData char_create_charstatus(union DBKey key, va_list args)
{
struct mmo_charstatus *cp;
cp = (struct mmo_charstatus *) aCalloc(1,sizeof(struct mmo_charstatus));
@@ -5249,7 +5249,7 @@ int char_broadcast_user_count(int tid, int64 tick, int id, intptr_t data) {
* Load this character's account id into the 'online accounts' packet
* @see DBApply
*/
-static int char_send_accounts_tologin_sub(DBKey key, DBData *data, va_list ap)
+static int char_send_accounts_tologin_sub(union DBKey key, struct DBData *data, va_list ap)
{
struct online_char_data* character = DB->data2ptr(data);
int* i = va_arg(ap, int*);
@@ -5318,7 +5318,7 @@ static int char_waiting_disconnect(int tid, int64 tick, int id, intptr_t data) {
/**
* @see DBApply
*/
-static int char_online_data_cleanup_sub(DBKey key, DBData *data, va_list ap)
+static int char_online_data_cleanup_sub(union DBKey key, struct DBData *data, va_list ap)
{
struct online_char_data *character= DB->data2ptr(data);
nullpo_ret(character);
diff --git a/src/char/char.h b/src/char/char.h
index aedc52fbe..4fe602c45 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -115,18 +115,18 @@ struct char_interface {
int (*waiting_disconnect) (int tid, int64 tick, int id, intptr_t data);
int (*delete_char_sql) (int char_id);
- DBData (*create_online_char_data) (DBKey key, va_list args);
+ struct DBData (*create_online_char_data) (union DBKey key, va_list args);
void (*set_account_online) (int account_id);
void (*set_account_offline) (int account_id);
void (*set_char_charselect) (int account_id);
void (*set_char_online) (int map_id, int char_id, int account_id);
void (*set_char_offline) (int char_id, int account_id);
- int (*db_setoffline) (DBKey key, DBData *data, va_list ap);
- int (*db_kickoffline) (DBKey key, DBData *data, va_list ap);
+ int (*db_setoffline) (union DBKey key, struct DBData *data, va_list ap);
+ int (*db_kickoffline) (union DBKey key, struct DBData *data, va_list ap);
void (*set_login_all_offline) (void);
void (*set_all_offline) (int id);
void (*set_all_offline_sql) (void);
- DBData (*create_charstatus) (DBKey key, va_list args);
+ struct DBData (*create_charstatus) (union DBKey key, va_list args);
int (*mmo_char_tosql) (int char_id, struct mmo_charstatus* p);
int (*memitemdata_to_sql) (const struct item items[], int max, int id, int tableswitch);
int (*mmo_gender) (const struct char_session_data *sd, const struct mmo_charstatus *p, char sex);
@@ -263,10 +263,10 @@ struct char_interface {
int (*parse_char_unknown_packet) (int fd, uint32 ipl);
int (*parse_char) (int fd);
int (*broadcast_user_count) (int tid, int64 tick, int id, intptr_t data);
- int (*send_accounts_tologin_sub) (DBKey key, DBData *data, va_list ap);
+ int (*send_accounts_tologin_sub) (union DBKey key, struct DBData *data, va_list ap);
int (*send_accounts_tologin) (int tid, int64 tick, int id, intptr_t data);
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_sub) (union DBKey key, struct DBData *data, va_list ap);
int (*online_data_cleanup) (int tid, int64 tick, int id, intptr_t data);
void (*sql_config_read) (const char* cfgName);
void (*config_dispatch) (char *w1, char *w2);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index ab15d5ef9..c269a8f6f 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -60,7 +60,7 @@ int inter_guild_save_timer(int tid, int64 tick, int id, intptr_t data) {
static int last_id = 0; //To know in which guild we were.
int state = 0; //0: Have not reached last guild. 1: Reached last guild, ready for save. 2: Some guild saved, don't do further saving.
DBIterator *iter = db_iterator(inter_guild->guild_db);
- DBKey key;
+ union DBKey key;
struct guild* g;
if( last_id == 0 ) //Save the first guild in the list.
@@ -749,7 +749,7 @@ int inter_guild_sql_init(void)
/**
* @see DBApply
*/
-int inter_guild_db_final(DBKey key, DBData *data, va_list ap)
+int inter_guild_db_final(union DBKey key, struct DBData *data, va_list ap)
{
struct guild *g = DB->data2ptr(data);
nullpo_ret(g);
diff --git a/src/char/int_guild.h b/src/char/int_guild.h
index 40728c3b2..31c334cbf 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -58,7 +58,7 @@ struct inter_guild_interface {
int (*CharOnline) (int char_id, int guild_id);
int (*CharOffline) (int char_id, int guild_id);
int (*sql_init) (void);
- int (*db_final) (DBKey key, DBData *data, va_list ap);
+ int (*db_final) (union DBKey key, struct DBData *data, va_list ap);
void (*sql_final) (void);
int (*search_guildname) (const char *str);
bool (*check_empty) (struct guild *g);
diff --git a/src/char/inter.c b/src/char/inter.c
index 4e1adbe15..cf648c238 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -1038,7 +1038,7 @@ int mapif_disconnectplayer(int fd, int account_id, int char_id, int reason)
* Existence check of WISP data
* @see DBApply
*/
-int inter_check_ttl_wisdata_sub(DBKey key, DBData *data, va_list ap)
+int inter_check_ttl_wisdata_sub(union DBKey key, struct DBData *data, va_list ap)
{
int64 tick;
struct WisData *wd = DB->data2ptr(data);
diff --git a/src/char/inter.h b/src/char/inter.h
index 84cb6c640..4e8d113ce 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -47,7 +47,7 @@ struct inter_interface {
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_sub) (union DBKey key, struct DBData *data, va_list ap);
int (*check_ttl_wisdata) (void);
int (*check_length) (int fd, int length);
int (*parse_frommap) (int fd);