瀏覽代碼

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

Jittapan Pluemsumran 3 年之前
父節點
當前提交
53a367785d
共有 4 個文件被更改,包括 20 次插入0 次删除
  1. 12 0
      doc/mapflags.txt
  2. 2 0
      src/map/map.hpp
  3. 4 0
      src/map/pc.cpp
  4. 2 0
      src/map/script_constants.hpp

+ 12 - 0
doc/mapflags.txt

@@ -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.
+
+---------------------------------------

+ 2 - 0
src/map/map.hpp

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

+ 4 - 0
src/map/pc.cpp

@@ -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 ){

+ 2 - 0
src/map/script_constants.hpp

@@ -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);