Bladeren bron

Fixes mobs res/mres always 0 (#6760)

Fixes an issue where status_calc_misc resets the value of res/mres (potentially defined in mob_db.yml) to 0.

Thanks to @limitro !
Atemo 3 jaren geleden
bovenliggende
commit
de990f71ad
1 gewijzigde bestanden met toevoegingen van 4 en 2 verwijderingen
  1. 4 2
      src/map/status.cpp

+ 4 - 2
src/map/status.cpp

@@ -1995,8 +1995,10 @@ void status_calc_misc(struct block_list *bl, struct status_data *status, int lev
 		status->def2 = status->mdef2 =
 		status->cri = status->flee2 =
 		status->patk = status->smatk =
-		status->hplus = status->crate =
-		status->res = status->mres = 0;
+		status->hplus = status->crate = 0;
+		
+		if (bl->type != BL_MOB)	// BL_MOB has values set when loading mob_db
+			status->res = status->mres = 0;
 
 #ifdef RENEWAL // Renewal formulas
 	if (bl->type == BL_HOM) {