Skip to content

Commit

Permalink
Added a few more items to InCombatLockdown check, also check that tex…
Browse files Browse the repository at this point in the history
…tString exists before invoking functions on it
  • Loading branch information
kiforsbe committed Nov 4, 2022
1 parent adacd3a commit 33d50f4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions UnitFramesImproved/UnitFramesImproved.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,15 @@ end

function UnitFramesImproved_TextStatusBar_UpdateTextStringWithValues(statusFrame, textString, value, valueMin, valueMax)
if( statusFrame.LeftText and statusFrame.RightText ) then
statusFrame.LeftText:SetText("");
statusFrame.RightText:SetText("");
statusFrame.LeftText:Hide();
statusFrame.RightText:Hide();
textString:Show();
if not InCombatLockdown() then
statusFrame.LeftText:SetText("");
statusFrame.RightText:SetText("");
statusFrame.LeftText:Hide();
statusFrame.RightText:Hide();
if (textString) then
textString:Show();
end
end
end

if ( ( tonumber(valueMax) ~= valueMax or valueMax > 0 ) and not ( statusFrame.pauseUpdates ) ) then
Expand Down

0 comments on commit 33d50f4

Please sign in to comment.