Misc Upd
Fix pneuma display for pre-re mode Add char_maintenance mode to check trought gm_allow_group as a minimum groupid to enter. (thx to SuperHulk) Fix UB warning on bonus_script check by type Properly initialize combo_idx check
This commit is contained in:
parent
487f84ef92
commit
cb7e4b44cd
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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_ */
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user