From 34f19489d03f6438dd290fa092d34e765cf769f3 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Wed, 28 Feb 2024 19:34:40 -0600 Subject: [PATCH] [Hotfix] Fix forage returning first result from table (#4130) Forage was not properly incrementing the total chance of items when more than one was found and would result in the final chance roll being based off the last item found rather than the total. This would cause the first item returned to be chosen in most cases when the chances are the same in the table. --- zone/forage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/forage.cpp b/zone/forage.cpp index 3371ffdb4..cdd488919 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -89,7 +89,7 @@ uint32 ZoneDatabase::LoadForage(uint32 zone_id, uint8 skill_level) } forage_items[count] = e.Itemid; - forage_chances[count] = e.chance; + forage_chances[count] = e.chance + current_chance; current_chance = forage_chances[count];