diff --git a/Modules/MinimapTagger.lua b/Modules/MinimapTagger.lua index 5295309..c3c4667 100644 --- a/Modules/MinimapTagger.lua +++ b/Modules/MinimapTagger.lua @@ -68,6 +68,7 @@ function shared.MinimapTagger.Init() local texture = frame:CreateTexture(nil, "ARTWORK") texture:SetAllPoints(frame) texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura27") + --texture:SetTexture("Interface\\AddOns\\Heimdall\\Texture\\Alert") table.insert(alertFramePool, frame) end ---@param x number @@ -98,6 +99,7 @@ function shared.MinimapTagger.Init() local texture = frame:CreateTexture(nil, "ARTWORK") texture:SetAllPoints(frame) texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura11") + --texture:SetTexture("Interface\\AddOns\\Heimdall\\Texture\\Tag") table.insert(tagFramePool, frame) end ---@param x number @@ -119,6 +121,37 @@ function shared.MinimapTagger.Init() PlantFrame(x, y, frame) end + ---@type Frame[] + local battleFramePool = {} + local battleFramePoolMaxSize = 20 + for i = 1, battleFramePoolMaxSize do + local frame = CreateFrame("Frame") + frame.custom = { busy = false } + local texture = frame:CreateTexture(nil, "ARTWORK") + texture:SetAllPoints(frame) + texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura19") + --texture:SetTexture("Interface\\AddOns\\Heimdall\\Texture\\Fight") + table.insert(battleFramePool, frame) + end + ---@param x number + ---@param y number + local function PlantBattle(x, y) + local frame = nil + for _, battleFrame in ipairs(battleFramePool) do + if not battleFrame.custom.busy then + frame = battleFrame + break + end + end + if not frame then + if Heimdall_Data.config.minimapTagger.debug then + print(string.format("[%s] Battle frame pool is full and could not get frame", ModuleName)) + end + return + end + PlantFrame(x, y, frame) + end + local pauseUntil = 0 local frame = CreateFrame("Frame") frame:RegisterEvent("WORLD_MAP_UPDATE") @@ -153,6 +186,14 @@ function shared.MinimapTagger.Init() alertFrame:Hide() alertFrame.custom.busy = false end + for _, tagFrame in ipairs(tagFramePool) do + tagFrame:Hide() + tagFrame.custom.busy = false + end + for _, battleFrame in ipairs(battleFramePool) do + battleFrame:Hide() + battleFrame.custom.busy = false + end end) end) diff --git a/Texture/Ring.tga b/Texture/Ring.tga deleted file mode 100644 index 4809bf4..0000000 Binary files a/Texture/Ring.tga and /dev/null differ diff --git a/Texture/Tag.tga b/Texture/Tag.tga new file mode 100644 index 0000000..469dc08 Binary files /dev/null and b/Texture/Tag.tga differ