Added new mapflags for disabling renewal exp & drop penalty (#6541)

This commit is contained in:
Jittapan Pluemsumran 2022-01-21 20:28:42 +07:00 committed by GitHub
parent e40da669ed
commit 53a367785d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -434,3 +434,15 @@ Hides monster's HP bar on a map.
Ignores config value of 'monster_hp_bars_info'.
---------------------------------------
*norenewaldroppenalty
Disable renewal drop rate penalty due to level difference on a map.
---------------------------------------
*norenewalexppenalty
Disable renewal experience penalty due to level difference on a map.
---------------------------------------

View File

@ -645,6 +645,8 @@ enum e_mapflag : int16 {
MF_SKILL_DURATION,
MF_NOCASHSHOP,
MF_NORODEX,
MF_NORENEWALEXPPENALTY,
MF_NORENEWALDROPPENALTY,
MF_MAX
};

View File

@ -12613,6 +12613,10 @@ uint16 pc_level_penalty_mod( struct map_session_data* sd, e_penalty_type type, s
return 100;
}
if ((type == PENALTY_DROP && map_getmapflag(sd->bl.m, MF_NORENEWALDROPPENALTY)) || (type == PENALTY_EXP && map_getmapflag(sd->bl.m, MF_NORENEWALEXPPENALTY))) {
return 100;
}
int monster_level;
if( md != nullptr ){

View File

@ -531,6 +531,8 @@
export_constant(MF_SKILL_DURATION);
export_constant(MF_NOCASHSHOP);
export_constant(MF_NORODEX);
export_constant(MF_NORENEWALDROPPENALTY);
export_constant(MF_NORENEWALEXPPENALTY);
/* setcell types */
export_constant(CELL_WALKABLE);