Skip to content

Commit

Permalink
Fix lua error with Chaotic gems
Browse files Browse the repository at this point in the history
  • Loading branch information
Anonomit committed Sep 29, 2022
1 parent 069289a commit cd7cf57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Operations/ModifyTooltipData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ function Addon:ModifyTooltipData(tooltip, tooltipData)
for i, line in ipairs(tooltipData) do
self:RecognizeStat(line)

self:DebugfIf({"debugOutput", "lineRecognitions"}, "line: %d, textLeft: '%s', type: '%s', stat: '%s', prefix: '%s', colorLeft: '%s'", i, line.textLeftText, tostring(line.type), tostring(line.stat), tostring(line.prefix), line.colorLeft)

if not self:HideLine(line) then
self:RecolorLine(tooltip, line, tooltipData)
self:RewordLine(tooltip, line, tooltipData)
end

self:DebugfIf({"debugOutput", "lineRecognitions"}, "line: %d, textLeft: '%s', type: '%s', stat: '%s', prefix: '%s'", i, line.textLeftText, tostring(line.type), tostring(line.stat), tostring(line.prefix))
end

self:ReorderLines(tooltipData)
Expand Down
1 change: 1 addition & 0 deletions Operations/RecognizeLineTypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ contextActions = Addon:Map({
Damage = function(i, tooltipData, line)
if MatchesAny(line.textLeftTextStripped, DAMAGE_TEMPLATE, DAMAGE_TEMPLATE_WITH_SCHOOL, SINGLE_DAMAGE_TEMPLATE) then
local speed = strMatch(line.textRightText or "", numberPattern)
if not speed then return end -- SINGLE_DAMAGE_TEMPLATE can match unrelated lines, like in Chaotic gems
tooltipData.speedStringFull = line.textRightText
tooltipData.speedString = speed
if DECIMAL_SEPERATOR ~= "." then
Expand Down

0 comments on commit cd7cf57

Please sign in to comment.