From 2f8ca5a07e0fdca3361d31dd04bf95243e305c6d Mon Sep 17 00:00:00 2001 From: Anonomit Date: Fri, 19 Jul 2024 17:07:41 -0400 Subject: [PATCH] Fix cache issue with Arcane Resist and All Resist --- Operations/RewordLine.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Operations/RewordLine.lua b/Operations/RewordLine.lua index ddb337d..de16500 100644 --- a/Operations/RewordLine.lua +++ b/Operations/RewordLine.lua @@ -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({ @@ -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