diff options
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 50 | ||||
-rw-r--r-- | src/char/int_guild.c | 86 | ||||
-rw-r--r-- | src/char/int_guild.h | 4 | ||||
-rw-r--r-- | src/char/int_party.c | 39 | ||||
-rw-r--r-- | src/char/int_party.h | 4 | ||||
-rw-r--r-- | src/char/int_storage.c | 8 | ||||
-rw-r--r-- | src/char/int_storage.h | 8 | ||||
-rw-r--r-- | src/char/inter.c | 16 | ||||
-rw-r--r-- | src/char/inter.h | 2 |
9 files changed, 90 insertions, 127 deletions
diff --git a/src/char/char.c b/src/char/char.c index dc77c31..eac88e6 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -246,7 +246,7 @@ int mmo_char_tostr (char *str, struct mmo_charstatus *p) } str_p += sprintf (str_p, "%d\t%d,%d\t%s\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d\t%d,%d,%d,%d,%d,%d\t%d,%d" "\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d\t%d,%d,%d,%d,%d" "\t%s,%d,%d\t%s,%d,%d,%d\t", p->char_id, p->account_id, p->char_num, p->name, // - p->class, p->base_level, p->job_level, p->base_exp, p->job_exp, p->zeny, p->hp, p->max_hp, p->sp, p->max_sp, p->str, p->agi, p->vit, p->int_, p->dex, p->luk, p->status_point, p->skill_point, p->option, p->karma, p->manner, // + p->pc_class, p->base_level, p->job_level, p->base_exp, p->job_exp, p->zeny, p->hp, p->max_hp, p->sp, p->max_sp, p->str, p->agi, p->vit, p->int_, p->dex, p->luk, p->status_point, p->skill_point, p->option, p->karma, p->manner, // p->party_id, p->guild_id, 0, p->hair, p->hair_color, p->clothes_color, p->weapon, p->shield, p->head_top, p->head_mid, p->head_bottom, p->last_point.map, p->last_point.x, p->last_point.y, // p->save_point.map, p->save_point.x, p->save_point.y, p->partner_id); @@ -364,7 +364,7 @@ int mmo_char_fromstr (char *str, struct mmo_charstatus *p) p->char_id = tmp_int[0]; p->account_id = tmp_int[1]; p->char_num = tmp_int[2]; - p->class = tmp_int[3]; + p->pc_class = tmp_int[3]; p->base_level = tmp_int[4]; p->job_level = tmp_int[5]; p->base_exp = tmp_int[6]; @@ -857,9 +857,7 @@ static void remove_prefix_blanks (char *name) int make_new_char (int fd, unsigned char *dat) { int i, j; - struct char_session_data *sd; - - sd = session[fd]->session_data; + struct char_session_data *sd = (struct char_session_data *)session[fd]->session_data; // remove control characters from the name dat[23] = '\0'; @@ -1003,7 +1001,7 @@ int make_new_char (int fd, unsigned char *dat) char_dat[i].account_id = sd->account_id; char_dat[i].char_num = dat[30]; strcpy (char_dat[i].name, dat); - char_dat[i].class = 0; + char_dat[i].pc_class = 0; char_dat[i].base_level = 1; char_dat[i].job_level = 1; char_dat[i].base_exp = 0; @@ -1054,9 +1052,9 @@ int make_new_char (int fd, unsigned char *dat) //---------------------------------------------------- // This function return the name of the job (by [Yor]) //---------------------------------------------------- -char *job_name (int class) +char *job_name (int pc_class) { - switch (class) + switch (pc_class) { case 0: return "Novice"; @@ -1278,13 +1276,13 @@ void create_online_files (void) break; case 4: // by job (and job level) for (j = 0; j < players; j++) - if (char_dat[i].class < char_dat[id[j]].class || + if (char_dat[i].pc_class < char_dat[id[j]].pc_class || // if same job, we sort by job level. - (char_dat[i].class == char_dat[id[j]].class && + (char_dat[i].pc_class == char_dat[id[j]].pc_class && char_dat[i].job_level < char_dat[id[j]].job_level) || // if same job and job level, we sort by job exp. - (char_dat[i].class == char_dat[id[j]].class && + (char_dat[i].pc_class == char_dat[id[j]].pc_class && char_dat[i].job_level == char_dat[id[j]].job_level && char_dat[i].job_exp < @@ -1459,7 +1457,7 @@ void create_online_files (void) // displaying of the job if (online_display_option & 6) { - char *jobname = job_name (char_dat[j].class); + char *jobname = job_name (char_dat[j].pc_class); if ((online_display_option & 6) == 6) { fprintf (fp2, " <td>%s %d/%d</td>\n", @@ -1638,7 +1636,7 @@ int mmo_char_send006b (int fd, struct char_session_data *sd) WFIFOW (fd, j + 46) = (p->sp > 0x7fff) ? 0x7fff : p->sp; WFIFOW (fd, j + 48) = (p->max_sp > 0x7fff) ? 0x7fff : p->max_sp; WFIFOW (fd, j + 50) = DEFAULT_WALK_SPEED; // p->speed; - WFIFOW (fd, j + 52) = p->class; + WFIFOW (fd, j + 52) = p->pc_class; WFIFOW (fd, j + 54) = p->hair; // WFIFOW(fd,j+56) = p->weapon; // dont send weapon since TMW does not support it WFIFOW (fd, j + 56) = 0; @@ -1790,7 +1788,7 @@ int disconnect_player (int accound_id) // disconnect player if online on char-server for (i = 0; i < fd_max; i++) { - if (session[i] && (sd = session[i]->session_data)) + if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) { if (sd->account_id == accound_id) { @@ -1849,7 +1847,7 @@ void parse_tologin (int fd) return; } - sd = session[fd]->session_data; + sd = (struct char_session_data*)session[fd]->session_data; while (RFIFOREST (fd) >= 2) { @@ -1892,7 +1890,7 @@ void parse_tologin (int fd) // printf("parse_tologin 2713 : %d\n", RFIFOB(fd,6)); for (i = 0; i < fd_max; i++) { - if (session[i] && (sd = session[i]->session_data) + if (session[i] && (sd = (struct char_session_data*)session[i]->session_data) && sd->account_id == RFIFOL (fd, 2)) { if (RFIFOB (fd, 6) != 0) @@ -1935,7 +1933,7 @@ void parse_tologin (int fd) return; for (i = 0; i < fd_max; i++) { - if (session[i] && (sd = session[i]->session_data)) + if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) { if (sd->account_id == RFIFOL (fd, 2)) { @@ -1979,7 +1977,7 @@ void parse_tologin (int fd) { if (char_dat[i].account_id == acc) { - int jobclass = char_dat[i].class; + int jobclass = char_dat[i].pc_class; char_dat[i].sex = sex; // auth_fifo[i].sex = sex; if (jobclass == 19 || jobclass == 20 || @@ -1989,18 +1987,18 @@ void parse_tologin (int fd) // job modification if (jobclass == 19 || jobclass == 20) { - char_dat[i].class = (sex) ? 19 : 20; + char_dat[i].pc_class = (sex) ? 19 : 20; } else if (jobclass == 4020 || jobclass == 4021) { - char_dat[i].class = + char_dat[i].pc_class = (sex) ? 4020 : 4021; } else if (jobclass == 4042 || jobclass == 4043) { - char_dat[i].class = + char_dat[i].pc_class = (sex) ? 4042 : 4043; } } @@ -2216,7 +2214,7 @@ void parse_tologin (int fd) for (j = 0; j < fd_max; j++) { if (session[j] - && (sd2 = session[j]->session_data) + && (sd2 = (struct char_session_data*)session[j]->session_data) && sd2->account_id == char_dat[char_num - 1].account_id) { @@ -2311,7 +2309,7 @@ void parse_tologin (int fd) for (i = 0; i < fd_max; i++) { - if (session[i] && (sd = session[i]->session_data)) + if (session[i] && (sd = (struct char_session_data*)session[i]->session_data)) { if (sd->account_id == acc) { @@ -2963,7 +2961,7 @@ void parse_char (int fd) return; } - sd = session[fd]->session_data; + sd = (struct char_session_data*)session[fd]->session_data; while (RFIFOREST (fd) >= 2) { @@ -3290,7 +3288,7 @@ void parse_char (int fd) (char_dat[i].max_sp > 0x7fff) ? 0x7fff : char_dat[i].max_sp; WFIFOW (fd, 2 + 50) = DEFAULT_WALK_SPEED; // char_dat[i].speed; - WFIFOW (fd, 2 + 52) = char_dat[i].class; + WFIFOW (fd, 2 + 52) = char_dat[i].pc_class; WFIFOW (fd, 2 + 54) = char_dat[i].hair; WFIFOW (fd, 2 + 58) = char_dat[i].base_level; @@ -3412,7 +3410,7 @@ void parse_char (int fd) for (j = 0; j < fd_max; j++) { if (session[j] - && (sd2 = + && (sd2 = (struct char_session_data*) session[j]->session_data) && sd2->account_id == char_dat[char_num - 1].account_id) diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 9715700..b0c3ccf 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -49,7 +49,7 @@ int inter_guild_tostr (char *str, struct guild *g) len += sprintf (str + len, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\t%s\t", m->account_id, m->char_id, m->hair, m->hair_color, m->gender, - m->class, m->lv, m->exp, m->exp_payper, m->position, + m->pc_class, m->lv, m->exp, m->exp_payper, m->position, ((m->account_id > 0) ? m->name : "-")); } // 役職 @@ -154,7 +154,7 @@ int inter_guild_fromstr (char *str, struct guild *g) m->hair = tmp_int[2]; m->hair_color = tmp_int[3]; m->gender = tmp_int[4]; - m->class = tmp_int[5]; + m->pc_class = tmp_int[5]; m->lv = tmp_int[6]; m->exp = tmp_int[7]; m->exp_payper = tmp_int[8]; @@ -398,7 +398,7 @@ int inter_guildcastle_fromstr (char *str, struct guild_castle *gc) } // ギルド関連データベース読み込み -int inter_guild_readdb () +int inter_guild_readdb (void) { int i; FILE *fp; @@ -424,7 +424,7 @@ int inter_guild_readdb () } // ギルドデータの読み込み -int inter_guild_init () +int inter_guild_init (void) { char line[16384]; struct guild *g; @@ -535,9 +535,7 @@ int inter_guild_init () struct guild *inter_guild_search (int guild_id) { - struct guild *g; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); return g; } @@ -565,7 +563,7 @@ void inter_castle_save_sub (db_key_t key, db_val_t data, va_list ap) } // ギルドデータのセーブ -int inter_guild_save () +int inter_guild_save (void) { FILE *fp; int lock; @@ -839,7 +837,7 @@ int mapif_guild_memberinfoshort (struct guild *g, int idx) WBUFL (buf, 10) = 0 /*g->member[idx].char_id*/; WBUFB (buf, 14) = g->member[idx].online; WBUFW (buf, 15) = g->member[idx].lv; - WBUFW (buf, 17) = g->member[idx].class; + WBUFW (buf, 17) = g->member[idx].pc_class; mapif_sendall (buf, 19); return 0; } @@ -1091,9 +1089,7 @@ int mapif_parse_CreateGuild (int fd, int account_id, char *name, // ギルド情報要求 int mapif_parse_GuildInfo (int fd, int guild_id) { - struct guild *g; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g != NULL) { guild_calcinfo (g); @@ -1108,17 +1104,14 @@ int mapif_parse_GuildInfo (int fd, int guild_id) // ギルドメンバ追加要求 int mapif_parse_GuildAddMember (int fd, int guild_id, struct guild_member *m) { - struct guild *g; - int i; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) { mapif_guild_memberadded (fd, guild_id, m->account_id, 0 /*char_id*/, 1); return 0; } - for (i = 0; i < g->max_member; i++) + for (int i = 0; i < g->max_member; i++) { if (g->member[i].account_id == 0) { @@ -1140,13 +1133,10 @@ int mapif_parse_GuildAddMember (int fd, int guild_id, struct guild_member *m) int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { - struct guild *g = NULL; - int i, j; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g != NULL) { - for (i = 0; i < MAX_GUILD; i++) + for (int i = 0; i < MAX_GUILD; i++) { if (g->member[i].account_id == account_id) { @@ -1154,7 +1144,9 @@ int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, // printf("%d %s\n", i, g->member[i].name); if (flag) - { // 追放の場合追放リストに入れる + { + int j; + // 追放の場合追放リストに入れる for (j = 0; j < MAX_GUILDEXPLUSION; j++) { if (g->explusion[j].account_id == 0) @@ -1191,26 +1183,23 @@ int mapif_parse_GuildLeave (int fd, int guild_id, int account_id, int char_id, // オンライン/Lv更新 int mapif_parse_GuildChangeMemberInfoShort (int fd, int guild_id, int account_id, int char_id, - int online, int lv, int class) + int online, int lv, int pc_class) { - struct guild *g; - int i, alv, c; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) return 0; g->connect_member = 0; - alv = 0; - c = 0; - for (i = 0; i < MAX_GUILD; i++) + int alv = 0; + int c = 0; + for (int i = 0; i < MAX_GUILD; i++) { if (g->member[i].account_id == account_id) { g->member[i].online = online; g->member[i].lv = lv; - g->member[i].class = class; + g->member[i].pc_class = pc_class; mapif_guild_memberinfoshort (g, i); } if (g->member[i].account_id > 0) @@ -1244,9 +1233,7 @@ void guild_break_sub (db_key_t key, db_val_t data, va_list ap) // ギルド解散要求 int mapif_parse_BreakGuild (int fd, int guild_id) { - struct guild *g; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) return 0; @@ -1272,10 +1259,9 @@ int mapif_parse_GuildMessage (int fd, int guild_id, int account_id, char *mes, int mapif_parse_GuildBasicInfoChange (int fd, int guild_id, int type, const char *data, int len) { - struct guild *g; short dw = *((short *) data); - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) return 0; @@ -1307,9 +1293,7 @@ int mapif_parse_GuildMemberInfoChange (int fd, int guild_id, int account_id, const char *data, int len) { int i; - struct guild *g; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) return 0; @@ -1351,7 +1335,7 @@ int mapif_parse_GuildMemberInfoChange (int fd, int guild_id, int account_id, int mapif_parse_GuildPosition (int fd, int guild_id, int idx, struct guild_position *p) { - struct guild *g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL || idx < 0 || idx >= MAX_GUILDPOSITION) { @@ -1368,7 +1352,7 @@ int mapif_parse_GuildPosition (int fd, int guild_id, int idx, int mapif_parse_GuildSkillUp (int fd, int guild_id, int skill_num, int account_id) { - struct guild *g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); int idx = skill_num - 10000; if (g == NULL || skill_num < 10000) @@ -1394,8 +1378,8 @@ int mapif_parse_GuildAlliance (int fd, int guild_id1, int guild_id2, struct guild *g[2]; int j, i; - g[0] = numdb_search (guild_db, guild_id1); - g[1] = numdb_search (guild_db, guild_id2); + g[0] = (struct guild *)numdb_search (guild_db, guild_id1); + g[1] = (struct guild *)numdb_search (guild_db, guild_id2); if (g[0] == NULL || g[1] == NULL) return 0; @@ -1436,9 +1420,7 @@ int mapif_parse_GuildAlliance (int fd, int guild_id1, int guild_id2, int mapif_parse_GuildNotice (int fd, int guild_id, const char *mes1, const char *mes2) { - struct guild *g; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) return 0; memcpy (g->mes1, mes1, 60); @@ -1451,9 +1433,7 @@ int mapif_parse_GuildNotice (int fd, int guild_id, const char *mes1, int mapif_parse_GuildEmblem (int fd, int len, int guild_id, int dummy, const char *data) { - struct guild *g; - - g = numdb_search (guild_db, guild_id); + struct guild *g = (struct guild *)numdb_search (guild_db, guild_id); if (g == NULL) return 0; memcpy (g->emblem_data, data, len); @@ -1465,7 +1445,7 @@ int mapif_parse_GuildEmblem (int fd, int len, int guild_id, int dummy, int mapif_parse_GuildCastleDataLoad (int fd, int castle_id, int index) { - struct guild_castle *gc = numdb_search (castle_db, castle_id); + struct guild_castle *gc = (struct guild_castle *)numdb_search (castle_db, castle_id); if (gc == NULL) { @@ -1560,7 +1540,7 @@ int mapif_parse_GuildCastleDataLoad (int fd, int castle_id, int index) int mapif_parse_GuildCastleDataSave (int fd, int castle_id, int index, int value) { - struct guild_castle *gc = numdb_search (castle_db, castle_id); + struct guild_castle *gc = (struct guild_castle *)numdb_search (castle_db, castle_id); if (gc == NULL) { @@ -1572,7 +1552,7 @@ int mapif_parse_GuildCastleDataSave (int fd, int castle_id, int index, if (gc->guild_id != value) { int gid = (value) ? value : gc->guild_id; - struct guild *g = numdb_search (guild_db, gid); + struct guild *g = (struct guild *)numdb_search (guild_db, gid); inter_log ("guild %s (id=%d) %s castle id=%d" RETCODE, (g) ? g->name : "??", gid, (value) ? "occupy" : "abandon", index); diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 954addf..5ac9a51 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -2,8 +2,8 @@ #ifndef _INT_GUILD_H_ #define _INT_GUILD_H_ -int inter_guild_init (); -int inter_guild_save (); +int inter_guild_init (void); +int inter_guild_save (void); int inter_guild_parse_frommap (int fd); struct guild *inter_guild_search (int guild_id); int inter_guild_mapif_init (int fd); diff --git a/src/char/int_party.c b/src/char/int_party.c index b728b1e..af79373 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -87,7 +87,7 @@ int inter_party_fromstr (char *str, struct party *p) } // パーティデータのロード -int inter_party_init () +int inter_party_init (void) { char line[8192]; struct party *p; @@ -144,7 +144,7 @@ void inter_party_save_sub (db_key_t key, db_val_t data, va_list ap) } // パーティーデータのセーブ -int inter_party_save () +int inter_party_save (void) { FILE *fp; int lock; @@ -460,9 +460,7 @@ int mapif_parse_CreateParty (int fd, int account_id, char *name, char *nick, // パーティ情報要求 int mapif_parse_PartyInfo (int fd, int party_id) { - struct party *p; - - p = numdb_search (party_db, party_id); + struct party *p = (struct party *)numdb_search (party_db, party_id); if (p != NULL) mapif_party_info (fd, p); else @@ -475,17 +473,14 @@ int mapif_parse_PartyInfo (int fd, int party_id) int mapif_parse_PartyAddMember (int fd, int party_id, int account_id, char *nick, char *map, int lv) { - struct party *p; - int i; - - p = numdb_search (party_db, party_id); + struct party *p = (struct party *)numdb_search (party_db, party_id); if (p == NULL) { mapif_party_memberadded (fd, party_id, account_id, 1); return 0; } - for (i = 0; i < MAX_PARTY; i++) + for (int i = 0; i < MAX_PARTY; i++) { if (p->member[i].account_id == 0) { @@ -519,14 +514,12 @@ int mapif_parse_PartyAddMember (int fd, int party_id, int account_id, int mapif_parse_PartyChangeOption (int fd, int party_id, int account_id, int exp, int item) { - struct party *p; - int flag = 0; - - p = numdb_search (party_db, party_id); + struct party *p = (struct party *)numdb_search (party_db, party_id); if (p == NULL) return 0; p->exp = exp; + int flag = 0; if (exp > 0 && !party_check_exp_share (p)) { flag |= 0x01; @@ -542,13 +535,10 @@ int mapif_parse_PartyChangeOption (int fd, int party_id, int account_id, // パーティ脱退要求 int mapif_parse_PartyLeave (int fd, int party_id, int account_id) { - struct party *p; - int i; - - p = numdb_search (party_db, party_id); + struct party *p = (struct party *)numdb_search (party_db, party_id); if (p != NULL) { - for (i = 0; i < MAX_PARTY; i++) + for (int i = 0; i < MAX_PARTY; i++) { if (p->member[i].account_id == account_id) { @@ -569,14 +559,11 @@ int mapif_parse_PartyLeave (int fd, int party_id, int account_id) int mapif_parse_PartyChangeMap (int fd, int party_id, int account_id, char *map, int online, int lv) { - struct party *p; - int i; - - p = numdb_search (party_db, party_id); + struct party *p = (struct party *)numdb_search (party_db, party_id); if (p == NULL) return 0; - for (i = 0; i < MAX_PARTY; i++) + for (int i = 0; i < MAX_PARTY; i++) { if (p->member[i].account_id == account_id) { @@ -604,9 +591,7 @@ int mapif_parse_PartyChangeMap (int fd, int party_id, int account_id, // パーティ解散要求 int mapif_parse_BreakParty (int fd, int party_id) { - struct party *p; - - p = numdb_search (party_db, party_id); + struct party *p = (struct party *)numdb_search (party_db, party_id); if (p == NULL) return 0; diff --git a/src/char/int_party.h b/src/char/int_party.h index 738b624..2007ed5 100644 --- a/src/char/int_party.h +++ b/src/char/int_party.h @@ -2,8 +2,8 @@ #ifndef _INT_PARTY_H_ #define _INT_PARTY_H_ -int inter_party_init (); -int inter_party_save (); +int inter_party_init (void); +int inter_party_save (void); int inter_party_parse_frommap (int fd); diff --git a/src/char/int_storage.c b/src/char/int_storage.c index 99af725..b3ec4da 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -248,7 +248,7 @@ struct guild_storage *guild2storage (int guild_id) //--------------------------------------------------------- // 倉庫データを読み込む -int inter_storage_init () +int inter_storage_init (void) { char line[65536]; int c = 0, tmp_int; @@ -328,7 +328,7 @@ void guild_storage_db_final (db_key_t k, db_val_t data, va_list ap) free (p); } -void inter_storage_final () +void inter_storage_final (void) { numdb_final (storage_db, storage_db_final); numdb_final (guild_storage_db, guild_storage_db_final); @@ -347,7 +347,7 @@ void inter_storage_save_sub (db_key_t key, db_val_t data, va_list ap) //--------------------------------------------------------- // 倉庫データを書き込む -int inter_storage_save () +int inter_storage_save (void) { FILE *fp; int lock; @@ -384,7 +384,7 @@ void inter_guild_storage_save_sub (db_key_t key, db_val_t data, va_list ap) //--------------------------------------------------------- // 倉庫データを書き込む -int inter_guild_storage_save () +int inter_guild_storage_save (void) { FILE *fp; int lock; diff --git a/src/char/int_storage.h b/src/char/int_storage.h index 5036600..f1859c6 100644 --- a/src/char/int_storage.h +++ b/src/char/int_storage.h @@ -2,10 +2,10 @@ #ifndef _INT_STORAGE_H_ #define _INT_STORAGE_H_ -int inter_storage_init (); -void inter_storage_final (); -int inter_storage_save (); -int inter_guild_storage_save (); +int inter_storage_init (void); +void inter_storage_final (void); +int inter_storage_save (void); +int inter_guild_storage_save (void); int inter_storage_delete (int account_id); int inter_guild_storage_delete (int guild_id); struct storage *account2storage (int account_id); diff --git a/src/char/inter.c b/src/char/inter.c index f563931..a1a5664 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -106,7 +106,7 @@ int inter_accreg_fromstr (const char *str, struct accreg *reg) } // アカウント変数の読み込み -int inter_accreg_init () +int inter_accreg_init (void) { char line[8192]; FILE *fp; @@ -155,7 +155,7 @@ void inter_accreg_save_sub (db_key_t key, db_val_t data, va_list ap) } // アカウント変数のセーブ -int inter_accreg_save () +int inter_accreg_save (void) { FILE *fp; int lock; @@ -262,7 +262,7 @@ int inter_log (char *fmt, ...) } // セーブ -int inter_save () +int inter_save (void) { inter_party_save (); inter_guild_save (); @@ -358,7 +358,7 @@ int mapif_account_reg (int fd, unsigned char *src) // アカウント変数要求返信 int mapif_account_reg_reply (int fd, int account_id) { - struct accreg *reg = numdb_search (accreg_db, account_id); + struct accreg *reg = (struct accreg *)numdb_search (accreg_db, account_id); WFIFOW (fd, 0) = 0x3804; WFIFOL (fd, 4) = account_id; @@ -395,7 +395,7 @@ void check_ttl_wisdata_sub (db_key_t key, db_val_t data, va_list ap) wis_dellist[wis_delnum++] = wd->id; } -int check_ttl_wisdata () +int check_ttl_wisdata (void) { unsigned long tick = gettick (); int i; @@ -406,7 +406,7 @@ int check_ttl_wisdata () numdb_foreach (wis_db, check_ttl_wisdata_sub, tick); for (i = 0; i < wis_delnum; i++) { - struct WisData *wd = numdb_search (wis_db, wis_dellist[i]); + struct WisData *wd = (struct WisData *)numdb_search (wis_db, wis_dellist[i]); printf ("inter: wis data id=%d time out : from %s to %s\n", wd->id, wd->src, wd->dst); // removed. not send information after a timeout. Just no answer for the player @@ -499,7 +499,7 @@ int mapif_parse_WisRequest (int fd) int mapif_parse_WisReply (int fd) { int id = RFIFOL (fd, 2), flag = RFIFOB (fd, 6); - struct WisData *wd = numdb_search (wis_db, id); + struct WisData *wd = (struct WisData *)numdb_search (wis_db, id); if (wd == NULL) return 0; // This wisp was probably suppress before, because it was timeout of because of target was found on another map-server @@ -530,7 +530,7 @@ int mapif_parse_WisToGM (int fd) int mapif_parse_AccReg (int fd) { int j, p; - struct accreg *reg = numdb_search (accreg_db, (numdb_key_t)RFIFOL (fd, 4)); + struct accreg *reg = (struct accreg*)numdb_search (accreg_db, (numdb_key_t)RFIFOL (fd, 4)); if (reg == NULL) { diff --git a/src/char/inter.h b/src/char/inter.h index 7ad7d08..219f195 100644 --- a/src/char/inter.h +++ b/src/char/inter.h @@ -3,7 +3,7 @@ #define _INTER_H_ int inter_init (const char *file); -int inter_save (); +int inter_save (void); int inter_parse_frommap (int fd); int inter_mapif_init (int fd); |