Skip to content

Commit 7e6e59b

Browse files
LocalIdentityLocalIdentity
andauthored
Fix Tincture CDR mod and Mana Burn rate display bug (#8611)
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 Co-authored-by: LocalIdentity <localidentity2@gmail.com>
1 parent 3a65920 commit 7e6e59b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Classes/Item.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,8 @@ function ItemClass:BuildModListForSlotNum(baseList, slotNum)
15161516
elseif self.base.tincture then
15171517
local tinctureData = self.tinctureData
15181518
tinctureData.manaBurn = (self.base.tincture.manaBurn + 0.01) / (1 + calcLocal(modList, "TinctureManaBurnRate", "INC", 0) / 100) / (1 + calcLocal(modList, "TinctureManaBurnRate", "MORE", 0) / 100)
1519-
tinctureData.cooldown = self.base.tincture.cooldown / (1 + calcLocal(modList, "TinctureCooldownRecovery", "INC", 0) / 100)
1519+
tinctureData.cooldownInc = calcLocal(modList, "TinctureCooldownRecovery", "INC", 0) + calcLocal(modList, "CooldownRecovery", "INC", 0)
1520+
tinctureData.cooldown = self.base.tincture.cooldown / (1 + tinctureData.cooldownInc / 100)
15201521
tinctureData.effectInc = calcLocal(modList, "TinctureEffect", "INC", 0) + calcLocal(modList, "LocalEffect", "INC", 0)
15211522
for _, value in ipairs(modList:List(nil, "TinctureData")) do
15221523
tinctureData[value.key] = value.value

src/Classes/ItemsTab.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3681,12 +3681,12 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
36813681
if effectMod ~= 1 then
36823682
t_insert(stats, s_format("^8Tincture effect modifier: ^7%+d%%", effectMod * 100 - 100))
36833683
end
3684-
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)))
3684+
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))))
36853685
local TincturesNotInflictManaBurn = m_min(modDB:Sum("BASE", nil, "TincturesNotInflictManaBurn"), 100)
36863686
if TincturesNotInflictManaBurn ~= 0 then
36873687
t_insert(stats, s_format("^8Chance to not inflict Mana Burn: ^7%d%%", TincturesNotInflictManaBurn))
36883688
end
3689-
t_insert(stats, s_format("^8Tincture Cooldown when deactivated: ^7%.2f^8 seconds", tinctureData.cooldown / (1 + modDB:Sum("INC", { actor = "player" }, "TinctureCooldownRecovery")/100)))
3689+
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)))
36903690

36913691
if stats[1] then
36923692
tooltip:AddLine(14, "^7Effective tincture stats:")

0 commit comments

Comments
 (0)