From 3e4da130714b7d7beb9a0722abbaf0151ac388eb Mon Sep 17 00:00:00 2001 From: WinterSolstice8 <60417494+wintersolstice8@users.noreply.github.com> Date: Thu, 23 Jan 2025 16:55:32 -0700 Subject: [PATCH] [core] Move proc rate bonus calculation to run after SA/TA check co-authored-by: Will Buck --- src/map/utils/battleutils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/utils/battleutils.cpp b/src/map/utils/battleutils.cpp index ef19d3038d7..51857ae9fe9 100644 --- a/src/map/utils/battleutils.cpp +++ b/src/map/utils/battleutils.cpp @@ -1163,8 +1163,6 @@ namespace battleutils // The player has job point gifts that apply this mod. float procRateBonus = 1.f + (PChar->getMod(Mod::TREASURE_HUNTER_PROC) + PMob->getMod(Mod::TREASURE_HUNTER_PROC)) / 100.f; - procRate *= procRateBonus; - // It's unlikely that SATA bonus is multiplicative SA * TA bonus -- the rate would be astronomically higher if it was // Add the two together if they exist float sneakAttackTrickAttackBonus = 0.f; @@ -1187,6 +1185,8 @@ namespace battleutils procRateBonus *= sneakAttackTrickAttackBonus; } + procRate *= procRateBonus; + if (xirand::GetRandomNumber(0.f, 1.f) <= procRate) { PMob->m_THLvl++;