From 095dc124eabfc6883a13090c1eba22b61dcedbb7 Mon Sep 17 00:00:00 2001 From: Casper Kvan Clausen Date: Fri, 26 Jul 2024 07:20:15 -0500 Subject: [PATCH] Nil concatenation --- SmartBuff.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SmartBuff.lua b/SmartBuff.lua index 8a543b4..09f587b 100644 --- a/SmartBuff.lua +++ b/SmartBuff.lua @@ -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 @@ -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]; @@ -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);