From c58966feaed2ccc67a8db913b842464d6a1a20cb Mon Sep 17 00:00:00 2001 From: michaelsp Date: Thu, 28 Dec 2023 17:32:15 +0100 Subject: [PATCH] Better management of spell links in buffs/debuffs lists. --- Options/modules/statuses/StatusAura.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Options/modules/statuses/StatusAura.lua b/Options/modules/statuses/StatusAura.lua index c57ea01c..d8f1ff31 100644 --- a/Options/modules/statuses/StatusAura.lua +++ b/Options/modules/statuses/StatusAura.lua @@ -490,15 +490,15 @@ function Grid2Options:MakeStatusAuraListOptions(status, options, optionParams) wipe(status.dbx.auras) local auras = { strsplit("\n,", strtrim(v)) } for _,name in pairs(auras) do - local aura = strtrim(name) + local prefix, links = string.match(name,"^(.-)(|c.*)") + local aura = strtrim(prefix or name) if #aura>0 then - local count = #status.dbx.auras - for aura in string.gmatch(aura, "Hspell:(%d+):") do + table.insert( status.dbx.auras, tonumber(aura) or tonumber(strmatch(aura,'^.+<(%d+)')) or aura ) + end + if links then -- check for spell links + for aura in string.gmatch(links, "Hspell:(%d+):") do table.insert( status.dbx.auras, tonumber(aura) or aura ) end - if count==#status.dbx.auras then - table.insert( status.dbx.auras, tonumber(aura) or tonumber(strmatch(aura,'^.+<(%d+)')) or aura ) - end end end status:Refresh()