diff --git a/conf/char_athena.conf b/conf/char_athena.conf index 174ffc1189..df68af1746 100644 --- a/conf/char_athena.conf +++ b/conf/char_athena.conf @@ -84,6 +84,7 @@ char_new_display: 0 max_connect_user: -1 // Group ID that is allowed to bypass the server limit of users. +// Or to connect when the char is in maintenance mode (groupid >= allow) // Default: -1 = nobody (there are no groups with ID < 0) // See: conf/groups.conf gm_allow_group: 99 diff --git a/db/pre-re/skill_unit_db.txt b/db/pre-re/skill_unit_db.txt index 69f47c44dd..6048b632c4 100644 --- a/db/pre-re/skill_unit_db.txt +++ b/db/pre-re/skill_unit_db.txt @@ -28,7 +28,7 @@ 12,0x7e, , 0, 0, -1,all, 0x003 //MG_SAFETYWALL 18,0x7f, , -1, 0, 20,enemy, 0x010 //MG_FIREWALL 21,0x86, , 0, 2,1000,enemy, 0x018 //MG_THUNDERSTORM - 25,0x85, , 1, 0, -1,all, 0x003 //AL_PNEUMA + 25,0x85, , 1, 0, -1,all, 0x2003 //AL_PNEUMA 27,0x81,0x80, 0, 0, -1,all, 0x00E //AL_WARP 47,0x86, , 0, 2,1000,enemy, 0x080 //AC_SHOWER 70,0x83, , -1, 1,1000,all, 0x018 //PR_SANCTUARY diff --git a/src/char/char.c b/src/char/char.c index a024fae361..4e7c790a55 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2552,7 +2552,8 @@ int parse_fromlogin(int fd) { // continued from char_auth_ok... if( server_id == ARRAYLENGTH(server) || //server not online, bugreport:2359 (max_connect_user == 0 && sd->group_id != gm_allow_group) || - ( max_connect_user > 0 && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) ) { + ( max_connect_user > 0 && count_users() >= max_connect_user && sd->group_id != gm_allow_group ) || + (char_maintenance && sd->group_id < gm_allow_group) ) { // refuse connection (over populated) WFIFOHEAD(i,3); WFIFOW(i,0) = 0x6c; diff --git a/src/map/date.h b/src/map/date.h index df785e8a8c..625e208c02 100644 --- a/src/map/date.h +++ b/src/map/date.h @@ -7,7 +7,6 @@ #ifdef __cplusplus extern "C" { #endif - int date_get_year(void); int date_get_month(void); int date_get_day(void); @@ -22,5 +21,4 @@ int is_day_of_star(void); #ifdef __cplusplus } #endif - #endif /* _DATE_H_ */ diff --git a/src/map/guild.c b/src/map/guild.c index 1d0ec6b240..9b0bdbb274 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -100,10 +100,10 @@ int guild_skill_get_max (int id) // Retrive skill_lv learned by guild int guild_checkskill(struct guild *g, int id) { - int idx = id - GD_SKILLBASE; - if (idx < 0 || idx >= MAX_GUILDSKILL) - return 0; - return g->skill[idx].lv; + int idx = id - GD_SKILLBASE; + if (idx < 0 || idx >= MAX_GUILDSKILL) + return 0; + return g->skill[idx].lv; } /*========================================== diff --git a/src/map/pc.c b/src/map/pc.c index bcc468e903..c95aa37bca 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8500,6 +8500,7 @@ int pc_checkcombo(struct map_session_data *sd, struct item_data *data) { } CREATE(combo_idx,int16,data->combos[i]->count); + memset(combo_idx,0,data->combos[i]->count); for( j = 0; j < data->combos[i]->count; j++ ) { int id = data->combos[i]->nameid[j]; bool found = false; @@ -10463,9 +10464,10 @@ void pc_bonus_script_clear(struct map_session_data *sd, uint16 flag) { for (i = 0; i < MAX_PC_BONUS_SCRIPT; i++) { if (&sd->bonus_script[i] && sd->bonus_script[i].script && (sd->bonus_script[i].flag&flag || //Remove bonus script based on e_bonus_script_flags - (sd->bonus_script[i].type && - (flag&BONUS_FLAG_REM_BUFF && sd->bonus_script[i].type == 1) || //Remove bonus script based on buff type - (flag&BONUS_FLAG_REM_DEBUFF && sd->bonus_script[i].type == 2)))) //Remove bonus script based on debuff type + (sd->bonus_script[i].type && ( + (flag&BONUS_FLAG_REM_BUFF && sd->bonus_script[i].type == 1) || //Remove bonus script based on buff type + (flag&BONUS_FLAG_REM_DEBUFF && sd->bonus_script[i].type == 2)) //Remove bonus script based on debuff type + ))) { delete_timer(sd->bonus_script[i].tid,pc_bonus_script_timer); pc_bonus_script_remove(sd,i); diff --git a/src/map/skill.c b/src/map/skill.c index 10ead9a746..ccdad9aa71 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3485,11 +3485,11 @@ static int skill_timerskill(int tid, unsigned int tick, int id, intptr_t data) break; case SC_FATALMENACE: if( src == target ) // Casters Part - unit_warp(src, -1, skl->x, skl->y, 3); + unit_warp(src, -1, skl->x, skl->y, CLR_TELEPORT); else { // Target's Part short x = skl->x, y = skl->y; map_search_freecell(NULL, target->m, &x, &y, 2, 2, 1); - unit_warp(target,-1,x,y,3); + unit_warp(target,-1,x,y,CLR_TELEPORT); } break; case LG_MOONSLASHER: @@ -12550,7 +12550,7 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns if( tsd && !map[bl->m].flag.noteleport ) pc_randomwarp(tsd,3); else if( bl->type == BL_MOB && battle_config.mob_warp&8 ) - unit_warp(bl,-1,-1,-1,3); + unit_warp(bl,-1,-1,-1,CLR_TELEPORT); break; case UNT_REVERBERATION: