Skip to content

Commit

Permalink
Nil concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
kvan committed Jul 26, 2024
1 parent 28d71e7 commit 095dc12
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions SmartBuff.lua
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ local function InitBuffOrder(reset)
-- Remove not longer existing buffs in the order list
for k, v in pairs(ord) do
if (v and cBuffIndex[v] == nil) then
SMARTBUFF_AddMsgD("Remove from buff order: " .. v.name);
SMARTBUFF_AddMsgD("Remove from buff order: " .. v);
tremove(ord, k);
end
end
Expand Down Expand Up @@ -1114,8 +1114,6 @@ function SMARTBUFF_SetBuff(buff, i, ia)
return i;
end

SMARTBUFF_AddMsgD("ID: "..cBuffs[i].IDS);

if (buff[4] ~= nil) then cBuffs[i].LevelsS = buff[4] else cBuffs[i].LevelsS = nil end
if (buff[5] ~= nil) then cBuffs[i].Params = buff[5] else cBuffs[i].Params = SG.NIL end
cBuffs[i].Links = buff[6];
Expand Down Expand Up @@ -3798,6 +3796,9 @@ function SMARTBUFF_Options_OnShow()

SmartBuff_ShowControls("SmartBuffOptionsFrame", true);

-- Temporary hack to avoid ever growing list.
SMARTBUFF_BuffOrderReset();

SmartBuffOptionsFrame_cbSB:SetChecked(O.Toggle);
SmartBuffOptionsFrame_cbAuto:SetChecked(O.ToggleAuto);
SmartBuffOptionsFrameAutoTimer:SetValue(O.AutoTimer);
Expand Down

0 comments on commit 095dc12

Please sign in to comment.