Skip to content

Commit

Permalink
Fix cache issue with Arcane Resist and All Resist
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Jul 19, 2024
1 parent b49e9c6 commit 2f8ca5a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Operations/RewordLine.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ Addon:RegisterEventCallback("PLAYER_LEVEL_UP", Addon.WipeTextCache) -- for ratin


cacheLineTypes = setmetatable({
Title = false,
Damage = false,
DamagePerSecond = false,
Title = false,
Damage = false,
DamagePerSecond = false,
}, {__index = function() return true end})

cacheLineStats = setmetatable({
["All Resistance"] = false,
["Arcane Resistance"] = false,
}, {__index = function() return true end})

rewordBlacklist = setmetatable({
Expand Down Expand Up @@ -217,7 +222,7 @@ function Addon:RewordLine(tooltip, line, tooltipData)
end
end

if not RatingBuster and self:GetGlobalOption("cache", "enabled") and self:GetGlobalOption("cache", "text") and cacheLineTypes[line.type] then
if not RatingBuster and self:GetGlobalOption("cache", "enabled") and self:GetGlobalOption("cache", "text") and cacheLineTypes[line.type] and cacheLineStats[line.stat or ""] then
Addon:MakeTable(textCache, line.type, line.textLeftText, line.textRightText or "", {text, line.rewordRight})
cacheSize = cacheSize + 1
end
Expand Down

0 comments on commit 2f8ca5a

Please sign in to comment.