Skip to content

Commit

Permalink
- refactored icons module
Browse files Browse the repository at this point in the history
  • Loading branch information
frozn committed May 25, 2024
1 parent 51bb13d commit 54e5ba5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions TipTac/modules/ttIcons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ function ttIcons:SetupTipsIcon(tip)

local currentDisplayParams = frameParams.currentDisplayParams;

-- no unit record
local unitRecord = currentDisplayParams.unitRecord;

if (not unitRecord) then
return;
end

-- display tip's icons
local currentIconCount = 0;
local iconCount;
Expand All @@ -121,13 +128,8 @@ end

-- display tip's icon
function ttIcons:DisplayTipsIcon(tip, currentDisplayParams, iconType, startingIconFrameIndex)
-- no unit record
local unitRecord = currentDisplayParams.unitRecord;

if (not unitRecord) then
return 0;
end

-- unit doesn't exist
if (not UnitExists(unitRecord.id)) then
return 0;
Expand Down

0 comments on commit 54e5ba5

Please sign in to comment.