Bladeren bron

Fix maximum ratio for MOB_ITEM_RATIO_DB (#7836)

Fixes #7835
Vincent Stumpf 1 jaar geleden
bovenliggende
commit
f20f8b01be
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. 2 2
      src/map/mob.cpp
  2. 1 1
      src/map/mob.hpp

+ 2 - 2
src/map/mob.cpp

@@ -6175,9 +6175,9 @@ uint64 MobItemRatioDatabase::parseBodyNode(const ryml::NodeRef& node) {
 	}
 	
 	if (this->nodeExists(node, "Ratio")) {
-		uint16 ratio;
+		uint32 ratio;
 
-		if (!this->asUInt16(node, "Ratio", ratio))
+		if (!this->asUInt32(node, "Ratio", ratio))
 			return 0;
 
 		data->drop_ratio = ratio;

+ 1 - 1
src/map/mob.hpp

@@ -219,7 +219,7 @@ public:
 
 struct s_mob_item_drop_ratio {
 	t_itemid nameid;
-	uint16 drop_ratio;
+	uint32 drop_ratio;
 	std::vector<uint16> mob_ids;
 };