Update
This commit is contained in:
2
Meta
2
Meta
Submodule Meta updated: 3f65afd97a...d1c7f1ee31
@@ -55,7 +55,7 @@ function shared.MinimapTagger.Init()
|
||||
self:SetAlpha(1)
|
||||
self.custom.busy = true
|
||||
self.custom.progress = 0
|
||||
self:SetScript("OnUpdate", function(self, elapsed)
|
||||
self:SetScript("OnUpdate", function(selff, elapsed)
|
||||
self.custom.progress = self.custom.progress + elapsed
|
||||
local progress = self.custom.progress / ttl
|
||||
-- if Heimdall_Data.config.minimapTagger.debug then
|
||||
@@ -88,14 +88,21 @@ function shared.MinimapTagger.Init()
|
||||
table.insert(alertFramePool, frame)
|
||||
end
|
||||
local muteAlertUntil = 0
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param x number|nil
|
||||
---@param y number|nil
|
||||
---@param scale number?
|
||||
---@param doTag boolean?
|
||||
local function PlantAlert(x, y, scale, doTag)
|
||||
if x == nil or y == nil then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Alert position is nil, ignoring", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if doTag == nil then doTag = true end
|
||||
local frame = nil
|
||||
for _, alertFrame in ipairs(alertFramePool) do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
if not alertFrame.custom.busy then
|
||||
frame = alertFrame
|
||||
break
|
||||
@@ -152,14 +159,21 @@ function shared.MinimapTagger.Init()
|
||||
table.insert(tagFramePool, frame)
|
||||
end
|
||||
local muteTagUntil = 0
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param x number|nil
|
||||
---@param y number|nil
|
||||
---@param scale number?
|
||||
---@param doTag boolean?
|
||||
local function PlantTag(x, y, scale, doTag)
|
||||
if x == nil or y == nil then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Tag position is nil, ignoring", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if doTag == nil then doTag = true end
|
||||
local frame = nil
|
||||
for _, tagFrame in ipairs(tagFramePool) do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
if not tagFrame.custom.busy then
|
||||
frame = tagFrame
|
||||
break
|
||||
@@ -216,14 +230,21 @@ function shared.MinimapTagger.Init()
|
||||
table.insert(combatFramePool, frame)
|
||||
end
|
||||
local muteCombatUntil = 0
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param x number|nil
|
||||
---@param y number|nil
|
||||
---@param scale number?
|
||||
---@param doTag boolean?
|
||||
local function PlantCombat(x, y, scale, doTag)
|
||||
if x == nil or y == nil then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Combat position is nil, ignoring", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if doTag == nil then doTag = true end
|
||||
local frame = nil
|
||||
for _, combatFrame in ipairs(combatFramePool) do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
if not combatFrame.custom.busy then
|
||||
frame = combatFrame
|
||||
break
|
||||
@@ -280,14 +301,21 @@ function shared.MinimapTagger.Init()
|
||||
table.insert(helpFramePool, frame)
|
||||
end
|
||||
local muteHelpUntil = 0
|
||||
---@param x number
|
||||
---@param y number
|
||||
---@param x number|nil
|
||||
---@param y number|nil
|
||||
---@param scale number?
|
||||
---@param doTag boolean?
|
||||
local function PlantHelp(x, y, scale, doTag)
|
||||
if x == nil or y == nil then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Help position is nil, ignoring", ModuleName))
|
||||
end
|
||||
return
|
||||
end
|
||||
if doTag == nil then doTag = true end
|
||||
local frame = nil
|
||||
for _, helpFrame in ipairs(helpFramePool) do
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
if not helpFrame.custom.busy then
|
||||
frame = helpFrame
|
||||
break
|
||||
@@ -354,20 +382,23 @@ function shared.MinimapTagger.Init()
|
||||
BattlefieldMinimap:SetMovable(true)
|
||||
BattlefieldMinimap:EnableMouse(true)
|
||||
BattlefieldMinimap:RegisterForDrag("LeftButton")
|
||||
BattlefieldMinimap:SetScript("OnDragStart", function(self) self:StartMoving() end)
|
||||
BattlefieldMinimap:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end)
|
||||
BattlefieldMinimap:SetScript("OnDragStart", function(selff) selff:StartMoving() end)
|
||||
BattlefieldMinimap:SetScript("OnDragStop", function(selff) selff:StopMovingOrSizing() end)
|
||||
BattlefieldMinimapBackground:Hide()
|
||||
BattlefieldMinimapCloseButton:Hide()
|
||||
BattlefieldMinimapCorner:Hide()
|
||||
BattlefieldMinimap:HookScript("OnHide", function(self)
|
||||
BattlefieldMinimap:HookScript("OnHide", function(selff)
|
||||
for _, alertFrame in ipairs(alertFramePool) do
|
||||
alertFrame:Hide()
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
alertFrame.custom.busy = false
|
||||
end
|
||||
for _, tagFrame in ipairs(tagFramePool) do
|
||||
tagFrame:Hide()
|
||||
---@diagnostic disable-next-line: undefined-field
|
||||
tagFrame.custom.busy = false
|
||||
end
|
||||
-- What the fuck is this global?
|
||||
for _, battleFrame in ipairs(battleFramePool) do
|
||||
battleFrame:Hide()
|
||||
battleFrame.custom.busy = false
|
||||
@@ -505,6 +536,7 @@ function shared.MinimapTagger.Init()
|
||||
if x and y then
|
||||
x, y = tonumber(x), tonumber(y)
|
||||
PlantHelp(x, y, 1, doTag)
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
if TomTom then
|
||||
if Heimdall_Data.config.minimapTagger.debug then
|
||||
print(string.format("[%s] Adding help waypoint to TomTom", ModuleName))
|
||||
@@ -515,6 +547,7 @@ function shared.MinimapTagger.Init()
|
||||
print(string.format("[%s] Area ID: %s", ModuleName, tostring(areaId)))
|
||||
end
|
||||
|
||||
---@diagnostic disable-next-line: undefined-global
|
||||
TomTom:AddMFWaypoint(areaId, nil, x / 100, y / 100, {
|
||||
title = "Help " .. sender,
|
||||
world = true,
|
||||
|
@@ -1,6 +1,5 @@
|
||||
local addonname, shared = ...
|
||||
local shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
local ModuleName = "Network"
|
||||
|
||||
---@diagnostic disable-next-line: missing-fields
|
||||
|
Reference in New Issue
Block a user