Skip to content

Commit

Permalink
trim whitespace and update .luacheckrc
Browse files Browse the repository at this point in the history
  • Loading branch information
jordonwow committed Nov 2, 2022
1 parent a2db4f0 commit 5f2c145
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ read_globals = {
"CompactUnitFrame_UtilIsBossAura",
"CompactUnitFrame_UtilIsPriorityDebuff",
"CompactUnitFrame_UtilSetBuff",
"CompactUnitFrame_UtilSetDebuff",
"CompactUnitFrame_UtilSetDispelDebuff",
"CompactUnitFrame_UtilShouldDisplayBuff",
"CompactUnitFrame_SetMaxBuffs",
"CooldownFrame_Clear",
"CooldownFrame_Set",
"CreateFrame",
Expand Down
15 changes: 7 additions & 8 deletions BigDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1614,7 +1614,7 @@ else
--isBossAura says make this look large.
--isBossBuff looks in HELPFULL auras otherwise it looks in HARMFULL ones
local name, icon, count, debuffType, duration, expirationTime, unitCaster, _, _, spellId = ...;

if index == -1 then
-- it's an interrupt
local spell = BigDebuffs.units[UnitGUID(unit)]
Expand All @@ -1639,7 +1639,7 @@ else
end
end
end

debuffFrame.filter = filter;
debuffFrame.icon:SetTexture(icon);
if (count > 1) then
Expand All @@ -1653,15 +1653,15 @@ else
debuffFrame.count:Hide();
end
debuffFrame:SetID(index);

if LibClassicDurations then
local durationNew, expirationTimeNew = LibClassicDurations:GetAuraDurationByUnit(unit, spellId, unitCaster)
if duration == 0 and durationNew then
duration = durationNew
expirationTime = expirationTimeNew
end
end

local enabled = expirationTime and expirationTime ~= 0;
if enabled then
local startTime = expirationTime - duration;
Expand All @@ -1672,18 +1672,18 @@ else
else
CooldownFrame_Clear(debuffFrame.cooldown);
end

local color = DebuffTypeColor[debuffType] or DebuffTypeColor["none"];
debuffFrame.border:SetVertexColor(color.r, color.g, color.b);

debuffFrame.isBossBuff = isBossBuff;
if (isBossAura) then
local size = min(debuffFrame.baseSize + BOSS_DEBUFF_SIZE_INCREASE, debuffFrame.maxHeight);
debuffFrame:SetSize(size, size);
else
debuffFrame:SetSize(debuffFrame.baseSize, debuffFrame.baseSize);
end

debuffFrame:Show();
end
local Default_CompactUnitFrame_UtilIsPriorityDebuff = CompactUnitFrame_UtilIsPriorityDebuff
Expand Down Expand Up @@ -1941,7 +1941,6 @@ if WOW_PROJECT_ID == WOW_PROJECT_MAINLINE then
end

if #debuffs > 0 then
GTEMP = debuffs;
-- sort by priority > size > duration > index
table.sort(debuffs, function(a, b)
if a[3] == b[3] then
Expand Down

0 comments on commit 5f2c145

Please sign in to comment.