From 4948c8a36b6fa25641beb47c3d3f80eb8bf9253e Mon Sep 17 00:00:00 2001 From: LocalIdentity Date: Mon, 2 Jun 2025 05:50:57 +1000 Subject: [PATCH] Fix Tincture CDR mod and Mana Burn rate display bug Tinctures were interpreting the CDR mod as a global CDR mod when it's only meant to affect the cooldown of the Tincture itself The local mod is also additive with the global mod on the tree and was mistakenly being treated as multiplicative with the way we were handling it They also showed the tooltip for mana burn per second, but the number being shown was the seconds per mana burn. Fixed it to show the rate per second as intended --- src/Classes/Item.lua | 3 ++- src/Classes/ItemsTab.lua | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Classes/Item.lua b/src/Classes/Item.lua index 42901ab266..7ee7e46d0f 100644 --- a/src/Classes/Item.lua +++ b/src/Classes/Item.lua @@ -1516,7 +1516,8 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum) elseif self.base.tincture then local tinctureData = self.tinctureData tinctureData.manaBurn = (self.base.tincture.manaBurn + 0.01) / (1 + calcLocal(modList, "TinctureManaBurnRate", "INC", 0) / 100) / (1 + calcLocal(modList, "TinctureManaBurnRate", "MORE", 0) / 100) - tinctureData.cooldown = self.base.tincture.cooldown / (1 + calcLocal(modList, "TinctureCooldownRecovery", "INC", 0) / 100) + tinctureData.cooldownInc = calcLocal(modList, "TinctureCooldownRecovery", "INC", 0) + calcLocal(modList, "CooldownRecovery", "INC", 0) + tinctureData.cooldown = self.base.tincture.cooldown / (1 + tinctureData.cooldownInc / 100) tinctureData.effectInc = calcLocal(modList, "TinctureEffect", "INC", 0) + calcLocal(modList, "LocalEffect", "INC", 0) for _, value in ipairs(modList:List(nil, "TinctureData")) do tinctureData[value.key] = value.value diff --git a/src/Classes/ItemsTab.lua b/src/Classes/ItemsTab.lua index 2fb63b402d..5715497f96 100644 --- a/src/Classes/ItemsTab.lua +++ b/src/Classes/ItemsTab.lua @@ -3681,12 +3681,12 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode) if effectMod ~= 1 then t_insert(stats, s_format("^8Tincture effect modifier: ^7%+d%%", effectMod * 100 - 100)) end - t_insert(stats, s_format("^8Mana Burn Inflicted Every Second: ^7%.2f", tinctureData.manaBurn / (1 + modDB:Sum("INC", { actor = "player" }, "TinctureManaBurnRate")/100) / (1 + modDB:Sum("MORE", { actor = "player" }, "TinctureManaBurnRate")/100))) + t_insert(stats, s_format("^8Mana Burn Inflicted Every Second: ^7%.2f", 1 / (tinctureData.manaBurn / (1 + modDB:Sum("INC", { actor = "player" }, "TinctureManaBurnRate") / 100) / (1 + modDB:Sum("MORE", { actor = "player" }, "TinctureManaBurnRate") / 100)))) local TincturesNotInflictManaBurn = m_min(modDB:Sum("BASE", nil, "TincturesNotInflictManaBurn"), 100) if TincturesNotInflictManaBurn ~= 0 then t_insert(stats, s_format("^8Chance to not inflict Mana Burn: ^7%d%%", TincturesNotInflictManaBurn)) end - t_insert(stats, s_format("^8Tincture Cooldown when deactivated: ^7%.2f^8 seconds", tinctureData.cooldown / (1 + modDB:Sum("INC", { actor = "player" }, "TinctureCooldownRecovery")/100))) + t_insert(stats, s_format("^8Tincture Cooldown when deactivated: ^7%.2f^8 seconds", base.tincture.cooldown / (1 + (modDB:Sum("INC", { actor = "player" }, "TinctureCooldownRecovery") + tinctureData.cooldownInc) / 100))) if stats[1] then tooltip:AddLine(14, "^7Effective tincture stats:")