Browse Source

Added a check to prevent resetting a mob's hp to full when it levels up using the custom mobs_level_up feature (accidentally deleted in r13789) (bugreport:3216).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13871 54d463be-8e91-2dee-dedb-b68131a5f0ec
ultramage 16 năm trước cách đây
mục cha
commit
5435e5056a
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      src/map/status.c

+ 2 - 1
src/map/status.c

@@ -1503,7 +1503,8 @@ int status_calc_mob_(struct mob_data* md, bool first)
 		status->aspd_rate -= 100*md->guardian_data->guardup_lv;
 	}
 
-	memcpy(&md->status, status, sizeof(struct status_data));
+	if( first ) //Initial battle status
+		memcpy(&md->status, status, sizeof(struct status_data));
 
 	return 1;
 }