Skip to content

Commit

Permalink
fix tincture quality (#7894)
Browse files Browse the repository at this point in the history
  • Loading branch information
Regisle authored Jul 25, 2024
1 parent 733ca8d commit a9d9dcb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Classes/Item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ function ItemClass:ParseRaw(raw, rarity, highQuality)
end

function ItemClass:NormaliseQuality()
if self.base and (self.base.armour or self.base.weapon or self.base.flask) then
if self.base and (self.base.armour or self.base.weapon or self.base.flask or self.base.tincture) then
if not self.quality then
self.quality = 0
elseif not self.uniqueID and not self.corrupted and not self.split and not self.mirrored and self.quality < 20 then
Expand Down
6 changes: 5 additions & 1 deletion src/Classes/ItemsTab.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3292,6 +3292,10 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
elseif base.tincture then
-- Tincture-specific info
local tinctureData = item.tinctureData

if item.quality and item.quality > 0 then
tooltip:AddLine(16, s_format("^x7F7F7FQuality: "..colorCodes.MAGIC.."+%d%%", item.quality))
end

tooltip:AddLine(16, s_format("^x7F7F7FInflicts Mana Burn every %s%.2f ^x7F7F7FSeconds", main:StatColor(tinctureData.manaBurn, base.tincture.manaBurn), tinctureData.manaBurn))
tooltip:AddLine(16, s_format("^x7F7F7F%s%.2f ^x7F7F7FSecond Cooldown When Deactivated", main:StatColor(tinctureData.cooldown, base.tincture.cooldown), tinctureData.cooldown))
Expand Down Expand Up @@ -3645,7 +3649,7 @@ function ItemsTabClass:AddItemTooltip(tooltip, item, slot, dbMode)
if item.rarity == "MAGIC" then
effectInc = effectInc + modDB:Sum("INC", { actor = "player" }, "MagicTinctureEffect")
end
local effectMod = 1 + (tinctureData.effectInc + effectInc) / 100
local effectMod = (1 + (tinctureData.effectInc + effectInc) / 100) * (1 + (item.quality or 0) / 100)
if effectMod ~= 1 then
t_insert(stats, s_format("^8Tincture effect modifier: ^7%+d%%", effectMod * 100 - 100))
end
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/CalcPerform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ function calcs.perform(env, skipEHP)
if item.rarity == "MAGIC" then
tinctureEffectInc = tinctureEffectInc + effectIncMagic
end
local effectMod = 1 + (tinctureEffectInc) / 100
local effectMod = (1 + (tinctureEffectInc) / 100) + (1 + (item.quality or 0) / 100)

-- same deal as flasks, go look at the comment there
if buffModList[1] then
Expand Down

0 comments on commit a9d9dcb

Please sign in to comment.