diff --git a/npc/warps/pvp.txt b/npc/warps/pvp.txt index da82d6d095..c22017a8b8 100644 --- a/npc/warps/pvp.txt +++ b/npc/warps/pvp.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Athena (any) //===== Current Version: ===================================== -//= 1.3 +//= 1.4 //===== Compatible With: ===================================== //= Any Athena Version //===== Description: ========================================= @@ -13,6 +13,7 @@ //= 1.1 Fixed Prontera Arena warp [Yor] //= 1.2 Added addition warps for PvP Nightmare Mode maps. //= 1.3 Fixed duplicate warp names [Timexy] +//= 1.4 Disabled ordeal_*-3 and ordeal_*-4 maps. //============================================================ //Battle Ordeal Mode @@ -40,30 +41,30 @@ ordeal_1-2,153,180,0 warp ord12-5 1,1,ordeal_1-2,144,284 ordeal_1-2,172,135,0 warp ord12-6 1,1,ordeal_1-2,284,24 ordeal_1-2,172,172,0 warp ord12-7 1,1,ordeal_1-2,284,284 ordeal_1-2,180,154,0 warp ord12-8 1,1,ordeal_1-2,284,164 -ordeal_1-3,100,150,0 warp ord13-1 1,1,ordeal_1-3,128,150 -ordeal_1-3,114,183,0 warp ord13-2 1,1,ordeal_1-3,135,163 -ordeal_1-3,115,115,0 warp ord13-3 1,1,ordeal_1-3,136,136 -ordeal_1-3,123,150,0 warp ord13-4 1,1,ordeal_1-3,95,150 -ordeal_1-3,130,168,0 warp ord13-5 1,1,ordeal_1-3,109,188 -ordeal_1-3,131,131,0 warp ord13-6 1,1,ordeal_1-3,110,110 -ordeal_1-3,148,176,0 warp ord13-7 1,1,ordeal_1-3,149,204 -ordeal_1-3,149,99,0 warp ord13-8 1,1,ordeal_1-3,151,129 -ordeal_1-3,149,199,0 warp ord13-9 1,1,ordeal_1-3,148,171 -ordeal_1-3,151,124,0 warp ord13-10 1,1,ordeal_1-3,151,94 -ordeal_1-3,168,168,0 warp ord13-11 1,1,ordeal_1-3,189,189 -ordeal_1-3,169,131,0 warp ord13-12 1,1,ordeal_1-3,188,111 -ordeal_1-3,176,150,0 warp ord13-13 1,1,ordeal_1-3,204,150 -ordeal_1-3,183,116,0 warp ord13-14 1,1,ordeal_1-3,164,136 -ordeal_1-3,184,184,0 warp ord13-15 1,1,ordeal_1-3,163,163 -ordeal_1-3,199,150,0 warp ord13-16 1,1,ordeal_1-3,171,150 -ordeal_1-4,128,154,0 warp ord14-1 1,1,ordeal_1-4,24,154 -ordeal_1-4,136,136,0 warp ord14-2 1,1,ordeal_1-4,24,24 -ordeal_1-4,136,172,0 warp ord14-3 1,1,ordeal_1-4,24,284 -ordeal_1-4,153,128,0 warp ord14-4 1,1,ordeal_1-4,153,23 -ordeal_1-4,153,180,0 warp ord14-5 1,1,ordeal_1-4,144,284 -ordeal_1-4,172,135,0 warp ord14-6 1,1,ordeal_1-4,284,24 -ordeal_1-4,172,172,0 warp ord14-7 1,1,ordeal_1-4,284,284 -ordeal_1-4,180,154,0 warp ord14-8 1,1,ordeal_1-4,284,164 +//ordeal_1-3,100,150,0 warp ord13-1 1,1,ordeal_1-3,128,150 +//ordeal_1-3,114,183,0 warp ord13-2 1,1,ordeal_1-3,135,163 +//ordeal_1-3,115,115,0 warp ord13-3 1,1,ordeal_1-3,136,136 +//ordeal_1-3,123,150,0 warp ord13-4 1,1,ordeal_1-3,95,150 +//ordeal_1-3,130,168,0 warp ord13-5 1,1,ordeal_1-3,109,188 +//ordeal_1-3,131,131,0 warp ord13-6 1,1,ordeal_1-3,110,110 +//ordeal_1-3,148,176,0 warp ord13-7 1,1,ordeal_1-3,149,204 +//ordeal_1-3,149,99,0 warp ord13-8 1,1,ordeal_1-3,151,129 +//ordeal_1-3,149,199,0 warp ord13-9 1,1,ordeal_1-3,148,171 +//ordeal_1-3,151,124,0 warp ord13-10 1,1,ordeal_1-3,151,94 +//ordeal_1-3,168,168,0 warp ord13-11 1,1,ordeal_1-3,189,189 +//ordeal_1-3,169,131,0 warp ord13-12 1,1,ordeal_1-3,188,111 +//ordeal_1-3,176,150,0 warp ord13-13 1,1,ordeal_1-3,204,150 +//ordeal_1-3,183,116,0 warp ord13-14 1,1,ordeal_1-3,164,136 +//ordeal_1-3,184,184,0 warp ord13-15 1,1,ordeal_1-3,163,163 +//ordeal_1-3,199,150,0 warp ord13-16 1,1,ordeal_1-3,171,150 +//ordeal_1-4,128,154,0 warp ord14-1 1,1,ordeal_1-4,24,154 +//ordeal_1-4,136,136,0 warp ord14-2 1,1,ordeal_1-4,24,24 +//ordeal_1-4,136,172,0 warp ord14-3 1,1,ordeal_1-4,24,284 +//ordeal_1-4,153,128,0 warp ord14-4 1,1,ordeal_1-4,153,23 +//ordeal_1-4,153,180,0 warp ord14-5 1,1,ordeal_1-4,144,284 +//ordeal_1-4,172,135,0 warp ord14-6 1,1,ordeal_1-4,284,24 +//ordeal_1-4,172,172,0 warp ord14-7 1,1,ordeal_1-4,284,284 +//ordeal_1-4,180,154,0 warp ord14-8 1,1,ordeal_1-4,284,164 ordeal_2-1,100,150,0 warp ord21-1 1,1,ordeal_2-1,128,150 ordeal_2-1,123,150,0 warp ord21-2 1,1,ordeal_2-1,95,150 ordeal_2-1,114,183,0 warp ord21-3 1,1,ordeal_2-1,135,163 @@ -88,30 +89,30 @@ ordeal_2-2,153,180,0 warp ord22-5 1,1,ordeal_2-2,144,284 ordeal_2-2,172,135,0 warp ord22-6 1,1,ordeal_2-2,284,24 ordeal_2-2,172,172,0 warp ord22-7 1,1,ordeal_2-2,284,284 ordeal_2-2,180,154,0 warp ord22-8 1,1,ordeal_2-2,284,164 -ordeal_2-3,100,150,0 warp ord23-1 1,1,ordeal_2-3,128,150 -ordeal_2-3,114,183,0 warp ord23-2 1,1,ordeal_2-3,135,163 -ordeal_2-3,115,115,0 warp ord23-3 1,1,ordeal_2-3,136,136 -ordeal_2-3,123,150,0 warp ord23-4 1,1,ordeal_2-3,95,150 -ordeal_2-3,130,168,0 warp ord23-5 1,1,ordeal_2-3,109,188 -ordeal_2-3,131,131,0 warp ord23-6 1,1,ordeal_2-3,110,110 -ordeal_2-3,148,176,0 warp ord23-7 1,1,ordeal_2-3,149,204 -ordeal_2-3,149,99,0 warp ord23-8 1,1,ordeal_2-3,151,129 -ordeal_2-3,149,199,0 warp ord23-9 1,1,ordeal_2-3,148,171 -ordeal_2-3,151,124,0 warp ord23-10 1,1,ordeal_2-3,151,94 -ordeal_2-3,168,168,0 warp ord23-11 1,1,ordeal_2-3,189,189 -ordeal_2-3,169,131,0 warp ord23-12 1,1,ordeal_2-3,188,111 -ordeal_2-3,176,150,0 warp ord23-13 1,1,ordeal_2-3,204,150 -ordeal_2-3,183,116,0 warp ord23-14 1,1,ordeal_2-3,164,136 -ordeal_2-3,184,184,0 warp ord23-15 1,1,ordeal_2-3,163,163 -ordeal_2-3,199,150,0 warp ord23-16 1,1,ordeal_2-3,171,150 -ordeal_2-4,128,154,0 warp ord24-1 1,1,ordeal_2-4,24,154 -ordeal_2-4,136,136,0 warp ord24-2 1,1,ordeal_2-4,24,24 -ordeal_2-4,136,172,0 warp ord24-3 1,1,ordeal_2-4,24,284 -ordeal_2-4,153,128,0 warp ord24-4 1,1,ordeal_2-4,153,23 -ordeal_2-4,153,180,0 warp ord24-5 1,1,ordeal_2-4,144,284 -ordeal_2-4,172,135,0 warp ord24-6 1,1,ordeal_2-4,284,24 -ordeal_2-4,172,172,0 warp ord24-7 1,1,ordeal_2-4,284,284 -ordeal_2-4,180,154,0 warp ord24-8 1,1,ordeal_2-4,284,164 +//ordeal_2-3,100,150,0 warp ord23-1 1,1,ordeal_2-3,128,150 +//ordeal_2-3,114,183,0 warp ord23-2 1,1,ordeal_2-3,135,163 +//ordeal_2-3,115,115,0 warp ord23-3 1,1,ordeal_2-3,136,136 +//ordeal_2-3,123,150,0 warp ord23-4 1,1,ordeal_2-3,95,150 +//ordeal_2-3,130,168,0 warp ord23-5 1,1,ordeal_2-3,109,188 +//ordeal_2-3,131,131,0 warp ord23-6 1,1,ordeal_2-3,110,110 +//ordeal_2-3,148,176,0 warp ord23-7 1,1,ordeal_2-3,149,204 +//ordeal_2-3,149,99,0 warp ord23-8 1,1,ordeal_2-3,151,129 +//ordeal_2-3,149,199,0 warp ord23-9 1,1,ordeal_2-3,148,171 +//ordeal_2-3,151,124,0 warp ord23-10 1,1,ordeal_2-3,151,94 +//ordeal_2-3,168,168,0 warp ord23-11 1,1,ordeal_2-3,189,189 +//ordeal_2-3,169,131,0 warp ord23-12 1,1,ordeal_2-3,188,111 +//ordeal_2-3,176,150,0 warp ord23-13 1,1,ordeal_2-3,204,150 +//ordeal_2-3,183,116,0 warp ord23-14 1,1,ordeal_2-3,164,136 +//ordeal_2-3,184,184,0 warp ord23-15 1,1,ordeal_2-3,163,163 +//ordeal_2-3,199,150,0 warp ord23-16 1,1,ordeal_2-3,171,150 +//ordeal_2-4,128,154,0 warp ord24-1 1,1,ordeal_2-4,24,154 +//ordeal_2-4,136,136,0 warp ord24-2 1,1,ordeal_2-4,24,24 +//ordeal_2-4,136,172,0 warp ord24-3 1,1,ordeal_2-4,24,284 +//ordeal_2-4,153,128,0 warp ord24-4 1,1,ordeal_2-4,153,23 +//ordeal_2-4,153,180,0 warp ord24-5 1,1,ordeal_2-4,144,284 +//ordeal_2-4,172,135,0 warp ord24-6 1,1,ordeal_2-4,284,24 +//ordeal_2-4,172,172,0 warp ord24-7 1,1,ordeal_2-4,284,284 +//ordeal_2-4,180,154,0 warp ord24-8 1,1,ordeal_2-4,284,164 ordeal_3-1,100,150,0 warp ord31-1 1,1,ordeal_3-1,128,150 ordeal_3-1,123,150,0 warp ord31-2 1,1,ordeal_3-1,95,150 ordeal_3-1,114,183,0 warp ord31-3 1,1,ordeal_3-1,135,163 @@ -136,39 +137,30 @@ ordeal_3-2,153,180,0 warp ord32-5 1,1,ordeal_3-2,144,284 ordeal_3-2,172,135,0 warp ord32-6 1,1,ordeal_3-2,284,24 ordeal_3-2,172,172,0 warp ord32-7 1,1,ordeal_3-2,284,284 ordeal_3-2,180,154,0 warp ord32-8 1,1,ordeal_3-2,284,164 -ordeal_3-3,100,150,0 warp ord33-1 1,1,ordeal_3-3,128,150 -ordeal_3-3,114,183,0 warp ord33-2 1,1,ordeal_3-3,135,163 -ordeal_3-3,115,115,0 warp ord33-3 1,1,ordeal_3-3,136,136 -ordeal_3-3,123,150,0 warp ord33-4 1,1,ordeal_3-3,95,150 -ordeal_3-3,130,168,0 warp ord33-5 1,1,ordeal_3-3,109,188 -ordeal_3-3,131,131,0 warp ord33-6 1,1,ordeal_3-3,110,110 -ordeal_3-3,148,176,0 warp ord33-7 1,1,ordeal_3-3,149,204 -ordeal_3-3,149,99,0 warp ord33-8 1,1,ordeal_3-3,151,129 -ordeal_3-3,149,199,0 warp ord33-9 1,1,ordeal_3-3,148,171 -ordeal_3-3,151,124,0 warp ord33-10 1,1,ordeal_3-3,151,94 -ordeal_3-3,168,168,0 warp ord33-11 1,1,ordeal_3-3,189,189 -ordeal_3-3,169,131,0 warp ord33-12 1,1,ordeal_3-3,188,111 -ordeal_3-3,176,150,0 warp ord33-13 1,1,ordeal_3-3,204,150 -ordeal_3-3,183,116,0 warp ord33-14 1,1,ordeal_3-3,164,136 -ordeal_3-3,184,184,0 warp ord33-15 1,1,ordeal_3-3,163,163 -ordeal_3-3,199,150,0 warp ord33-16 1,1,ordeal_3-3,171,150 -ordeal_3-4,128,154,0 warp ord34-1 1,1,ordeal_3-4,24,154 -ordeal_3-4,136,136,0 warp ord34-2 1,1,ordeal_3-4,24,24 -ordeal_3-4,136,172,0 warp ord34-3 1,1,ordeal_3-4,24,284 -ordeal_3-4,153,128,0 warp ord34-4 1,1,ordeal_3-4,153,23 -ordeal_3-4,153,180,0 warp ord34-5 1,1,ordeal_3-4,144,284 -ordeal_3-4,172,135,0 warp ord34-6 1,1,ordeal_3-4,284,24 -ordeal_3-4,172,172,0 warp ord34-7 1,1,ordeal_3-4,284,284 -ordeal_3-4,180,154,0 warp ord34-8 1,1,ordeal_3-4,284,164 -//This map doesn't even exists. Is it ordeal_a02 or ordea_la00? -//ordeal_a04,128,154,0 warp orda1 0,0,ordeal_a04,24,154 -//ordeal_a04,136,136,0 warp orda2 0,0,ordeal_a04,24,24 -//ordeal_a04,136,172,0 warp orda3 0,0,ordeal_a04,24,284 -//ordeal_a04,153,128,0 warp orda4 0,0,ordeal_a04,153,23 -//ordeal_a04,153,180,0 warp orda5 0,0,ordeal_a04,144,284 -//ordeal_a04,172,135,0 warp orda6 0,0,ordeal_a04,284,24 -//ordeal_a04,172,172,0 warp orda7 0,0,ordeal_a04,284,284 -//ordeal_a04,180,154,0 warp orda8 0,0,ordeal_a04,284,164 +//ordeal_3-3,100,150,0 warp ord33-1 1,1,ordeal_3-3,128,150 +//ordeal_3-3,114,183,0 warp ord33-2 1,1,ordeal_3-3,135,163 +//ordeal_3-3,115,115,0 warp ord33-3 1,1,ordeal_3-3,136,136 +//ordeal_3-3,123,150,0 warp ord33-4 1,1,ordeal_3-3,95,150 +//ordeal_3-3,130,168,0 warp ord33-5 1,1,ordeal_3-3,109,188 +//ordeal_3-3,131,131,0 warp ord33-6 1,1,ordeal_3-3,110,110 +//ordeal_3-3,148,176,0 warp ord33-7 1,1,ordeal_3-3,149,204 +//ordeal_3-3,149,99,0 warp ord33-8 1,1,ordeal_3-3,151,129 +//ordeal_3-3,149,199,0 warp ord33-9 1,1,ordeal_3-3,148,171 +//ordeal_3-3,151,124,0 warp ord33-10 1,1,ordeal_3-3,151,94 +//ordeal_3-3,168,168,0 warp ord33-11 1,1,ordeal_3-3,189,189 +//ordeal_3-3,169,131,0 warp ord33-12 1,1,ordeal_3-3,188,111 +//ordeal_3-3,176,150,0 warp ord33-13 1,1,ordeal_3-3,204,150 +//ordeal_3-3,183,116,0 warp ord33-14 1,1,ordeal_3-3,164,136 +//ordeal_3-3,184,184,0 warp ord33-15 1,1,ordeal_3-3,163,163 +//ordeal_3-3,199,150,0 warp ord33-16 1,1,ordeal_3-3,171,150 +//ordeal_3-4,128,154,0 warp ord34-1 1,1,ordeal_3-4,24,154 +//ordeal_3-4,136,136,0 warp ord34-2 1,1,ordeal_3-4,24,24 +//ordeal_3-4,136,172,0 warp ord34-3 1,1,ordeal_3-4,24,284 +//ordeal_3-4,153,128,0 warp ord34-4 1,1,ordeal_3-4,153,23 +//ordeal_3-4,153,180,0 warp ord34-5 1,1,ordeal_3-4,144,284 +//ordeal_3-4,172,135,0 warp ord34-6 1,1,ordeal_3-4,284,24 +//ordeal_3-4,172,172,0 warp ord34-7 1,1,ordeal_3-4,284,284 +//ordeal_3-4,180,154,0 warp ord34-8 1,1,ordeal_3-4,284,164 // PvP Nightmare More warps pvp_n_8-4,33,122,0 warp Link#pt_link_1-11 0,2,pvp_n_8-4,0,0 diff --git a/src/char/char.c b/src/char/char.c index 7fd7f5fad1..86d1dc28b5 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2832,8 +2832,6 @@ int parse_frommap(int fd) if( RFIFOREST(fd) < 18 ) return 0; { - struct auth_node* node; - int account_id = RFIFOL(fd,2); uint32 login_id1 = RFIFOL(fd,6); uint32 login_id2 = RFIFOL(fd,10); @@ -2850,6 +2848,8 @@ int parse_frommap(int fd) } else { + struct auth_node* node; + // create temporary auth entry CREATE(node, struct auth_node, 1); node->account_id = account_id; @@ -2879,7 +2879,6 @@ int parse_frommap(int fd) return 0; { int map_id, map_fd = -1; - struct online_char_data* data; struct mmo_charstatus* char_data; struct mmo_charstatus char_dat; @@ -2897,6 +2896,7 @@ int parse_frommap(int fd) session_isActive(map_fd) && char_data ) { //Send the map server the auth of this player. + struct online_char_data* data; struct auth_node* node; //Update the "last map" as this is where the player must be spawned on the new map server. @@ -4570,25 +4570,25 @@ int char_config_read(const char* cfgName) safestrncpy(wisp_server_name, w2, sizeof(wisp_server_name)); } } else if (strcmpi(w1, "login_ip") == 0) { - char ip_str[16]; login_ip = host2ip(w2); if (login_ip) { + char ip_str[16]; safestrncpy(login_ip_str, w2, sizeof(login_ip_str)); ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str)); } } else if (strcmpi(w1, "login_port") == 0) { login_port = atoi(w2); } else if (strcmpi(w1, "char_ip") == 0) { - char ip_str[16]; char_ip = host2ip(w2); - if (char_ip){ + if (char_ip) { + char ip_str[16]; safestrncpy(char_ip_str, w2, sizeof(char_ip_str)); ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(char_ip, ip_str)); } } else if (strcmpi(w1, "bind_ip") == 0) { - char ip_str[16]; bind_ip = host2ip(w2); if (bind_ip) { + char ip_str[16]; safestrncpy(bind_ip_str, w2, sizeof(bind_ip_str)); ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str)); } diff --git a/src/char/int_guild.c b/src/char/int_guild.c index 488e508a4d..8622fabc85 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -216,8 +216,8 @@ int inter_guild_tosql(struct guild *g,int flag) strcat(t_info, " level"); if( add_comma ) StringBuf_AppendStr(&buf, ", "); - else - add_comma = true; + //else //last condition using add_coma setting + // add_comma = true; StringBuf_Printf(&buf, "`guild_lv`=%d, `skill_point`=%d, `exp`=%"PRIu64", `next_exp`=%u, `max_member`=%d", g->guild_lv, g->skill_point, g->exp, g->next_exp, g->max_member); } StringBuf_Printf(&buf, " WHERE `guild_id`=%d", g->guild_id); @@ -508,7 +508,7 @@ struct guild * inter_guild_fromsql(int guild_id) { int id; Sql_GetData(sql_handle, 0, &data, NULL); id = atoi(data) - GD_SKILLBASE; - if( id < 0 && id >= MAX_GUILDSKILL ) + if( id < 0 || id >= MAX_GUILDSKILL ) continue;// invalid guild skill Sql_GetData(sql_handle, 1, &data, NULL); g->skill[id].lv = atoi(data); } @@ -603,7 +603,7 @@ static bool exp_guild_parse_row(char* split[], int column, int current) { unsigned int exp = (unsigned int)atol(split[0]); - if (exp < 0 || exp >= UINT_MAX) { + if (exp >= UINT_MAX) { ShowError("exp_guild: Invalid exp %d at line %d\n", exp, current); return false; } @@ -1261,7 +1261,7 @@ int mapif_parse_GuildAddMember(int fd,int guild_id,struct guild_member *m) // Delete member from guild int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes) { - int i, j; + int i; struct guild* g = inter_guild_fromsql(guild_id); if( g == NULL ) @@ -1284,6 +1284,7 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in if( flag ) { // Write expulsion reason // Find an empty slot + int j; ARR_FIND( 0, MAX_GUILDEXPULSION, j, g->expulsion[j].account_id == 0 ); if( j == MAX_GUILDEXPULSION ) { diff --git a/src/common/raconf.c b/src/common/raconf.c index 2703560ff7..f7d1284b76 100644 --- a/src/common/raconf.c +++ b/src/common/raconf.c @@ -41,12 +41,11 @@ struct conf_value{ static struct conf_value *makeValue(const char *key, char *val, size_t val_len){ struct conf_value *v; - char *p; - size_t sz; +/* size_t sz; sz = sizeof(struct conf_value); if(val_len >= sizeof(v->strval)) - sz += (val_len - sizeof(v->strval) + 1); + sz += (val_len - sizeof(v->strval) + 1);*/ v = (struct conf_value*)aCalloc(1, sizeof(struct conf_value)); if(v == NULL){ @@ -106,6 +105,7 @@ static struct conf_value *makeValue(const char *key, char *val, size_t val_len){ }else if( *val >='0' && *val <= '9'){ // begins with normal digit, so assume its dec. // is it float? bool is_float = false; + char *p; for(p = val; *p != '\0'; p++){ if(*p == '.'){ diff --git a/src/common/socket.c b/src/common/socket.c index d24a9c1d81..27ca66a9e0 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -1017,14 +1017,14 @@ int access_ipmask(const char* str, AccessControl* acc) { uint32 ip; uint32 mask; - unsigned int a[4]; - unsigned int m[4]; - int n; if( strcmp(str,"all") == 0 ) { ip = 0; mask = 0; } else { + unsigned int a[4]; + unsigned int m[4]; + int n; if( ((n=sscanf(str,"%u.%u.%u.%u/%u.%u.%u.%u",a,a+1,a+2,a+3,m,m+1,m+2,m+3)) != 8 && // not an ip + standard mask (n=sscanf(str,"%u.%u.%u.%u/%u",a,a+1,a+2,a+3,m)) != 5 && // not an ip + bit mask (n=sscanf(str,"%u.%u.%u.%u",a,a+1,a+2,a+3)) != 4 ) || // not an ip diff --git a/src/login/account_sql.c b/src/login/account_sql.c index 5073941e21..515604d217 100644 --- a/src/login/account_sql.c +++ b/src/login/account_sql.c @@ -486,7 +486,6 @@ static bool account_db_sql_iter_next(AccountDBIterator* self, struct mmo_account AccountDBIterator_SQL* iter = (AccountDBIterator_SQL*)self; AccountDB_SQL* db = (AccountDB_SQL*)iter->db; Sql* sql_handle = db->accounts; - int account_id; char* data; // get next account ID @@ -501,6 +500,7 @@ static bool account_db_sql_iter_next(AccountDBIterator* self, struct mmo_account SQL_SUCCESS == Sql_GetData(sql_handle, 0, &data, NULL) && data != NULL ) {// get account data + int account_id; account_id = atoi(data); if( mmo_auth_fromsql(db, acc, account_id) ) { diff --git a/src/login/login.c b/src/login/login.c index a02b27d98e..b74162aa6b 100644 --- a/src/login/login.c +++ b/src/login/login.c @@ -1605,10 +1605,11 @@ int login_config_read(const char* cfgName) ShowInfo("Console Silent Setting: %d\n", atoi(w2)); } else if( !strcmpi(w1, "bind_ip") ) { - char ip_str[16]; login_config.login_ip = host2ip(w2); - if( login_config.login_ip ) + if( login_config.login_ip ) { + char ip_str[16]; ShowStatus("Login server binding IP address : %s -> %s\n", w2, ip2str(login_config.login_ip, ip_str)); + } } else if( !strcmpi(w1, "login_port") ) { login_config.login_port = (uint16)atoi(w2); @@ -1653,10 +1654,10 @@ int login_config_read(const char* cfgName) else if(!strcmpi(w1, "client_hash")) { int group = 0; char md5[33]; - int i; if (sscanf(w2, "%d, %32s", &group, md5) == 2) { struct client_hash_node *nnode; + int i; CREATE(nnode, struct client_hash_node, 1); for (i = 0; i < 32; i += 2) { diff --git a/src/map/atcommand.c b/src/map/atcommand.c index db2a9ad796..190277a170 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -920,7 +920,7 @@ ACMD_FUNC(option) if (!message || !*message || sscanf(message, "%d %d %d", ¶m1, ¶m2, ¶m3) < 1 || param1 < 0 || param2 < 0 || param3 < 0) {// failed to match the parameters so inform the user of the options - const char* text = NULL; + const char* text; // attempt to find the setting information for this command text = atcommand_help_string( command ); @@ -1230,8 +1230,6 @@ ACMD_FUNC(item2) int item_id, number = 0; int identify = 0, refine = 0, attr = 0; int c1 = 0, c2 = 0, c3 = 0, c4 = 0; - int flag = 0; - int loop, get_count, i; nullpo_retr(-1, sd); memset(item_name, '\0', sizeof(item_name)); @@ -1254,6 +1252,8 @@ ACMD_FUNC(item2) item_id = item_data->nameid; if (item_id > 500) { + int flag = 0; + int loop, get_count, i; loop = 1; get_count = number; if (item_data->type == IT_WEAPON || item_data->type == IT_ARMOR || @@ -2161,7 +2161,6 @@ ACMD_FUNC(produce) { char item_name[100]; int item_id, attribute = 0, star = 0; - int flag = 0; struct item_data *item_data; struct item tmp_item; nullpo_retr(-1, sd); @@ -2186,6 +2185,7 @@ ACMD_FUNC(produce) item_id = item_data->nameid; if (itemdb_isequip2(item_data)) { + int flag = 0; if (attribute < MIN_ATTRIBUTE || attribute > MAX_ATTRIBUTE) attribute = ATTRIBUTE_NORMAL; if (star < MIN_STAR || star > MAX_STAR) @@ -2822,7 +2822,7 @@ ACMD_FUNC(char_ban) memset(atcmd_output, '\0', sizeof(atcmd_output)); memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); - if (!message || !*message || sscanf(message, "%s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { + if (!message || !*message || sscanf(message, "%255s %23[^\n]", atcmd_output, atcmd_player_name) < 2) { clif_displaymessage(fd, msg_txt(1022)); // Please enter ban time and a player name (usage: @charban/@ban/@banish/@charbanish