Add battletags
This commit is contained in:
@@ -68,6 +68,7 @@ function shared.MinimapTagger.Init()
|
|||||||
local texture = frame:CreateTexture(nil, "ARTWORK")
|
local texture = frame:CreateTexture(nil, "ARTWORK")
|
||||||
texture:SetAllPoints(frame)
|
texture:SetAllPoints(frame)
|
||||||
texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura27")
|
texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura27")
|
||||||
|
--texture:SetTexture("Interface\\AddOns\\Heimdall\\Texture\\Alert")
|
||||||
table.insert(alertFramePool, frame)
|
table.insert(alertFramePool, frame)
|
||||||
end
|
end
|
||||||
---@param x number
|
---@param x number
|
||||||
@@ -98,6 +99,7 @@ function shared.MinimapTagger.Init()
|
|||||||
local texture = frame:CreateTexture(nil, "ARTWORK")
|
local texture = frame:CreateTexture(nil, "ARTWORK")
|
||||||
texture:SetAllPoints(frame)
|
texture:SetAllPoints(frame)
|
||||||
texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura11")
|
texture:SetTexture("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Auras\\Aura11")
|
||||||
|
--texture:SetTexture("Interface\\AddOns\\Heimdall\\Texture\\Tag")
|
||||||
table.insert(tagFramePool, frame)
|
table.insert(tagFramePool, frame)
|
||||||
end
|
end
|
||||||
---@param x number
|
---@param x number
|
||||||
@@ -119,6 +121,37 @@ function shared.MinimapTagger.Init()
|
|||||||
PlantFrame(x, y, frame)
|
PlantFrame(x, y, frame)
|
||||||
end
|
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 pauseUntil = 0
|
||||||
local frame = CreateFrame("Frame")
|
local frame = CreateFrame("Frame")
|
||||||
frame:RegisterEvent("WORLD_MAP_UPDATE")
|
frame:RegisterEvent("WORLD_MAP_UPDATE")
|
||||||
@@ -153,6 +186,14 @@ function shared.MinimapTagger.Init()
|
|||||||
alertFrame:Hide()
|
alertFrame:Hide()
|
||||||
alertFrame.custom.busy = false
|
alertFrame.custom.busy = false
|
||||||
end
|
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)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
BIN
Texture/Ring.tga
BIN
Texture/Ring.tga
Binary file not shown.
BIN
Texture/Tag.tga
Normal file
BIN
Texture/Tag.tga
Normal file
Binary file not shown.
Reference in New Issue
Block a user