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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:")
|
||||
|
||||
Reference in New Issue
Block a user