From f20f8b01bead57fe549b0e635d5d2bdad7327a6f Mon Sep 17 00:00:00 2001 From: Vincent Stumpf Date: Mon, 3 Jul 2023 19:19:18 -0700 Subject: [PATCH] Fix maximum ratio for MOB_ITEM_RATIO_DB (#7836) Fixes #7835 --- src/map/mob.cpp | 4 ++-- src/map/mob.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/mob.cpp b/src/map/mob.cpp index 71f8207609..09c976913f 100644 --- a/src/map/mob.cpp +++ b/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; diff --git a/src/map/mob.hpp b/src/map/mob.hpp index 9457cdf75f..58d7520115 100644 --- a/src/map/mob.hpp +++ b/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 mob_ids; };