Compare commits
2 Commits
feaa62309c
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f97b7556cd | ||
|
|
cf78405148 |
@@ -5,7 +5,7 @@ if not HMGT then return end
|
|||||||
local L = HMGT.L or LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME)
|
local L = HMGT.L or LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME)
|
||||||
|
|
||||||
HMGT.devToolsBuffer = HMGT.devToolsBuffer or {}
|
HMGT.devToolsBuffer = HMGT.devToolsBuffer or {}
|
||||||
HMGT.devToolsBufferMax = HMGT.devToolsBufferMax or 300
|
HMGT.devToolsBufferMax = HMGT.devToolsBufferMax or 500
|
||||||
|
|
||||||
local DEVTOOLS_SCOPE_ALL = "ALL"
|
local DEVTOOLS_SCOPE_ALL = "ALL"
|
||||||
local DEVTOOLS_SCOPE_LABELS = {
|
local DEVTOOLS_SCOPE_LABELS = {
|
||||||
@@ -20,7 +20,8 @@ local DEVTOOLS_SCOPE_LABELS = {
|
|||||||
|
|
||||||
local DEVTOOLS_LEVELS = {
|
local DEVTOOLS_LEVELS = {
|
||||||
error = 1,
|
error = 1,
|
||||||
trace = 2,
|
info = 2,
|
||||||
|
verbose = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
local function TrimText(value)
|
local function TrimText(value)
|
||||||
@@ -76,8 +77,10 @@ function HMGT:GetDevToolsSettings()
|
|||||||
profile.devTools = type(profile.devTools) == "table" and profile.devTools or {}
|
profile.devTools = type(profile.devTools) == "table" and profile.devTools or {}
|
||||||
local settings = profile.devTools
|
local settings = profile.devTools
|
||||||
settings.enabled = settings.enabled == true
|
settings.enabled = settings.enabled == true
|
||||||
if settings.level ~= "error" and settings.level ~= "trace" then
|
if settings.level == "trace" then
|
||||||
settings.level = "error"
|
settings.level = "verbose"
|
||||||
|
elseif settings.level ~= "error" and settings.level ~= "info" and settings.level ~= "verbose" then
|
||||||
|
settings.level = "info"
|
||||||
end
|
end
|
||||||
if type(settings.scope) ~= "string" or settings.scope == "" then
|
if type(settings.scope) ~= "string" or settings.scope == "" then
|
||||||
settings.scope = DEVTOOLS_SCOPE_ALL
|
settings.scope = DEVTOOLS_SCOPE_ALL
|
||||||
@@ -94,24 +97,25 @@ function HMGT:IsDevToolsEnabled()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HMGT:GetDevToolsLevelOptions()
|
function HMGT:GetDevToolsLevelOptions()
|
||||||
return {
|
return self:GetDebugLevelOptions()
|
||||||
error = L["OPT_DEVTOOLS_LEVEL_ERROR"] or "Errors",
|
|
||||||
trace = L["OPT_DEVTOOLS_LEVEL_TRACE"] or "Trace",
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function HMGT:GetConfiguredDevToolsLevel()
|
function HMGT:GetConfiguredDevToolsLevel()
|
||||||
return self:GetDevToolsSettings().level or "error"
|
return self:GetConfiguredDebugLevel()
|
||||||
end
|
end
|
||||||
|
|
||||||
function HMGT:ShouldIncludeDevToolsLevel(level)
|
function HMGT:ShouldIncludeDevToolsLevel(level)
|
||||||
local configured = self:GetConfiguredDevToolsLevel()
|
local configured = self:GetConfiguredDevToolsLevel()
|
||||||
return (DEVTOOLS_LEVELS[tostring(level or "error")] or DEVTOOLS_LEVELS.error)
|
local normalizedLevel = tostring(level or "info")
|
||||||
<= (DEVTOOLS_LEVELS[configured] or DEVTOOLS_LEVELS.error)
|
if normalizedLevel == "trace" then
|
||||||
|
normalizedLevel = "verbose"
|
||||||
|
end
|
||||||
|
return (DEVTOOLS_LEVELS[normalizedLevel] or DEVTOOLS_LEVELS.info)
|
||||||
|
<= (DEVTOOLS_LEVELS[configured] or DEVTOOLS_LEVELS.info)
|
||||||
end
|
end
|
||||||
|
|
||||||
function HMGT:GetDevToolsScopeOptions()
|
function HMGT:GetDevToolsScopeOptions()
|
||||||
local values = {
|
local values = self:GetDebugScopeOptions() or {
|
||||||
[DEVTOOLS_SCOPE_ALL] = L["OPT_DEVTOOLS_SCOPE_ALL"] or "All scopes",
|
[DEVTOOLS_SCOPE_ALL] = L["OPT_DEVTOOLS_SCOPE_ALL"] or "All scopes",
|
||||||
}
|
}
|
||||||
for scope, label in pairs(DEVTOOLS_SCOPE_LABELS) do
|
for scope, label in pairs(DEVTOOLS_SCOPE_LABELS) do
|
||||||
@@ -128,8 +132,11 @@ end
|
|||||||
|
|
||||||
function HMGT:FormatDevToolsEntry(entry)
|
function HMGT:FormatDevToolsEntry(entry)
|
||||||
local stamp = tostring(entry and entry.stamp or date("%H:%M:%S"))
|
local stamp = tostring(entry and entry.stamp or date("%H:%M:%S"))
|
||||||
local level = string.upper(tostring(entry and entry.level or "error"))
|
local level = string.upper(tostring(entry and entry.level or "info"))
|
||||||
local scope = tostring(entry and entry.scope or "System")
|
local scope = tostring(entry and entry.scope or "System")
|
||||||
|
if entry and entry.kind == "debug" then
|
||||||
|
return string.format("%s [%s][%s] %s", stamp, level, scope, tostring(entry.message or ""))
|
||||||
|
end
|
||||||
local eventName = tostring(entry and entry.event or "")
|
local eventName = tostring(entry and entry.event or "")
|
||||||
local payload = TrimText(entry and entry.payload or "")
|
local payload = TrimText(entry and entry.payload or "")
|
||||||
if payload ~= "" then
|
if payload ~= "" then
|
||||||
@@ -164,8 +171,10 @@ function HMGT:RecordDevEvent(level, scope, eventName, payload)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local normalizedLevel = tostring(level or "error")
|
local normalizedLevel = tostring(level or "error")
|
||||||
if normalizedLevel ~= "error" and normalizedLevel ~= "trace" then
|
if normalizedLevel == "trace" then
|
||||||
normalizedLevel = "trace"
|
normalizedLevel = "verbose"
|
||||||
|
elseif normalizedLevel ~= "error" and normalizedLevel ~= "info" and normalizedLevel ~= "verbose" then
|
||||||
|
normalizedLevel = "verbose"
|
||||||
end
|
end
|
||||||
if not self:ShouldIncludeDevToolsLevel(normalizedLevel) then
|
if not self:ShouldIncludeDevToolsLevel(normalizedLevel) then
|
||||||
return
|
return
|
||||||
@@ -182,6 +191,7 @@ function HMGT:RecordDevEvent(level, scope, eventName, payload)
|
|||||||
scope = normalizedScope,
|
scope = normalizedScope,
|
||||||
event = TrimText(eventName or "event"),
|
event = TrimText(eventName or "event"),
|
||||||
payload = EncodePayloadValue(payload, 0),
|
payload = EncodePayloadValue(payload, 0),
|
||||||
|
kind = "event",
|
||||||
}
|
}
|
||||||
|
|
||||||
table.insert(self.devToolsBuffer, entry)
|
table.insert(self.devToolsBuffer, entry)
|
||||||
@@ -194,6 +204,40 @@ function HMGT:RecordDevEvent(level, scope, eventName, payload)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function HMGT:RecordDebugEntry(level, scope, message)
|
||||||
|
if not self:IsDevToolsEnabled() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local normalizedLevel = tostring(level or "info")
|
||||||
|
if normalizedLevel == "trace" then
|
||||||
|
normalizedLevel = "verbose"
|
||||||
|
elseif normalizedLevel ~= "error" and normalizedLevel ~= "info" and normalizedLevel ~= "verbose" then
|
||||||
|
normalizedLevel = "info"
|
||||||
|
end
|
||||||
|
|
||||||
|
local normalizedScope = TrimText(scope or "General")
|
||||||
|
if normalizedScope == "" then
|
||||||
|
normalizedScope = "General"
|
||||||
|
end
|
||||||
|
|
||||||
|
self.devToolsBuffer = self.devToolsBuffer or {}
|
||||||
|
self.devToolsBuffer[#self.devToolsBuffer + 1] = {
|
||||||
|
stamp = date("%H:%M:%S"),
|
||||||
|
level = normalizedLevel,
|
||||||
|
scope = normalizedScope,
|
||||||
|
message = TrimText(message or ""),
|
||||||
|
kind = "debug",
|
||||||
|
}
|
||||||
|
while #self.devToolsBuffer > (tonumber(self.devToolsBufferMax) or 500) do
|
||||||
|
table.remove(self.devToolsBuffer, 1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.devToolsWindow and self.devToolsWindow:IsShown() and self.RefreshDevToolsWindow then
|
||||||
|
self:RefreshDevToolsWindow()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function HMGT:DevError(scope, eventName, payload)
|
function HMGT:DevError(scope, eventName, payload)
|
||||||
self:RecordDevEvent("error", scope, eventName, payload)
|
self:RecordDevEvent("error", scope, eventName, payload)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ local AceGUI = LibStub("AceGUI-3.0", true)
|
|||||||
if not AceGUI then return end
|
if not AceGUI then return end
|
||||||
|
|
||||||
local function GetOrderedLevels()
|
local function GetOrderedLevels()
|
||||||
return { "error", "trace" }
|
return { "error", "info", "verbose" }
|
||||||
end
|
end
|
||||||
|
|
||||||
local function GetOrderedScopes()
|
local function GetOrderedScopes()
|
||||||
@@ -78,8 +78,8 @@ function HMGT:EnsureDevToolsWindow()
|
|||||||
|
|
||||||
local settings = self:GetDevToolsSettings()
|
local settings = self:GetDevToolsSettings()
|
||||||
local window = self:CreateAceWindow("devTools", {
|
local window = self:CreateAceWindow("devTools", {
|
||||||
title = L["DEVTOOLS_WINDOW_TITLE"] or "HMGT Developer Tools",
|
title = L["DEVTOOLS_WINDOW_TITLE"] or "HMGT Debug Console",
|
||||||
statusText = L["DEVTOOLS_WINDOW_HINT"] or "Structured developer events for the current session",
|
statusText = L["DEVTOOLS_WINDOW_HINT"] or "Debug and developer events for the current session",
|
||||||
statusTable = settings.window,
|
statusTable = settings.window,
|
||||||
width = settings.window.width or 920,
|
width = settings.window.width or 920,
|
||||||
height = settings.window.height or 420,
|
height = settings.window.height or 420,
|
||||||
@@ -93,7 +93,7 @@ function HMGT:EnsureDevToolsWindow()
|
|||||||
local content = window:GetContent()
|
local content = window:GetContent()
|
||||||
|
|
||||||
local clearButton = AceGUI:Create("Button")
|
local clearButton = AceGUI:Create("Button")
|
||||||
clearButton:SetText(L["OPT_DEVTOOLS_CLEAR"] or "Clear developer log")
|
clearButton:SetText(L["OPT_DEVTOOLS_CLEAR"] or L["OPT_DEBUG_CLEAR"] or "Clear log")
|
||||||
clearButton:SetWidth(140)
|
clearButton:SetWidth(140)
|
||||||
clearButton:SetCallback("OnClick", function()
|
clearButton:SetCallback("OnClick", function()
|
||||||
HMGT:ClearDevToolsLog()
|
HMGT:ClearDevToolsLog()
|
||||||
@@ -176,11 +176,11 @@ function HMGT:RefreshDevToolsWindow()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local levelOptions = self:GetDevToolsLevelOptions()
|
local levelOptions = self:GetDevToolsLevelOptions()
|
||||||
SetFilterButtonText(window.levelFilter, L["OPT_DEVTOOLS_LEVEL"] or "Capture level", levelOptions[self:GetConfiguredDevToolsLevel()])
|
SetFilterButtonText(window.levelFilter, L["OPT_DEBUG_LEVEL"] or L["OPT_DEVTOOLS_LEVEL"] or "Level", levelOptions[self:GetConfiguredDevToolsLevel()])
|
||||||
|
|
||||||
local scopeValues = self:GetDevToolsScopeOptions()
|
local scopeValues = self:GetDevToolsScopeOptions()
|
||||||
local currentScope = self:GetDevToolsSettings().scope or "ALL"
|
local currentScope = self:GetDevToolsSettings().scope or "ALL"
|
||||||
SetFilterButtonText(window.scopeFilter, L["OPT_DEVTOOLS_SCOPE"] or "Scope", scopeValues[currentScope] or currentScope)
|
SetFilterButtonText(window.scopeFilter, L["OPT_DEBUG_SCOPE"] or L["OPT_DEVTOOLS_SCOPE"] or "Module", scopeValues[currentScope] or currentScope)
|
||||||
|
|
||||||
local text = table.concat(self:GetFilteredDevToolsLines(), "\n")
|
local text = table.concat(self:GetFilteredDevToolsLines(), "\n")
|
||||||
window.logWidget:SetText(text)
|
window.logWidget:SetText(text)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ local MSG_SYNC_REQUEST = "SRQ"
|
|||||||
local MSG_SYNC_RESPONSE = "SRS" -- SRS|version|protocol|class|spec|talentHash|knownSpellIds|cd1:t1:d1;...
|
local MSG_SYNC_RESPONSE = "SRS" -- SRS|version|protocol|class|spec|talentHash|knownSpellIds|cd1:t1:d1;...
|
||||||
local MSG_RAID_TIMELINE = "RTL" -- RTL|encounterId|time|spellId|leadTime|alertText
|
local MSG_RAID_TIMELINE = "RTL" -- RTL|encounterId|time|spellId|leadTime|alertText
|
||||||
local MSG_RAID_TIMELINE_TEST = "RTS" -- RTS|encounterId|difficultyId|serverStartTime|duration
|
local MSG_RAID_TIMELINE_TEST = "RTS" -- RTS|encounterId|difficultyId|serverStartTime|duration
|
||||||
|
local MSG_LURA_RUNES = "LUR" -- LUR|slot1,slot2,slot3,slot4,slot5
|
||||||
local MSG_RELIABLE = "REL" -- REL|messageId|innerPayload
|
local MSG_RELIABLE = "REL" -- REL|messageId|innerPayload
|
||||||
local MSG_ACK = "ACK" -- ACK|messageId
|
local MSG_ACK = "ACK" -- ACK|messageId
|
||||||
local COMM_PREFIX = "HMGT"
|
local COMM_PREFIX = "HMGT"
|
||||||
@@ -85,15 +86,14 @@ HMGT.MSG_RELIABLE = MSG_RELIABLE
|
|||||||
HMGT.MSG_ACK = MSG_ACK
|
HMGT.MSG_ACK = MSG_ACK
|
||||||
HMGT.MSG_RAID_TIMELINE = MSG_RAID_TIMELINE
|
HMGT.MSG_RAID_TIMELINE = MSG_RAID_TIMELINE
|
||||||
HMGT.MSG_RAID_TIMELINE_TEST = MSG_RAID_TIMELINE_TEST
|
HMGT.MSG_RAID_TIMELINE_TEST = MSG_RAID_TIMELINE_TEST
|
||||||
|
HMGT.MSG_LURA_RUNES = MSG_LURA_RUNES
|
||||||
|
|
||||||
-- ── Standardwerte ─────────────────────────────────────────────
|
-- ── Standardwerte ─────────────────────────────────────────────
|
||||||
local defaults = {
|
local defaults = {
|
||||||
profile = {
|
profile = {
|
||||||
debug = false,
|
|
||||||
debugLevel = "info",
|
|
||||||
devTools = {
|
devTools = {
|
||||||
enabled = false,
|
enabled = false,
|
||||||
level = "error",
|
level = "info",
|
||||||
scope = "ALL",
|
scope = "ALL",
|
||||||
window = {
|
window = {
|
||||||
width = 920,
|
width = 920,
|
||||||
@@ -102,131 +102,6 @@ local defaults = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
syncRemoteCharges = true,
|
syncRemoteCharges = true,
|
||||||
interruptTracker = {
|
|
||||||
enabled = true,
|
|
||||||
demoMode = false,
|
|
||||||
testMode = false,
|
|
||||||
showBar = true,
|
|
||||||
showSpellTooltip = true,
|
|
||||||
locked = false,
|
|
||||||
posX = 200,
|
|
||||||
posY = -200,
|
|
||||||
anchorTo = "UIParent",
|
|
||||||
anchorCustom = "",
|
|
||||||
anchorPoint = "TOPLEFT",
|
|
||||||
anchorRelPoint= "TOPLEFT",
|
|
||||||
anchorX = 200,
|
|
||||||
anchorY = -200,
|
|
||||||
width = 250,
|
|
||||||
barHeight = 20,
|
|
||||||
barSpacing = 2,
|
|
||||||
barTexture = "Blizzard",
|
|
||||||
borderEnabled = false,
|
|
||||||
borderColor = { r = 1, g = 1, b = 1, a = 1 },
|
|
||||||
iconSize = 32,
|
|
||||||
iconSpacing = 2,
|
|
||||||
iconCols = 6,
|
|
||||||
iconOverlay = "sweep", -- "sweep" | "timer"
|
|
||||||
textAnchor = "below", -- "onIcon" | "above" | "below"
|
|
||||||
fontSize = 12,
|
|
||||||
font = "Friz Quadrata TT",
|
|
||||||
fontOutline = "OUTLINE",
|
|
||||||
growDirection = "DOWN",
|
|
||||||
showInSolo = true,
|
|
||||||
showInGroup = true,
|
|
||||||
showInRaid = true,
|
|
||||||
enabledSpells = {},
|
|
||||||
showPlayerName= true,
|
|
||||||
colorByClass = true,
|
|
||||||
showChargesOnIcon = false,
|
|
||||||
showOnlyReady = false,
|
|
||||||
readySoonSec = 0,
|
|
||||||
},
|
|
||||||
raidCooldownTracker = {
|
|
||||||
enabled = true,
|
|
||||||
demoMode = false,
|
|
||||||
testMode = false,
|
|
||||||
showBar = true,
|
|
||||||
showSpellTooltip = true,
|
|
||||||
locked = false,
|
|
||||||
posX = 500,
|
|
||||||
posY = -200,
|
|
||||||
anchorTo = "UIParent",
|
|
||||||
anchorCustom = "",
|
|
||||||
anchorPoint = "TOPLEFT",
|
|
||||||
anchorRelPoint= "TOPLEFT",
|
|
||||||
anchorX = 500,
|
|
||||||
anchorY = -200,
|
|
||||||
width = 250,
|
|
||||||
barHeight = 20,
|
|
||||||
barSpacing = 2,
|
|
||||||
barTexture = "Blizzard",
|
|
||||||
borderEnabled = false,
|
|
||||||
borderColor = { r = 1, g = 1, b = 1, a = 1 },
|
|
||||||
iconSize = 32,
|
|
||||||
iconSpacing = 2,
|
|
||||||
iconCols = 6,
|
|
||||||
iconOverlay = "sweep", -- "sweep" | "timer"
|
|
||||||
textAnchor = "below", -- "onIcon" | "above" | "below"
|
|
||||||
fontSize = 12,
|
|
||||||
font = "Friz Quadrata TT",
|
|
||||||
fontOutline = "OUTLINE",
|
|
||||||
growDirection = "DOWN",
|
|
||||||
showInSolo = true,
|
|
||||||
showInGroup = true,
|
|
||||||
showInRaid = true,
|
|
||||||
enabledSpells = {},
|
|
||||||
showPlayerName= true,
|
|
||||||
colorByClass = true,
|
|
||||||
showChargesOnIcon = false,
|
|
||||||
showOnlyReady = false,
|
|
||||||
readySoonSec = 0,
|
|
||||||
},
|
|
||||||
groupCooldownTracker = {
|
|
||||||
enabled = true,
|
|
||||||
demoMode = false,
|
|
||||||
testMode = false,
|
|
||||||
showBar = true,
|
|
||||||
showSpellTooltip = true,
|
|
||||||
locked = false,
|
|
||||||
attachToPartyFrame = false,
|
|
||||||
partyAttachSide = "RIGHT",
|
|
||||||
partyAttachOffsetX = 8,
|
|
||||||
partyAttachOffsetY = 0,
|
|
||||||
posX = 800,
|
|
||||||
posY = -200,
|
|
||||||
anchorTo = "UIParent",
|
|
||||||
anchorCustom = "",
|
|
||||||
anchorPoint = "TOPLEFT",
|
|
||||||
anchorRelPoint= "TOPLEFT",
|
|
||||||
anchorX = 800,
|
|
||||||
anchorY = -200,
|
|
||||||
width = 250,
|
|
||||||
barHeight = 20,
|
|
||||||
barSpacing = 2,
|
|
||||||
barTexture = "Blizzard",
|
|
||||||
borderEnabled = false,
|
|
||||||
borderColor = { r = 1, g = 1, b = 1, a = 1 },
|
|
||||||
iconSize = 32,
|
|
||||||
iconSpacing = 2,
|
|
||||||
iconCols = 6,
|
|
||||||
iconOverlay = "sweep",
|
|
||||||
textAnchor = "below",
|
|
||||||
fontSize = 12,
|
|
||||||
font = "Friz Quadrata TT",
|
|
||||||
fontOutline = "OUTLINE",
|
|
||||||
growDirection = "DOWN",
|
|
||||||
showInSolo = false,
|
|
||||||
showInGroup = true,
|
|
||||||
showInRaid = false,
|
|
||||||
enabledSpells = {},
|
|
||||||
showPlayerName= true,
|
|
||||||
colorByClass = true,
|
|
||||||
showChargesOnIcon = true,
|
|
||||||
showOnlyReady = false,
|
|
||||||
readySoonSec = 0,
|
|
||||||
includeSelfFrame = false,
|
|
||||||
},
|
|
||||||
trackers = {},
|
trackers = {},
|
||||||
buffEndingAnnouncer = {
|
buffEndingAnnouncer = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
@@ -246,6 +121,34 @@ local defaults = {
|
|||||||
alertColor = { r = 1, g = 0.82, b = 0.15, a = 1 },
|
alertColor = { r = 1, g = 0.82, b = 0.15, a = 1 },
|
||||||
encounters = {},
|
encounters = {},
|
||||||
},
|
},
|
||||||
|
encounterAlerts = {
|
||||||
|
enabled = false,
|
||||||
|
luraRunes = {
|
||||||
|
enabled = false,
|
||||||
|
unlocked = false,
|
||||||
|
posX = 0,
|
||||||
|
posY = -120,
|
||||||
|
iconSize = 44,
|
||||||
|
backgroundAlpha = 0.14,
|
||||||
|
showLabels = true,
|
||||||
|
actionBar = {
|
||||||
|
shown = false,
|
||||||
|
autoShow = true,
|
||||||
|
unlocked = false,
|
||||||
|
posX = 0,
|
||||||
|
posY = -300,
|
||||||
|
iconSize = 42,
|
||||||
|
iconSpacing = 8,
|
||||||
|
orientation = "horizontal",
|
||||||
|
border = {
|
||||||
|
enabled = false,
|
||||||
|
width = 2,
|
||||||
|
color = { r = 1, g = 0.82, b = 0.1, a = 0.9 },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
slots = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
notes = {
|
notes = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
mainText = "",
|
mainText = "",
|
||||||
@@ -291,8 +194,8 @@ HMGT.demoModeData = {}
|
|||||||
HMGT.versionWarnings = {}
|
HMGT.versionWarnings = {}
|
||||||
HMGT.versionWhisperWarnings = {}
|
HMGT.versionWhisperWarnings = {}
|
||||||
HMGT.playerStatus = {}
|
HMGT.playerStatus = {}
|
||||||
HMGT.debugBuffer = {}
|
HMGT.devToolsBuffer = HMGT.devToolsBuffer or {}
|
||||||
HMGT.debugBufferMax = 500
|
HMGT.devToolsBufferMax = HMGT.devToolsBufferMax or 500
|
||||||
HMGT.enabledDebugScopes = {
|
HMGT.enabledDebugScopes = {
|
||||||
General = true,
|
General = true,
|
||||||
Debug = true,
|
Debug = true,
|
||||||
@@ -323,6 +226,7 @@ local DEBUG_SCOPE_LABELS = {
|
|||||||
PowerSpend = "Power Spend",
|
PowerSpend = "Power Spend",
|
||||||
RaidTimeline = "Raid Timeline",
|
RaidTimeline = "Raid Timeline",
|
||||||
Notes = "Notes",
|
Notes = "Notes",
|
||||||
|
EncounterAlerts = "Encounter Alerts",
|
||||||
}
|
}
|
||||||
local DEBUG_LEVELS = {
|
local DEBUG_LEVELS = {
|
||||||
error = 1,
|
error = 1,
|
||||||
@@ -332,7 +236,8 @@ local DEBUG_LEVELS = {
|
|||||||
|
|
||||||
function HMGT:IsDebugScopeEnabled(scope)
|
function HMGT:IsDebugScopeEnabled(scope)
|
||||||
local normalizedScope = tostring(scope or "General")
|
local normalizedScope = tostring(scope or "General")
|
||||||
local selectedScope = self.db and self.db.profile and self.db.profile.debugScope or DEBUG_SCOPE_ALL
|
local settings = self.GetDevToolsSettings and self:GetDevToolsSettings() or nil
|
||||||
|
local selectedScope = settings and settings.scope or DEBUG_SCOPE_ALL
|
||||||
if selectedScope and selectedScope ~= DEBUG_SCOPE_ALL and normalizedScope ~= selectedScope then
|
if selectedScope and selectedScope ~= DEBUG_SCOPE_ALL and normalizedScope ~= selectedScope then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
@@ -496,7 +401,11 @@ function HMGT:GetDebugLevelOptions()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HMGT:GetConfiguredDebugLevel()
|
function HMGT:GetConfiguredDebugLevel()
|
||||||
local configured = self.db and self.db.profile and self.db.profile.debugLevel or "info"
|
local settings = self.GetDevToolsSettings and self:GetDevToolsSettings() or nil
|
||||||
|
local configured = settings and settings.level or "info"
|
||||||
|
if configured == "trace" then
|
||||||
|
configured = "verbose"
|
||||||
|
end
|
||||||
if DEBUG_LEVELS[configured] then
|
if DEBUG_LEVELS[configured] then
|
||||||
return configured
|
return configured
|
||||||
end
|
end
|
||||||
@@ -524,9 +433,8 @@ function HMGT:GetDebugScopeOptions()
|
|||||||
for scope in pairs(self.enabledDebugScopes or {}) do
|
for scope in pairs(self.enabledDebugScopes or {}) do
|
||||||
addScope(scope)
|
addScope(scope)
|
||||||
end
|
end
|
||||||
for _, line in ipairs(self.debugBuffer or {}) do
|
for _, entry in ipairs(self.devToolsBuffer or {}) do
|
||||||
local scope = tostring(line):match("^%d%d:%d%d:%d%d %[[^%]]+%]%[([^%]]+)%]")
|
addScope(entry and entry.scope)
|
||||||
addScope(scope)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local names = {}
|
local names = {}
|
||||||
@@ -541,15 +449,19 @@ function HMGT:GetDebugScopeOptions()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function HMGT:GetFilteredDebugBuffer()
|
function HMGT:GetFilteredDebugBuffer()
|
||||||
local selectedLevel = self:GetConfiguredDebugLevel()
|
|
||||||
local selectedScope = self.db and self.db.profile and self.db.profile.debugScope or DEBUG_SCOPE_ALL
|
|
||||||
local filtered = {}
|
local filtered = {}
|
||||||
for _, line in ipairs(self.debugBuffer or {}) do
|
local settings = self.GetDevToolsSettings and self:GetDevToolsSettings() or nil
|
||||||
local level, scope = tostring(line):match("^%d%d:%d%d:%d%d %[([^%]]+)%]%[([^%]]+)%]")
|
local selectedScope = settings and settings.scope or DEBUG_SCOPE_ALL
|
||||||
local normalizedLevel = tostring(level or "INFO"):lower()
|
for _, entry in ipairs(self.devToolsBuffer or {}) do
|
||||||
|
local scope = tostring(entry and entry.scope or "General")
|
||||||
|
local level = tostring(entry and entry.level or "info")
|
||||||
local scopeMatches = (not selectedScope or selectedScope == DEBUG_SCOPE_ALL or scope == selectedScope)
|
local scopeMatches = (not selectedScope or selectedScope == DEBUG_SCOPE_ALL or scope == selectedScope)
|
||||||
if scopeMatches and self:ShouldIncludeDebugLine(normalizedLevel) then
|
if scopeMatches and self:ShouldIncludeDebugLine(level) then
|
||||||
filtered[#filtered + 1] = line
|
if self.FormatDevToolsEntry then
|
||||||
|
filtered[#filtered + 1] = self:FormatDevToolsEntry(entry)
|
||||||
|
else
|
||||||
|
filtered[#filtered + 1] = tostring(entry and entry.message or "")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return filtered
|
return filtered
|
||||||
@@ -877,17 +789,22 @@ function HMGT:DebugScoped(level, scope, fmt, ...)
|
|||||||
if not ok then
|
if not ok then
|
||||||
message = tostring(fmt or "")
|
message = tostring(fmt or "")
|
||||||
end
|
end
|
||||||
local line = string.format("%s [%s][%s] %s", date("%H:%M:%S"), string.upper(normalizedLevel), normalizedScope, tostring(message or ""))
|
if self.RecordDebugEntry then
|
||||||
|
self:RecordDebugEntry(normalizedLevel, normalizedScope, tostring(message or ""))
|
||||||
self.debugBuffer = self.debugBuffer or {}
|
return
|
||||||
self.debugBuffer[#self.debugBuffer + 1] = line
|
|
||||||
local maxLines = tonumber(self.debugBufferMax) or 500
|
|
||||||
while #self.debugBuffer > maxLines do
|
|
||||||
table.remove(self.debugBuffer, 1)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.debugWindow and self.debugWindow.IsShown and self.debugWindow:IsShown() and self.RefreshDebugWindow then
|
self.devToolsBuffer = self.devToolsBuffer or {}
|
||||||
self:RefreshDebugWindow()
|
self.devToolsBuffer[#self.devToolsBuffer + 1] = {
|
||||||
|
stamp = date("%H:%M:%S"),
|
||||||
|
level = normalizedLevel,
|
||||||
|
scope = normalizedScope,
|
||||||
|
message = tostring(message or ""),
|
||||||
|
kind = "debug",
|
||||||
|
}
|
||||||
|
local maxLines = tonumber(self.devToolsBufferMax) or 500
|
||||||
|
while #self.devToolsBuffer > maxLines do
|
||||||
|
table.remove(self.devToolsBuffer, 1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1572,6 +1489,67 @@ local function NormalizeRaidTimelineSettings(settings)
|
|||||||
settings.encounters = normalizedEncounters
|
settings.encounters = normalizedEncounters
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local VALID_LURA_RUNE_KEYS = {
|
||||||
|
circle = true,
|
||||||
|
cross = true,
|
||||||
|
diamond = true,
|
||||||
|
t = true,
|
||||||
|
triangle = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
local function NormalizeLuraRuneKey(value)
|
||||||
|
local key = tostring(value or ""):lower()
|
||||||
|
if VALID_LURA_RUNE_KEYS[key] then
|
||||||
|
return key
|
||||||
|
end
|
||||||
|
return ""
|
||||||
|
end
|
||||||
|
|
||||||
|
local function NormalizeLuraRunesSettings(settings)
|
||||||
|
if type(settings) ~= "table" then return end
|
||||||
|
settings.enabled = settings.enabled == true
|
||||||
|
settings.unlocked = settings.unlocked == true
|
||||||
|
settings.posX = math.floor(NormalizeLayoutValue(settings.posX, -1200, 1200, 0) + 0.5)
|
||||||
|
settings.posY = math.floor(NormalizeLayoutValue(settings.posY, -900, 900, -120) + 0.5)
|
||||||
|
settings.iconSize = math.floor(NormalizeLayoutValue(settings.iconSize, 28, 80, 44) + 0.5)
|
||||||
|
settings.backgroundAlpha = NormalizeLayoutValue(settings.backgroundAlpha, 0, 0.8, 0.14)
|
||||||
|
settings.showLabels = settings.showLabels ~= false
|
||||||
|
settings.actionBar = type(settings.actionBar) == "table" and settings.actionBar or {}
|
||||||
|
settings.actionBar.shown = settings.actionBar.shown == true
|
||||||
|
settings.actionBar.autoShow = settings.actionBar.autoShow ~= false
|
||||||
|
settings.actionBar.unlocked = settings.actionBar.unlocked == true
|
||||||
|
settings.actionBar.posX = math.floor(NormalizeLayoutValue(settings.actionBar.posX, -1200, 1200, 0) + 0.5)
|
||||||
|
settings.actionBar.posY = math.floor(NormalizeLayoutValue(settings.actionBar.posY, -900, 900, -300) + 0.5)
|
||||||
|
settings.actionBar.iconSize = math.floor(NormalizeLayoutValue(settings.actionBar.iconSize, 28, 80, 42) + 0.5)
|
||||||
|
settings.actionBar.iconSpacing = math.floor(NormalizeLayoutValue(settings.actionBar.iconSpacing, 0, 80, 8) + 0.5)
|
||||||
|
settings.actionBar.orientation = tostring(settings.actionBar.orientation or "horizontal")
|
||||||
|
if settings.actionBar.orientation ~= "vertical" then
|
||||||
|
settings.actionBar.orientation = "horizontal"
|
||||||
|
end
|
||||||
|
settings.actionBar.border = type(settings.actionBar.border) == "table" and settings.actionBar.border or {}
|
||||||
|
settings.actionBar.border.enabled = settings.actionBar.border.enabled == true
|
||||||
|
settings.actionBar.border.width = math.floor(NormalizeLayoutValue(settings.actionBar.border.width, 1, 12, 2) + 0.5)
|
||||||
|
settings.actionBar.border.color = type(settings.actionBar.border.color) == "table" and settings.actionBar.border.color or {}
|
||||||
|
settings.actionBar.border.color.r = NormalizeLayoutValue(settings.actionBar.border.color.r, 0, 1, 1)
|
||||||
|
settings.actionBar.border.color.g = NormalizeLayoutValue(settings.actionBar.border.color.g, 0, 1, 0.82)
|
||||||
|
settings.actionBar.border.color.b = NormalizeLayoutValue(settings.actionBar.border.color.b, 0, 1, 0.1)
|
||||||
|
settings.actionBar.border.color.a = NormalizeLayoutValue(settings.actionBar.border.color.a, 0, 1, 0.9)
|
||||||
|
|
||||||
|
local slots = type(settings.slots) == "table" and settings.slots or {}
|
||||||
|
local normalizedSlots = {}
|
||||||
|
for slot = 1, 5 do
|
||||||
|
normalizedSlots[slot] = NormalizeLuraRuneKey(slots[slot])
|
||||||
|
end
|
||||||
|
settings.slots = normalizedSlots
|
||||||
|
end
|
||||||
|
|
||||||
|
local function NormalizeEncounterAlertsSettings(settings)
|
||||||
|
if type(settings) ~= "table" then return end
|
||||||
|
settings.enabled = settings.enabled == true
|
||||||
|
settings.luraRunes = type(settings.luraRunes) == "table" and settings.luraRunes or {}
|
||||||
|
NormalizeLuraRunesSettings(settings.luraRunes)
|
||||||
|
end
|
||||||
|
|
||||||
local function NormalizeNotesSettings(settings)
|
local function NormalizeNotesSettings(settings)
|
||||||
if type(settings) ~= "table" then return end
|
if type(settings) ~= "table" then return end
|
||||||
settings.enabled = settings.enabled ~= false
|
settings.enabled = settings.enabled ~= false
|
||||||
@@ -1797,52 +1775,53 @@ end
|
|||||||
function HMGT:MigrateProfileSettings()
|
function HMGT:MigrateProfileSettings()
|
||||||
local p = self.db and self.db.profile
|
local p = self.db and self.db.profile
|
||||||
if not p then return end
|
if not p then return end
|
||||||
p.debug = false
|
local oldDebugEnabled = p.debug == true
|
||||||
if p.debugLevel ~= "error" and p.debugLevel ~= "info" and p.debugLevel ~= "verbose" then
|
local oldDebugLevel = p.debugLevel
|
||||||
p.debugLevel = "info"
|
local oldDebugScope = p.debugScope
|
||||||
end
|
|
||||||
if type(p.debugScope) ~= "string" or p.debugScope == "" then
|
|
||||||
p.debugScope = DEBUG_SCOPE_ALL
|
|
||||||
end
|
|
||||||
p.devTools = type(p.devTools) == "table" and p.devTools or {}
|
p.devTools = type(p.devTools) == "table" and p.devTools or {}
|
||||||
p.devTools.enabled = p.devTools.enabled == true
|
p.devTools.enabled = p.devTools.enabled == true or oldDebugEnabled
|
||||||
if p.devTools.level ~= "error" and p.devTools.level ~= "trace" then
|
if p.devTools.level == "trace" then
|
||||||
p.devTools.level = "error"
|
p.devTools.level = "verbose"
|
||||||
|
elseif p.devTools.level ~= "error" and p.devTools.level ~= "info" and p.devTools.level ~= "verbose" then
|
||||||
|
p.devTools.level = (oldDebugLevel == "error" or oldDebugLevel == "info" or oldDebugLevel == "verbose")
|
||||||
|
and oldDebugLevel
|
||||||
|
or "info"
|
||||||
end
|
end
|
||||||
if type(p.devTools.scope) ~= "string" or p.devTools.scope == "" then
|
if type(p.devTools.scope) ~= "string" or p.devTools.scope == "" then
|
||||||
p.devTools.scope = "ALL"
|
p.devTools.scope = (type(oldDebugScope) == "string" and oldDebugScope ~= "") and oldDebugScope or "ALL"
|
||||||
end
|
end
|
||||||
p.devTools.window = type(p.devTools.window) == "table" and p.devTools.window or {}
|
p.devTools.window = type(p.devTools.window) == "table" and p.devTools.window or {}
|
||||||
p.devTools.window.width = math.max(720, tonumber(p.devTools.window.width) or 920)
|
p.devTools.window.width = math.max(720, tonumber(p.devTools.window.width) or 920)
|
||||||
p.devTools.window.height = math.max(260, tonumber(p.devTools.window.height) or 420)
|
p.devTools.window.height = math.max(260, tonumber(p.devTools.window.height) or 420)
|
||||||
p.devTools.window.minimized = p.devTools.window.minimized == true
|
p.devTools.window.minimized = p.devTools.window.minimized == true
|
||||||
|
p.debug = nil
|
||||||
|
p.debugLevel = nil
|
||||||
|
p.debugScope = nil
|
||||||
p.syncRemoteCharges = true
|
p.syncRemoteCharges = true
|
||||||
|
|
||||||
if p.interruptTracker then
|
|
||||||
NormalizeBorderSettings(p.interruptTracker)
|
|
||||||
NormalizeAnchorSettings(p.interruptTracker)
|
|
||||||
NormalizeTrackerLayout(p.interruptTracker, false, true)
|
|
||||||
end
|
|
||||||
if p.raidCooldownTracker then
|
|
||||||
NormalizeBorderSettings(p.raidCooldownTracker)
|
|
||||||
NormalizeAnchorSettings(p.raidCooldownTracker)
|
|
||||||
NormalizeTrackerLayout(p.raidCooldownTracker, false, true)
|
|
||||||
end
|
|
||||||
if p.groupCooldownTracker then
|
|
||||||
NormalizeBorderSettings(p.groupCooldownTracker)
|
|
||||||
NormalizeAnchorSettings(p.groupCooldownTracker)
|
|
||||||
NormalizeTrackerLayout(p.groupCooldownTracker, true, true)
|
|
||||||
end
|
|
||||||
|
|
||||||
if type(p.trackers) ~= "table" then
|
if type(p.trackers) ~= "table" then
|
||||||
p.trackers = {}
|
p.trackers = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
if #p.trackers == 0 and p.trackerModelVersion ~= TRACKER_MODEL_VERSION then
|
if #p.trackers == 0 and p.trackerModelVersion ~= TRACKER_MODEL_VERSION then
|
||||||
|
local legacyInterrupt = type(p.interruptTracker) == "table" and p.interruptTracker or {}
|
||||||
|
local legacyRaid = type(p.raidCooldownTracker) == "table" and p.raidCooldownTracker or {}
|
||||||
|
local legacyGroup = type(p.groupCooldownTracker) == "table" and p.groupCooldownTracker or {}
|
||||||
|
|
||||||
|
NormalizeBorderSettings(legacyInterrupt)
|
||||||
|
NormalizeAnchorSettings(legacyInterrupt)
|
||||||
|
NormalizeTrackerLayout(legacyInterrupt, false, true)
|
||||||
|
NormalizeBorderSettings(legacyRaid)
|
||||||
|
NormalizeAnchorSettings(legacyRaid)
|
||||||
|
NormalizeTrackerLayout(legacyRaid, false, true)
|
||||||
|
NormalizeBorderSettings(legacyGroup)
|
||||||
|
NormalizeAnchorSettings(legacyGroup)
|
||||||
|
NormalizeTrackerLayout(legacyGroup, true, true)
|
||||||
|
|
||||||
p.trackers = {
|
p.trackers = {
|
||||||
self:BuildTrackerConfigFromPreset("interruptTracker", 1, CopyTrackerFields({}, p.interruptTracker or {})),
|
self:BuildTrackerConfigFromPreset("interruptTracker", 1, CopyTrackerFields({}, legacyInterrupt)),
|
||||||
self:BuildTrackerConfigFromPreset("raidCooldownTracker", 2, CopyTrackerFields({}, p.raidCooldownTracker or {})),
|
self:BuildTrackerConfigFromPreset("raidCooldownTracker", 2, CopyTrackerFields({}, legacyRaid)),
|
||||||
self:BuildTrackerConfigFromPreset("groupCooldownTracker", 3, CopyTrackerFields({}, p.groupCooldownTracker or {})),
|
self:BuildTrackerConfigFromPreset("groupCooldownTracker", 3, CopyTrackerFields({}, legacyGroup)),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1864,6 +1843,9 @@ function HMGT:MigrateProfileSettings()
|
|||||||
end
|
end
|
||||||
p.trackers = normalizedTrackers
|
p.trackers = normalizedTrackers
|
||||||
p.trackerModelVersion = TRACKER_MODEL_VERSION
|
p.trackerModelVersion = TRACKER_MODEL_VERSION
|
||||||
|
p.interruptTracker = nil
|
||||||
|
p.raidCooldownTracker = nil
|
||||||
|
p.groupCooldownTracker = nil
|
||||||
|
|
||||||
p.mapOverlay = p.mapOverlay or {}
|
p.mapOverlay = p.mapOverlay or {}
|
||||||
NormalizeMapOverlaySettings(p.mapOverlay)
|
NormalizeMapOverlaySettings(p.mapOverlay)
|
||||||
@@ -1872,6 +1854,8 @@ function HMGT:MigrateProfileSettings()
|
|||||||
p.personalAuras = nil
|
p.personalAuras = nil
|
||||||
p.raidTimeline = p.raidTimeline or {}
|
p.raidTimeline = p.raidTimeline or {}
|
||||||
NormalizeRaidTimelineSettings(p.raidTimeline)
|
NormalizeRaidTimelineSettings(p.raidTimeline)
|
||||||
|
p.encounterAlerts = p.encounterAlerts or {}
|
||||||
|
NormalizeEncounterAlertsSettings(p.encounterAlerts)
|
||||||
p.notes = p.notes or {}
|
p.notes = p.notes or {}
|
||||||
NormalizeNotesSettings(p.notes)
|
NormalizeNotesSettings(p.notes)
|
||||||
p.minimap = p.minimap or {}
|
p.minimap = p.minimap or {}
|
||||||
@@ -2820,7 +2804,7 @@ end
|
|||||||
|
|
||||||
--- Gibt true zurück wenn ein Tracker laut seinen Einstellungen
|
--- Gibt true zurück wenn ein Tracker laut seinen Einstellungen
|
||||||
--- im aktuellen Gruppen-Kontext angezeigt werden soll.
|
--- im aktuellen Gruppen-Kontext angezeigt werden soll.
|
||||||
--- @param settings table db.profile.interruptTracker / raidCooldownTracker
|
--- @param settings table tracker config from db.profile.trackers
|
||||||
function HMGT:IsVisibleForCurrentGroup(settings)
|
function HMGT:IsVisibleForCurrentGroup(settings)
|
||||||
if not settings.enabled then return false end
|
if not settings.enabled then return false end
|
||||||
|
|
||||||
@@ -3056,6 +3040,117 @@ function HMGT:CreateLegacyMinimapButton()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function CountTableEntries(tbl)
|
||||||
|
local count = 0
|
||||||
|
for _ in pairs(tbl or {}) do
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
|
||||||
|
function HMGT:GetHealthStatusLines()
|
||||||
|
local lines = {}
|
||||||
|
lines[#lines + 1] = "HMGT status"
|
||||||
|
lines[#lines + 1] = string.format(
|
||||||
|
"Version: addon=%s build=%s channel=%s protocol=%s",
|
||||||
|
tostring(self.ADDON_VERSION or "dev"),
|
||||||
|
tostring(self.BUILD_VERSION or self.ADDON_VERSION or "dev"),
|
||||||
|
tostring(self.RELEASE_CHANNEL or "stable"),
|
||||||
|
tostring(self.PROTOCOL_VERSION or "?")
|
||||||
|
)
|
||||||
|
|
||||||
|
local groupType = "solo"
|
||||||
|
local groupMembers = 1
|
||||||
|
if IsInRaid() then
|
||||||
|
groupType = "raid"
|
||||||
|
groupMembers = GetNumGroupMembers()
|
||||||
|
elseif IsInGroup() then
|
||||||
|
groupType = "party"
|
||||||
|
groupMembers = GetNumGroupMembers()
|
||||||
|
end
|
||||||
|
lines[#lines + 1] = string.format("Group: type=%s members=%d", groupType, tonumber(groupMembers) or 1)
|
||||||
|
|
||||||
|
local trackers = self:GetTrackerConfigs()
|
||||||
|
local enabledTrackers = 0
|
||||||
|
local normalTrackers = 0
|
||||||
|
local groupTrackers = 0
|
||||||
|
for _, tracker in ipairs(trackers) do
|
||||||
|
if tracker.enabled ~= false then
|
||||||
|
enabledTrackers = enabledTrackers + 1
|
||||||
|
end
|
||||||
|
if self:IsGroupTrackerConfig(tracker) then
|
||||||
|
groupTrackers = groupTrackers + 1
|
||||||
|
else
|
||||||
|
normalTrackers = normalTrackers + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
lines[#lines + 1] = string.format(
|
||||||
|
"Trackers: total=%d enabled=%d normal=%d group=%d model=%s",
|
||||||
|
#trackers,
|
||||||
|
enabledTrackers,
|
||||||
|
normalTrackers,
|
||||||
|
groupTrackers,
|
||||||
|
tostring(self.db and self.db.profile and self.db.profile.trackerModelVersion or "?")
|
||||||
|
)
|
||||||
|
|
||||||
|
local profile = self.db and self.db.profile or {}
|
||||||
|
local legacyCount = 0
|
||||||
|
if profile.interruptTracker ~= nil then legacyCount = legacyCount + 1 end
|
||||||
|
if profile.raidCooldownTracker ~= nil then legacyCount = legacyCount + 1 end
|
||||||
|
if profile.groupCooldownTracker ~= nil then legacyCount = legacyCount + 1 end
|
||||||
|
lines[#lines + 1] = string.format("Legacy profile keys: %d", legacyCount)
|
||||||
|
|
||||||
|
local devSettings = self.GetDevToolsSettings and self:GetDevToolsSettings() or {}
|
||||||
|
lines[#lines + 1] = string.format(
|
||||||
|
"Debug: enabled=%s level=%s scope=%s lines=%d",
|
||||||
|
tostring(devSettings.enabled == true),
|
||||||
|
tostring(devSettings.level or "info"),
|
||||||
|
tostring(devSettings.scope or "ALL"),
|
||||||
|
#(self.devToolsBuffer or {})
|
||||||
|
)
|
||||||
|
|
||||||
|
local activeCooldownPlayers = CountTableEntries(self.activeCDs)
|
||||||
|
local playerDataCount = CountTableEntries(self.playerData)
|
||||||
|
lines[#lines + 1] = string.format(
|
||||||
|
"Tracker state: players=%d cooldownPlayers=%d pendingReliable=%d",
|
||||||
|
playerDataCount,
|
||||||
|
activeCooldownPlayers,
|
||||||
|
CountTableEntries(self.pendingReliableMessages)
|
||||||
|
)
|
||||||
|
|
||||||
|
local modules = {
|
||||||
|
Tracker = self.TrackerManager ~= nil,
|
||||||
|
AuraExpiry = self.AuraExpiry ~= nil,
|
||||||
|
MapOverlay = self.MapOverlay ~= nil,
|
||||||
|
RaidTimeline = self.RaidTimeline ~= nil,
|
||||||
|
EncounterAlerts = self.EncounterAlerts ~= nil,
|
||||||
|
Notes = self.Notes ~= nil,
|
||||||
|
}
|
||||||
|
local moduleParts = {}
|
||||||
|
for name, loaded in pairs(modules) do
|
||||||
|
moduleParts[#moduleParts + 1] = string.format("%s=%s", name, loaded and "loaded" or "missing")
|
||||||
|
end
|
||||||
|
table.sort(moduleParts)
|
||||||
|
lines[#lines + 1] = "Modules: " .. table.concat(moduleParts, ", ")
|
||||||
|
|
||||||
|
local bridge = _G.HMGT_Bridge
|
||||||
|
lines[#lines + 1] = string.format("Bridge: %s", bridge and "loaded" or "not loaded")
|
||||||
|
if bridge and type(bridge.GetStatusLines) == "function" then
|
||||||
|
local statusLines = bridge:GetStatusLines()
|
||||||
|
for index = 1, math.min(3, #(statusLines or {})) do
|
||||||
|
lines[#lines + 1] = "Bridge " .. tostring(index) .. ": " .. tostring(statusLines[index])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return lines
|
||||||
|
end
|
||||||
|
|
||||||
|
function HMGT:PrintHealthStatus()
|
||||||
|
for _, line in ipairs(self:GetHealthStatusLines()) do
|
||||||
|
self:Print(line)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function HMGT:SlashCommand(input)
|
function HMGT:SlashCommand(input)
|
||||||
input = input:trim():lower()
|
input = input:trim():lower()
|
||||||
if input == "lock" then
|
if input == "lock" then
|
||||||
@@ -3092,6 +3187,8 @@ function HMGT:SlashCommand(input)
|
|||||||
else
|
else
|
||||||
self:Print("HMGT Bridge is not loaded.")
|
self:Print("HMGT Bridge is not loaded.")
|
||||||
end
|
end
|
||||||
|
elseif input == "status" then
|
||||||
|
self:PrintHealthStatus()
|
||||||
elseif input == "debug" then
|
elseif input == "debug" then
|
||||||
if self.ToggleDevToolsWindow then
|
if self.ToggleDevToolsWindow then
|
||||||
self:ToggleDevToolsWindow()
|
self:ToggleDevToolsWindow()
|
||||||
@@ -3106,6 +3203,12 @@ function HMGT:SlashCommand(input)
|
|||||||
else
|
else
|
||||||
self:OpenConfig()
|
self:OpenConfig()
|
||||||
end
|
end
|
||||||
|
elseif input:find("^lura") == 1 then
|
||||||
|
if self.EncounterAlerts and self.EncounterAlerts.HandleSlashCommand then
|
||||||
|
self.EncounterAlerts:HandleSlashCommand(input)
|
||||||
|
else
|
||||||
|
self:OpenConfig()
|
||||||
|
end
|
||||||
elseif input:find("^debugdump") == 1 then
|
elseif input:find("^debugdump") == 1 then
|
||||||
local n = tonumber(input:match("^debugdump%s+(%d+)$"))
|
local n = tonumber(input:match("^debugdump%s+(%d+)$"))
|
||||||
if self.DumpDevToolsLog then
|
if self.DumpDevToolsLog then
|
||||||
|
|||||||
@@ -66,3 +66,8 @@ Modules\RaidTimeline\RaidTimelineBossAbilityData.lua
|
|||||||
Modules\RaidTimeline\RaidTimeline.lua
|
Modules\RaidTimeline\RaidTimeline.lua
|
||||||
Modules\RaidTimeline\RaidTimelineBigWigs.lua
|
Modules\RaidTimeline\RaidTimelineBigWigs.lua
|
||||||
Modules\RaidTimeline\RaidTimelineOptions.lua
|
Modules\RaidTimeline\RaidTimelineOptions.lua
|
||||||
|
|
||||||
|
# EncounterAlerts
|
||||||
|
Modules\EncounterAlerts\EncounterAlerts.lua
|
||||||
|
Modules\EncounterAlerts\LuraRunes.lua
|
||||||
|
Modules\EncounterAlerts\EncounterAlertsOptions.lua
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ function HMGT_Config:RegisterOptionsProvider(id, provider)
|
|||||||
if type(id) ~= "string" or id == "" then return false end
|
if type(id) ~= "string" or id == "" then return false end
|
||||||
if type(provider) ~= "function" then return false end
|
if type(provider) ~= "function" then return false end
|
||||||
self._optionProviders[id] = provider
|
self._optionProviders[id] = provider
|
||||||
|
if type(self.RebuildRootOptions) == "function" then
|
||||||
|
self:RebuildRootOptions()
|
||||||
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1835,6 +1838,88 @@ function HMGT_Config:Initialize()
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
devToolsEnabled = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
name = L["OPT_DEVTOOLS_MODE"] or L["OPT_DEBUG_MODE"] or "Debug console",
|
||||||
|
desc = L["OPT_DEVTOOLS_MODE_DESC"] or L["OPT_DEBUG_MODE_DESC"] or "Enable the debug console.",
|
||||||
|
get = function()
|
||||||
|
return HMGT.GetDevToolsSettings and HMGT:GetDevToolsSettings().enabled == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
if not HMGT.GetDevToolsSettings then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
HMGT:GetDevToolsSettings().enabled = value == true
|
||||||
|
if HMGT.UpdateDevToolsWindowVisibility then
|
||||||
|
HMGT:UpdateDevToolsWindowVisibility()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
debugLevel = {
|
||||||
|
type = "select",
|
||||||
|
order = 3,
|
||||||
|
width = "full",
|
||||||
|
name = L["OPT_DEBUG_LEVEL"] or "Debug level",
|
||||||
|
values = function()
|
||||||
|
return HMGT.GetDebugLevelOptions and HMGT:GetDebugLevelOptions() or {}
|
||||||
|
end,
|
||||||
|
get = function()
|
||||||
|
return HMGT.GetConfiguredDebugLevel and HMGT:GetConfiguredDebugLevel() or "info"
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
if HMGT.GetDevToolsSettings then
|
||||||
|
HMGT:GetDevToolsSettings().level = value or "info"
|
||||||
|
end
|
||||||
|
if HMGT.RefreshDevToolsWindow then
|
||||||
|
HMGT:RefreshDevToolsWindow()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
debugScope = {
|
||||||
|
type = "select",
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
name = L["OPT_DEBUG_SCOPE"] or "Module filter",
|
||||||
|
values = function()
|
||||||
|
return HMGT.GetDebugScopeOptions and HMGT:GetDebugScopeOptions() or {}
|
||||||
|
end,
|
||||||
|
get = function()
|
||||||
|
local settings = HMGT.GetDevToolsSettings and HMGT:GetDevToolsSettings() or {}
|
||||||
|
return settings.scope or "ALL"
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
if HMGT.GetDevToolsSettings then
|
||||||
|
HMGT:GetDevToolsSettings().scope = value or "ALL"
|
||||||
|
end
|
||||||
|
if HMGT.RefreshDevToolsWindow then
|
||||||
|
HMGT:RefreshDevToolsWindow()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
openDebug = {
|
||||||
|
type = "execute",
|
||||||
|
order = 5,
|
||||||
|
width = "half",
|
||||||
|
name = L["OPT_DEVTOOLS_OPEN"] or L["OPT_DEBUG_OPEN"] or "Open debug console",
|
||||||
|
func = function()
|
||||||
|
if HMGT.OpenDevToolsWindow then
|
||||||
|
HMGT:OpenDevToolsWindow()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
clearDebug = {
|
||||||
|
type = "execute",
|
||||||
|
order = 6,
|
||||||
|
width = "half",
|
||||||
|
name = L["OPT_DEVTOOLS_CLEAR"] or L["OPT_DEBUG_CLEAR"] or "Clear debug log",
|
||||||
|
func = function()
|
||||||
|
if HMGT.ClearDevToolsLog then
|
||||||
|
HMGT:ClearDevToolsLog()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
commands = {
|
commands = {
|
||||||
@@ -1850,6 +1935,8 @@ function HMGT_Config:Initialize()
|
|||||||
name = table.concat({
|
name = table.concat({
|
||||||
"|cffffd100/hmgt|r",
|
"|cffffd100/hmgt|r",
|
||||||
"|cffffd100/hmgt debug|r",
|
"|cffffd100/hmgt debug|r",
|
||||||
|
"|cffffd100/hmgt status|r",
|
||||||
|
"|cffffd100/hmgt lura|r",
|
||||||
"|cffffd100/hmgt version|r",
|
"|cffffd100/hmgt version|r",
|
||||||
}, "\n"),
|
}, "\n"),
|
||||||
},
|
},
|
||||||
@@ -2000,6 +2087,15 @@ function HMGT_Config:Initialize()
|
|||||||
modulesGroup.args.raidTimeline = raidTimelineGroup
|
modulesGroup.args.raidTimeline = raidTimelineGroup
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local encounterAlertsGroup = BuildNamedModuleGroup(
|
||||||
|
"encounterAlerts",
|
||||||
|
L["OPT_MODULE_ENCOUNTER_ALERTS"] or "Encounter Alerts",
|
||||||
|
50
|
||||||
|
)
|
||||||
|
if encounterAlertsGroup then
|
||||||
|
modulesGroup.args.encounterAlerts = encounterAlertsGroup
|
||||||
|
end
|
||||||
|
|
||||||
if next(modulesGroup.args) == nil then
|
if next(modulesGroup.args) == nil then
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
@@ -2037,12 +2133,20 @@ function HMGT_Config:Initialize()
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
local modulesGroup = BuildModulesGroup()
|
function HMGT_Config:RebuildRootOptions()
|
||||||
if modulesGroup then
|
local modulesGroup = BuildModulesGroup()
|
||||||
rootOptions.args.modules = modulesGroup
|
if modulesGroup then
|
||||||
|
rootOptions.args.modules = modulesGroup
|
||||||
|
else
|
||||||
|
rootOptions.args.modules = nil
|
||||||
|
end
|
||||||
|
NormalizeExecuteButtonWidths(rootOptions)
|
||||||
|
if AceConfigRegistry and type(AceConfigRegistry.NotifyChange) == "function" then
|
||||||
|
AceConfigRegistry:NotifyChange(ADDON_NAME)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
NormalizeExecuteButtonWidths(rootOptions)
|
HMGT_Config:RebuildRootOptions()
|
||||||
|
|
||||||
local aceConfig = LibStub("AceConfig-3.0")
|
local aceConfig = LibStub("AceConfig-3.0")
|
||||||
local aceConfigDialog = LibStub("AceConfigDialog-3.0")
|
local aceConfigDialog = LibStub("AceConfigDialog-3.0")
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ L["VERSION_WINDOW_ASSISTANT_TAG"] = "(Assist)"
|
|||||||
L["VERSION_WINDOW_SELF_TAG"] = "(Du)"
|
L["VERSION_WINDOW_SELF_TAG"] = "(Du)"
|
||||||
L["VERSION_OUTDATED_WHISPER"] = "Deine Hail Mary Guild Tools Version ist veraltet. Du hast %s, der Gruppenleiter hat %s."
|
L["VERSION_OUTDATED_WHISPER"] = "Deine Hail Mary Guild Tools Version ist veraltet. Du hast %s, der Gruppenleiter hat %s."
|
||||||
L["VERSION_WINDOW_DEBUG_ONLY"] = "HMGT: /hmgt version ist nur bei aktiviertem Debugmodus verfuegbar."
|
L["VERSION_WINDOW_DEBUG_ONLY"] = "HMGT: /hmgt version ist nur bei aktiviertem Debugmodus verfuegbar."
|
||||||
L["VERSION_WINDOW_DEVTOOLS_ONLY"] = "HMGT: /hmgt version ist nur bei aktivierten Entwicklerwerkzeugen verfuegbar."
|
L["VERSION_WINDOW_DEVTOOLS_ONLY"] = "HMGT: /hmgt version ist nur bei aktivierter Debug-Konsole verfuegbar."
|
||||||
|
|
||||||
-- ── Options: general ─────────────────────────────────────────
|
-- ── Options: general ─────────────────────────────────────────
|
||||||
L["OPT_GENERAL"] = "Allgemein"
|
L["OPT_GENERAL"] = "Allgemein"
|
||||||
@@ -64,17 +64,47 @@ L["OPT_DEBUG_CLEAR"] = "Debug-Log leeren"
|
|||||||
L["OPT_DEBUG_SELECT_ALL"] = "Alles markieren"
|
L["OPT_DEBUG_SELECT_ALL"] = "Alles markieren"
|
||||||
L["DEBUG_WINDOW_TITLE"] = "HMGT Debug-Konsole"
|
L["DEBUG_WINDOW_TITLE"] = "HMGT Debug-Konsole"
|
||||||
L["DEBUG_WINDOW_HINT"] = "Mit dem Mausrad scrollen, Strg+A markiert alles, Strg+C kopiert markierten Text"
|
L["DEBUG_WINDOW_HINT"] = "Mit dem Mausrad scrollen, Strg+A markiert alles, Strg+C kopiert markierten Text"
|
||||||
L["OPT_DEVTOOLS_MODE"] = "Entwicklerwerkzeuge"
|
L["OPT_DEVTOOLS_MODE"] = "Debug-Konsole"
|
||||||
L["OPT_DEVTOOLS_MODE_DESC"] = "Aktiviert die strukturierte Entwickler-Konsole."
|
L["OPT_DEVTOOLS_MODE_DESC"] = "Aktiviert das gemeinsame Debug- und Entwickler-Log."
|
||||||
L["OPT_DEVTOOLS_LEVEL"] = "Erfassungsstufe"
|
L["OPT_DEVTOOLS_LEVEL"] = "Debug-Stufe"
|
||||||
L["OPT_DEVTOOLS_LEVEL_ERROR"] = "Fehler"
|
L["OPT_DEVTOOLS_LEVEL_ERROR"] = "Fehler"
|
||||||
L["OPT_DEVTOOLS_LEVEL_TRACE"] = "Trace"
|
L["OPT_DEVTOOLS_LEVEL_TRACE"] = "Ausfuehrlich"
|
||||||
L["OPT_DEVTOOLS_SCOPE"] = "Scope-Filter"
|
L["OPT_DEVTOOLS_SCOPE"] = "Modulfilter"
|
||||||
L["OPT_DEVTOOLS_SCOPE_ALL"] = "Alle Scopes"
|
L["OPT_DEVTOOLS_SCOPE_ALL"] = "Alle Module"
|
||||||
L["OPT_DEVTOOLS_OPEN"] = "Entwickler-Konsole oeffnen"
|
L["OPT_DEVTOOLS_OPEN"] = "Debug-Konsole oeffnen"
|
||||||
L["OPT_DEVTOOLS_CLEAR"] = "Entwickler-Log leeren"
|
L["OPT_DEVTOOLS_CLEAR"] = "Debug-Log leeren"
|
||||||
L["OPT_DEVTOOLS_SELECT_ALL"] = "Alles markieren"
|
L["OPT_DEVTOOLS_SELECT_ALL"] = "Alles markieren"
|
||||||
L["OPT_DEVTOOLS_DISABLED"] = "HMGT: Entwicklerwerkzeuge sind nicht aktiviert."
|
L["OPT_DEVTOOLS_DISABLED"] = "HMGT: Entwicklerwerkzeuge sind nicht aktiviert."
|
||||||
|
L["OPT_MODULE_ENCOUNTER_ALERTS"] = "Encounter Alerts"
|
||||||
|
L["OPT_ENCOUNTER_ALERTS_PLACEHOLDER"] = "Encounter-spezifische Helper-Frames und Warnungen."
|
||||||
|
L["OPT_EA_LURA_TITLE"] = "L'ura Runen"
|
||||||
|
L["OPT_EA_LURA_RUNE_WINDOW"] = "Runen-Fenster"
|
||||||
|
L["OPT_EA_LURA_ENABLED"] = "L'ura Runen aktivieren"
|
||||||
|
L["OPT_EA_LURA_UNLOCK"] = "Runen-Frame entsperren"
|
||||||
|
L["OPT_EA_LURA_HINT"] = "Erste Version: nur Normal/Heroisch Layout. Tank steht unten mittig zwischen Slot 1 und 5."
|
||||||
|
L["OPT_EA_LURA_SHOW"] = "Anzeigen"
|
||||||
|
L["OPT_EA_LURA_TEST"] = "Testmuster"
|
||||||
|
L["OPT_EA_LURA_CLEAR"] = "Leeren"
|
||||||
|
L["OPT_EA_LURA_BROADCAST"] = "Sequenz senden"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR"] = "Runen-Actionbar"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_SHOW"] = "Leiste anzeigen"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_UNLOCK"] = "Leiste entsperren"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_AUTO_SHOW"] = "Automatisch im Bossraum anzeigen"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_ORIENTATION"] = "Ausrichtung"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_HORIZONTAL"] = "Horizontal"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_VERTICAL"] = "Vertikal"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_HINT"] = "Klicke die Runen in beobachteter Reihenfolge. Slot 5 sendet die Sequenz automatisch. Der rote Button leert die lokale Sequenz."
|
||||||
|
L["OPT_EA_LURA_ICON_SIZE"] = "Icongroesse"
|
||||||
|
L["OPT_EA_LURA_BACKGROUND_ALPHA"] = "Hintergrund-Alpha"
|
||||||
|
L["OPT_EA_LURA_ICON_SPACING"] = "Icon-Abstand"
|
||||||
|
L["OPT_EA_LURA_BORDER_ENABLED"] = "Rahmen anzeigen"
|
||||||
|
L["OPT_EA_LURA_BORDER_WIDTH"] = "Rahmenbreite"
|
||||||
|
L["OPT_EA_LURA_BORDER_COLOR"] = "Rahmenfarbe"
|
||||||
|
L["OPT_EA_LURA_SHOW_LABELS"] = "Labels anzeigen"
|
||||||
|
L["OPT_EA_LURA_RUNE_EMPTY"] = "Leer"
|
||||||
|
L["OPT_EA_LURA_DRAG_HINT"] = "Ziehen zum Verschieben"
|
||||||
|
L["OPT_EA_LURA_BOSS"] = "Boss"
|
||||||
|
L["OPT_EA_LURA_TANK"] = "Tank"
|
||||||
L["DEVTOOLS_WINDOW_TITLE"] = "HMGT Entwicklerwerkzeuge"
|
L["DEVTOOLS_WINDOW_TITLE"] = "HMGT Entwicklerwerkzeuge"
|
||||||
L["DEVTOOLS_WINDOW_HINT"] = "Strukturierte Entwickler-Ereignisse fuer die aktuelle Sitzung"
|
L["DEVTOOLS_WINDOW_HINT"] = "Strukturierte Entwickler-Ereignisse fuer die aktuelle Sitzung"
|
||||||
L["OPT_SYNC_REMOTE_CHARGES"] = "Remote-Aufladungen synchronisieren"
|
L["OPT_SYNC_REMOTE_CHARGES"] = "Remote-Aufladungen synchronisieren"
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ L["VERSION_WINDOW_ASSISTANT_TAG"] = "(Assist)"
|
|||||||
L["VERSION_WINDOW_SELF_TAG"] = "(You)"
|
L["VERSION_WINDOW_SELF_TAG"] = "(You)"
|
||||||
L["VERSION_OUTDATED_WHISPER"] = "Your Hail Mary Guild Tools version is outdated. You have %s, the group leader has %s."
|
L["VERSION_OUTDATED_WHISPER"] = "Your Hail Mary Guild Tools version is outdated. You have %s, the group leader has %s."
|
||||||
L["VERSION_WINDOW_DEBUG_ONLY"] = "HMGT: /hmgt version is only available while debug mode is enabled."
|
L["VERSION_WINDOW_DEBUG_ONLY"] = "HMGT: /hmgt version is only available while debug mode is enabled."
|
||||||
L["VERSION_WINDOW_DEVTOOLS_ONLY"] = "HMGT: /hmgt version is only available while developer tools are enabled."
|
L["VERSION_WINDOW_DEVTOOLS_ONLY"] = "HMGT: /hmgt version is only available while the debug console is enabled."
|
||||||
|
|
||||||
-- ── Options: general ─────────────────────────────────────────
|
-- ── Options: general ─────────────────────────────────────────
|
||||||
L["OPT_GENERAL"] = "General"
|
L["OPT_GENERAL"] = "General"
|
||||||
@@ -64,17 +64,47 @@ L["OPT_DEBUG_CLEAR"] = "Clear debug log"
|
|||||||
L["OPT_DEBUG_SELECT_ALL"] = "Select all"
|
L["OPT_DEBUG_SELECT_ALL"] = "Select all"
|
||||||
L["DEBUG_WINDOW_TITLE"] = "HMGT Debug Console"
|
L["DEBUG_WINDOW_TITLE"] = "HMGT Debug Console"
|
||||||
L["DEBUG_WINDOW_HINT"] = "Mouse wheel scrolls, Ctrl+A selects all, Ctrl+C copies selected text"
|
L["DEBUG_WINDOW_HINT"] = "Mouse wheel scrolls, Ctrl+A selects all, Ctrl+C copies selected text"
|
||||||
L["OPT_DEVTOOLS_MODE"] = "Developer tools"
|
L["OPT_DEVTOOLS_MODE"] = "Debug console"
|
||||||
L["OPT_DEVTOOLS_MODE_DESC"] = "Enable the structured developer event console."
|
L["OPT_DEVTOOLS_MODE_DESC"] = "Enable the shared debug and developer log."
|
||||||
L["OPT_DEVTOOLS_LEVEL"] = "Capture level"
|
L["OPT_DEVTOOLS_LEVEL"] = "Debug level"
|
||||||
L["OPT_DEVTOOLS_LEVEL_ERROR"] = "Errors"
|
L["OPT_DEVTOOLS_LEVEL_ERROR"] = "Errors"
|
||||||
L["OPT_DEVTOOLS_LEVEL_TRACE"] = "Trace"
|
L["OPT_DEVTOOLS_LEVEL_TRACE"] = "Verbose"
|
||||||
L["OPT_DEVTOOLS_SCOPE"] = "Scope filter"
|
L["OPT_DEVTOOLS_SCOPE"] = "Module filter"
|
||||||
L["OPT_DEVTOOLS_SCOPE_ALL"] = "All scopes"
|
L["OPT_DEVTOOLS_SCOPE_ALL"] = "All modules"
|
||||||
L["OPT_DEVTOOLS_OPEN"] = "Open developer console"
|
L["OPT_DEVTOOLS_OPEN"] = "Open debug console"
|
||||||
L["OPT_DEVTOOLS_CLEAR"] = "Clear developer log"
|
L["OPT_DEVTOOLS_CLEAR"] = "Clear debug log"
|
||||||
L["OPT_DEVTOOLS_SELECT_ALL"] = "Select all"
|
L["OPT_DEVTOOLS_SELECT_ALL"] = "Select all"
|
||||||
L["OPT_DEVTOOLS_DISABLED"] = "HMGT: developer tools are not enabled."
|
L["OPT_DEVTOOLS_DISABLED"] = "HMGT: developer tools are not enabled."
|
||||||
|
L["OPT_MODULE_ENCOUNTER_ALERTS"] = "Encounter Alerts"
|
||||||
|
L["OPT_ENCOUNTER_ALERTS_PLACEHOLDER"] = "Encounter-specific helper frames and alerts."
|
||||||
|
L["OPT_EA_LURA_TITLE"] = "L'ura Runes"
|
||||||
|
L["OPT_EA_LURA_RUNE_WINDOW"] = "Rune window"
|
||||||
|
L["OPT_EA_LURA_ENABLED"] = "Enable L'ura runes"
|
||||||
|
L["OPT_EA_LURA_UNLOCK"] = "Unlock rune frame"
|
||||||
|
L["OPT_EA_LURA_HINT"] = "First version: normal/heroic layout only. Tank reference is placed bottom-center between slot 1 and 5."
|
||||||
|
L["OPT_EA_LURA_SHOW"] = "Show"
|
||||||
|
L["OPT_EA_LURA_TEST"] = "Test pattern"
|
||||||
|
L["OPT_EA_LURA_CLEAR"] = "Clear"
|
||||||
|
L["OPT_EA_LURA_BROADCAST"] = "Send sequence"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR"] = "Rune action bar"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_SHOW"] = "Show bar"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_UNLOCK"] = "Unlock bar"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_AUTO_SHOW"] = "Auto show in boss room"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_ORIENTATION"] = "Orientation"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_HORIZONTAL"] = "Horizontal"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_VERTICAL"] = "Vertical"
|
||||||
|
L["OPT_EA_LURA_ACTIONBAR_HINT"] = "Click rune buttons in the observed order. Slot 5 sends the sequence automatically. The red button clears the local sequence."
|
||||||
|
L["OPT_EA_LURA_ICON_SIZE"] = "Icon size"
|
||||||
|
L["OPT_EA_LURA_BACKGROUND_ALPHA"] = "Background alpha"
|
||||||
|
L["OPT_EA_LURA_ICON_SPACING"] = "Icon spacing"
|
||||||
|
L["OPT_EA_LURA_BORDER_ENABLED"] = "Show border"
|
||||||
|
L["OPT_EA_LURA_BORDER_WIDTH"] = "Border width"
|
||||||
|
L["OPT_EA_LURA_BORDER_COLOR"] = "Border color"
|
||||||
|
L["OPT_EA_LURA_SHOW_LABELS"] = "Show labels"
|
||||||
|
L["OPT_EA_LURA_RUNE_EMPTY"] = "Empty"
|
||||||
|
L["OPT_EA_LURA_DRAG_HINT"] = "Drag to move"
|
||||||
|
L["OPT_EA_LURA_BOSS"] = "Boss"
|
||||||
|
L["OPT_EA_LURA_TANK"] = "Tank"
|
||||||
L["DEVTOOLS_WINDOW_TITLE"] = "HMGT Developer Tools"
|
L["DEVTOOLS_WINDOW_TITLE"] = "HMGT Developer Tools"
|
||||||
L["DEVTOOLS_WINDOW_HINT"] = "Structured developer events for the current session"
|
L["DEVTOOLS_WINDOW_HINT"] = "Structured developer events for the current session"
|
||||||
L["OPT_SYNC_REMOTE_CHARGES"] = "Sync remote charges"
|
L["OPT_SYNC_REMOTE_CHARGES"] = "Sync remote charges"
|
||||||
|
|||||||
102
Modules/EncounterAlerts/EncounterAlerts.lua
Normal file
102
Modules/EncounterAlerts/EncounterAlerts.lua
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
local ADDON_NAME = "HailMaryGuildTools"
|
||||||
|
local HMGT = LibStub("AceAddon-3.0"):GetAddon(ADDON_NAME)
|
||||||
|
if not HMGT then return end
|
||||||
|
|
||||||
|
local L = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME, true) or {}
|
||||||
|
|
||||||
|
local EA = HMGT:NewModule("EncounterAlerts", "AceEvent-3.0")
|
||||||
|
HMGT.EncounterAlerts = EA
|
||||||
|
|
||||||
|
EA.runtimeEnabled = false
|
||||||
|
|
||||||
|
function EA:GetSettings()
|
||||||
|
local profile = HMGT.db and HMGT.db.profile
|
||||||
|
profile = profile or {}
|
||||||
|
profile.encounterAlerts = type(profile.encounterAlerts) == "table" and profile.encounterAlerts or {}
|
||||||
|
return profile.encounterAlerts
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:GetLuraRunesSettings()
|
||||||
|
local settings = self:GetSettings()
|
||||||
|
settings.luraRunes = type(settings.luraRunes) == "table" and settings.luraRunes or {}
|
||||||
|
return settings.luraRunes
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:OnEnable()
|
||||||
|
local settings = self:GetSettings()
|
||||||
|
self.runtimeEnabled = settings.enabled == true
|
||||||
|
self:RegisterEvent("PLAYER_ENTERING_WORLD", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("ZONE_CHANGED", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("ZONE_CHANGED_INDOORS", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("ZONE_CHANGED_NEW_AREA", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("GROUP_ROSTER_UPDATE", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("INSTANCE_ENCOUNTER_ENGAGE_UNIT", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("PLAYER_TARGET_CHANGED", "RefreshLuraRunesContext")
|
||||||
|
self:RegisterEvent("ENCOUNTER_START", "HandleLuraEncounterStart")
|
||||||
|
self:RegisterEvent("ENCOUNTER_END", "HandleLuraEncounterEnd")
|
||||||
|
self:RegisterEvent("CHAT_MSG_RAID", "HandleLuraRaidChat")
|
||||||
|
self:RegisterEvent("CHAT_MSG_RAID_LEADER", "HandleLuraRaidChat")
|
||||||
|
if self.LuraRunes and self.LuraRunes.Refresh then
|
||||||
|
self.LuraRunes:Refresh()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:Enable()
|
||||||
|
local settings = self:GetSettings()
|
||||||
|
settings.enabled = true
|
||||||
|
self.runtimeEnabled = true
|
||||||
|
if self.LuraRunes and self.LuraRunes.Refresh then
|
||||||
|
self.LuraRunes:Refresh()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:Disable()
|
||||||
|
local settings = self:GetSettings()
|
||||||
|
settings.enabled = false
|
||||||
|
self.runtimeEnabled = false
|
||||||
|
if self.LuraRunes and self.LuraRunes.Hide then
|
||||||
|
self.LuraRunes:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:GetDisplayName()
|
||||||
|
return L["OPT_MODULE_ENCOUNTER_ALERTS"] or "Encounter Alerts"
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:RefreshLuraRunesContext(event)
|
||||||
|
if self.LuraRunes and self.LuraRunes.RefreshContext then
|
||||||
|
self.LuraRunes:RefreshContext(event)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:HandleLuraEncounterStart(_, encounterId, encounterName)
|
||||||
|
if self.LuraRunes and self.LuraRunes.OnEncounterStart then
|
||||||
|
self.LuraRunes:OnEncounterStart(encounterId, encounterName)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:HandleLuraEncounterEnd(_, encounterId)
|
||||||
|
if self.LuraRunes and self.LuraRunes.OnEncounterEnd then
|
||||||
|
self.LuraRunes:OnEncounterEnd(encounterId)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:HandleLuraRunesComm(senderName, payload)
|
||||||
|
if self.LuraRunes and self.LuraRunes.HandleComm then
|
||||||
|
self.LuraRunes:HandleComm(senderName, payload)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:HandleLuraRaidChat(event, message, senderName)
|
||||||
|
if self.LuraRunes and self.LuraRunes.HandleRaidChatMessage then
|
||||||
|
self.LuraRunes:HandleRaidChatMessage(message, senderName, event)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function EA:HandleSlashCommand(input)
|
||||||
|
if self.LuraRunes and self.LuraRunes.HandleSlashCommand then
|
||||||
|
self.LuraRunes:HandleSlashCommand(input)
|
||||||
|
else
|
||||||
|
HMGT:OpenConfig()
|
||||||
|
end
|
||||||
|
end
|
||||||
414
Modules/EncounterAlerts/EncounterAlertsOptions.lua
Normal file
414
Modules/EncounterAlerts/EncounterAlertsOptions.lua
Normal file
@@ -0,0 +1,414 @@
|
|||||||
|
local ADDON_NAME = "HailMaryGuildTools"
|
||||||
|
local HMGT = LibStub("AceAddon-3.0"):GetAddon(ADDON_NAME)
|
||||||
|
if not HMGT then return end
|
||||||
|
if not HMGT_Config or not HMGT_Config.RegisterOptionsProvider then return end
|
||||||
|
|
||||||
|
local L = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME, true) or {}
|
||||||
|
local AceConfigRegistry = LibStub("AceConfigRegistry-3.0", true)
|
||||||
|
|
||||||
|
local function NotifyOptionsChanged()
|
||||||
|
if AceConfigRegistry and type(AceConfigRegistry.NotifyChange) == "function" then
|
||||||
|
AceConfigRegistry:NotifyChange(ADDON_NAME)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetSettings()
|
||||||
|
local profile = HMGT.db and HMGT.db.profile
|
||||||
|
if not profile then
|
||||||
|
return {}
|
||||||
|
end
|
||||||
|
profile.encounterAlerts = type(profile.encounterAlerts) == "table" and profile.encounterAlerts or {}
|
||||||
|
return profile.encounterAlerts
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetLuraSettings()
|
||||||
|
local settings = GetSettings()
|
||||||
|
settings.luraRunes = type(settings.luraRunes) == "table" and settings.luraRunes or {}
|
||||||
|
settings.luraRunes.slots = type(settings.luraRunes.slots) == "table" and settings.luraRunes.slots or {}
|
||||||
|
settings.luraRunes.actionBar = type(settings.luraRunes.actionBar) == "table" and settings.luraRunes.actionBar or {}
|
||||||
|
return settings.luraRunes
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetLuraActionBarSettings()
|
||||||
|
local settings = GetLuraSettings()
|
||||||
|
settings.actionBar.shown = settings.actionBar.shown == true
|
||||||
|
settings.actionBar.autoShow = settings.actionBar.autoShow ~= false
|
||||||
|
settings.actionBar.unlocked = settings.actionBar.unlocked == true
|
||||||
|
settings.actionBar.iconSize = tonumber(settings.actionBar.iconSize) or 42
|
||||||
|
settings.actionBar.iconSpacing = tonumber(settings.actionBar.iconSpacing) or 8
|
||||||
|
settings.actionBar.orientation = tostring(settings.actionBar.orientation or "horizontal")
|
||||||
|
if settings.actionBar.orientation ~= "vertical" then
|
||||||
|
settings.actionBar.orientation = "horizontal"
|
||||||
|
end
|
||||||
|
settings.actionBar.border = type(settings.actionBar.border) == "table" and settings.actionBar.border or {}
|
||||||
|
return settings.actionBar
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetLuraBorderSettings()
|
||||||
|
local actionBar = GetLuraActionBarSettings()
|
||||||
|
actionBar.border.enabled = actionBar.border.enabled == true
|
||||||
|
actionBar.border.width = tonumber(actionBar.border.width) or 2
|
||||||
|
actionBar.border.color = type(actionBar.border.color) == "table" and actionBar.border.color or {}
|
||||||
|
actionBar.border.color.r = tonumber(actionBar.border.color.r) or 1
|
||||||
|
actionBar.border.color.g = tonumber(actionBar.border.color.g) or 0.82
|
||||||
|
actionBar.border.color.b = tonumber(actionBar.border.color.b) or 0.1
|
||||||
|
actionBar.border.color.a = tonumber(actionBar.border.color.a) or 0.9
|
||||||
|
return actionBar.border
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetActionBarOrientationValues()
|
||||||
|
return {
|
||||||
|
horizontal = L["OPT_EA_LURA_ACTIONBAR_HORIZONTAL"] or "Horizontal",
|
||||||
|
vertical = L["OPT_EA_LURA_ACTIONBAR_VERTICAL"] or "Vertical",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GetLuraRunes()
|
||||||
|
return HMGT.EncounterAlerts and HMGT.EncounterAlerts.LuraRunes or nil
|
||||||
|
end
|
||||||
|
|
||||||
|
local function RefreshEncounterAlerts()
|
||||||
|
if HMGT.EncounterAlerts then
|
||||||
|
local settings = GetSettings()
|
||||||
|
HMGT.EncounterAlerts.runtimeEnabled = settings.enabled == true
|
||||||
|
if HMGT.EncounterAlerts.LuraRunes and HMGT.EncounterAlerts.LuraRunes.Refresh then
|
||||||
|
HMGT.EncounterAlerts.LuraRunes:Refresh()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
NotifyOptionsChanged()
|
||||||
|
end
|
||||||
|
|
||||||
|
local function BuildRuneWindowOptions()
|
||||||
|
return {
|
||||||
|
type = "group",
|
||||||
|
inline = true,
|
||||||
|
order = 2,
|
||||||
|
name = L["OPT_EA_LURA_RUNE_WINDOW"] or "Rune window",
|
||||||
|
args = {
|
||||||
|
unlocked = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 1,
|
||||||
|
width = "double",
|
||||||
|
name = L["OPT_EA_LURA_UNLOCK"] or "Unlock rune frame",
|
||||||
|
get = function()
|
||||||
|
return GetLuraSettings().unlocked == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetSettings().enabled = true
|
||||||
|
local settings = GetLuraSettings()
|
||||||
|
settings.enabled = true
|
||||||
|
settings.unlocked = value == true
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
hint = {
|
||||||
|
type = "description",
|
||||||
|
order = 2,
|
||||||
|
width = "full",
|
||||||
|
name = L["OPT_EA_LURA_HINT"] or "First version: normal/heroic layout only. Tank reference is placed bottom-center between slot 1 and 5.",
|
||||||
|
},
|
||||||
|
show = {
|
||||||
|
type = "execute",
|
||||||
|
order = 3,
|
||||||
|
width = 0.8,
|
||||||
|
name = L["OPT_EA_LURA_SHOW"] or "Show",
|
||||||
|
func = function()
|
||||||
|
local lura = GetLuraRunes()
|
||||||
|
if lura and lura.Show then
|
||||||
|
lura:Show()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
test = {
|
||||||
|
type = "execute",
|
||||||
|
order = 4,
|
||||||
|
width = 0.9,
|
||||||
|
name = L["OPT_EA_LURA_TEST"] or "Test pattern",
|
||||||
|
func = function()
|
||||||
|
local lura = GetLuraRunes()
|
||||||
|
if lura and lura.Show and lura.ApplyTestPattern then
|
||||||
|
lura:Show()
|
||||||
|
lura:ApplyTestPattern()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
clear = {
|
||||||
|
type = "execute",
|
||||||
|
order = 5,
|
||||||
|
width = 0.8,
|
||||||
|
name = L["OPT_EA_LURA_CLEAR"] or "Clear",
|
||||||
|
func = function()
|
||||||
|
local lura = GetLuraRunes()
|
||||||
|
if lura and lura.ClearAssignments then
|
||||||
|
lura:ClearAssignments(false)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
broadcast = {
|
||||||
|
type = "execute",
|
||||||
|
order = 6,
|
||||||
|
width = 1.2,
|
||||||
|
name = L["OPT_EA_LURA_BROADCAST"] or "Broadcast",
|
||||||
|
disabled = function()
|
||||||
|
local lura = GetLuraRunes()
|
||||||
|
return lura and lura.CanBroadcastSequence and not lura:CanBroadcastSequence() or false
|
||||||
|
end,
|
||||||
|
func = function()
|
||||||
|
local lura = GetLuraRunes()
|
||||||
|
if lura and lura.BroadcastAssignments then
|
||||||
|
lura:BroadcastAssignments()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
iconSize = {
|
||||||
|
type = "range",
|
||||||
|
order = 7,
|
||||||
|
width = 1.1,
|
||||||
|
min = 28,
|
||||||
|
max = 80,
|
||||||
|
step = 1,
|
||||||
|
name = L["OPT_EA_LURA_ICON_SIZE"] or "Icon size",
|
||||||
|
get = function()
|
||||||
|
return tonumber(GetLuraSettings().iconSize) or 44
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraSettings().iconSize = tonumber(value) or 44
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
backgroundAlpha = {
|
||||||
|
type = "range",
|
||||||
|
order = 8,
|
||||||
|
width = 1.1,
|
||||||
|
min = 0,
|
||||||
|
max = 0.8,
|
||||||
|
step = 0.01,
|
||||||
|
name = L["OPT_EA_LURA_BACKGROUND_ALPHA"] or "Background alpha",
|
||||||
|
get = function()
|
||||||
|
return tonumber(GetLuraSettings().backgroundAlpha) or 0.14
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraSettings().backgroundAlpha = tonumber(value) or 0.14
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function BuildRuneActionBarOptions()
|
||||||
|
return {
|
||||||
|
type = "group",
|
||||||
|
inline = true,
|
||||||
|
order = 3,
|
||||||
|
name = L["OPT_EA_LURA_ACTIONBAR"] or "Rune action bar",
|
||||||
|
args = {
|
||||||
|
shown = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 1,
|
||||||
|
width = 1.1,
|
||||||
|
name = L["OPT_EA_LURA_ACTIONBAR_SHOW"] or "Show bar",
|
||||||
|
get = function()
|
||||||
|
return GetLuraActionBarSettings().shown == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetSettings().enabled = true
|
||||||
|
local settings = GetLuraSettings()
|
||||||
|
settings.enabled = true
|
||||||
|
GetLuraActionBarSettings().shown = value == true
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
unlocked = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 2,
|
||||||
|
width = 1.2,
|
||||||
|
name = L["OPT_EA_LURA_ACTIONBAR_UNLOCK"] or "Unlock bar",
|
||||||
|
get = function()
|
||||||
|
return GetLuraActionBarSettings().unlocked == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetSettings().enabled = true
|
||||||
|
local settings = GetLuraSettings()
|
||||||
|
settings.enabled = true
|
||||||
|
local actionBar = GetLuraActionBarSettings()
|
||||||
|
actionBar.shown = true
|
||||||
|
actionBar.unlocked = value == true
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
autoShow = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 2.5,
|
||||||
|
width = 1.4,
|
||||||
|
name = L["OPT_EA_LURA_ACTIONBAR_AUTO_SHOW"] or "Auto show in boss room",
|
||||||
|
get = function()
|
||||||
|
return GetLuraActionBarSettings().autoShow == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraActionBarSettings().autoShow = value == true
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
orientation = {
|
||||||
|
type = "select",
|
||||||
|
order = 3,
|
||||||
|
width = 1.2,
|
||||||
|
name = L["OPT_EA_LURA_ACTIONBAR_ORIENTATION"] or "Orientation",
|
||||||
|
values = GetActionBarOrientationValues,
|
||||||
|
get = function()
|
||||||
|
return GetLuraActionBarSettings().orientation
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
local actionBar = GetLuraActionBarSettings()
|
||||||
|
actionBar.orientation = tostring(value or "horizontal")
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
iconSize = {
|
||||||
|
type = "range",
|
||||||
|
order = 5,
|
||||||
|
width = 1.1,
|
||||||
|
min = 28,
|
||||||
|
max = 80,
|
||||||
|
step = 1,
|
||||||
|
name = L["OPT_EA_LURA_ICON_SIZE"] or "Icon size",
|
||||||
|
get = function()
|
||||||
|
return tonumber(GetLuraActionBarSettings().iconSize) or 42
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraActionBarSettings().iconSize = tonumber(value) or 42
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
iconSpacing = {
|
||||||
|
type = "range",
|
||||||
|
order = 6,
|
||||||
|
width = 1.1,
|
||||||
|
min = 0,
|
||||||
|
max = 80,
|
||||||
|
step = 1,
|
||||||
|
name = L["OPT_EA_LURA_ICON_SPACING"] or "Icon spacing",
|
||||||
|
get = function()
|
||||||
|
return tonumber(GetLuraActionBarSettings().iconSpacing) or 8
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraActionBarSettings().iconSpacing = tonumber(value) or 8
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
borderEnabled = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 7,
|
||||||
|
width = 1.1,
|
||||||
|
name = L["OPT_EA_LURA_BORDER_ENABLED"] or "Show border",
|
||||||
|
get = function()
|
||||||
|
return GetLuraBorderSettings().enabled == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraBorderSettings().enabled = value == true
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
borderWidth = {
|
||||||
|
type = "range",
|
||||||
|
order = 8,
|
||||||
|
width = 1.1,
|
||||||
|
min = 1,
|
||||||
|
max = 12,
|
||||||
|
step = 1,
|
||||||
|
name = L["OPT_EA_LURA_BORDER_WIDTH"] or "Border width",
|
||||||
|
disabled = function()
|
||||||
|
return GetLuraBorderSettings().enabled ~= true
|
||||||
|
end,
|
||||||
|
get = function()
|
||||||
|
return tonumber(GetLuraBorderSettings().width) or 2
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
GetLuraBorderSettings().width = tonumber(value) or 2
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
borderColor = {
|
||||||
|
type = "color",
|
||||||
|
order = 9,
|
||||||
|
width = 1.1,
|
||||||
|
hasAlpha = true,
|
||||||
|
name = L["OPT_EA_LURA_BORDER_COLOR"] or "Border color",
|
||||||
|
disabled = function()
|
||||||
|
return GetLuraBorderSettings().enabled ~= true
|
||||||
|
end,
|
||||||
|
get = function()
|
||||||
|
local color = GetLuraBorderSettings().color
|
||||||
|
return color.r or 1, color.g or 0.82, color.b or 0.1, color.a or 0.9
|
||||||
|
end,
|
||||||
|
set = function(_, r, g, b, a)
|
||||||
|
local color = GetLuraBorderSettings().color
|
||||||
|
color.r = tonumber(r) or 1
|
||||||
|
color.g = tonumber(g) or 0.82
|
||||||
|
color.b = tonumber(b) or 0.1
|
||||||
|
color.a = tonumber(a) or 0.9
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
hint = {
|
||||||
|
type = "description",
|
||||||
|
order = 10,
|
||||||
|
width = "full",
|
||||||
|
name = L["OPT_EA_LURA_ACTIONBAR_HINT"] or "Click rune buttons in the observed order. Slot 5 sends the sequence automatically.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
HMGT_Config:RegisterOptionsProvider("encounterAlerts", function()
|
||||||
|
return {
|
||||||
|
path = "encounterAlerts",
|
||||||
|
order = 50,
|
||||||
|
group = {
|
||||||
|
type = "group",
|
||||||
|
name = L["OPT_MODULE_ENCOUNTER_ALERTS"] or "Encounter Alerts",
|
||||||
|
order = 50,
|
||||||
|
childGroups = "tab",
|
||||||
|
args = {
|
||||||
|
general = {
|
||||||
|
type = "group",
|
||||||
|
name = L["OPT_GENERAL"] or "General",
|
||||||
|
order = 1,
|
||||||
|
args = {
|
||||||
|
description = {
|
||||||
|
type = "description",
|
||||||
|
order = 1,
|
||||||
|
width = "full",
|
||||||
|
name = L["OPT_ENCOUNTER_ALERTS_PLACEHOLDER"] or "Encounter-specific helper frames and alerts.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
luraRunes = {
|
||||||
|
type = "group",
|
||||||
|
name = L["OPT_EA_LURA_TITLE"] or "L'ura Runes",
|
||||||
|
order = 2,
|
||||||
|
args = {
|
||||||
|
enabled = {
|
||||||
|
type = "toggle",
|
||||||
|
order = 1,
|
||||||
|
width = "double",
|
||||||
|
name = L["OPT_EA_LURA_ENABLED"] or "Enable L'ura runes",
|
||||||
|
get = function()
|
||||||
|
return GetLuraSettings().enabled == true
|
||||||
|
end,
|
||||||
|
set = function(_, value)
|
||||||
|
local enabled = value == true
|
||||||
|
GetSettings().enabled = enabled
|
||||||
|
GetLuraSettings().enabled = enabled
|
||||||
|
RefreshEncounterAlerts()
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
runeWindow = BuildRuneWindowOptions(),
|
||||||
|
actionBar = BuildRuneActionBarOptions(),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
end)
|
||||||
1113
Modules/EncounterAlerts/LuraRunes.lua
Normal file
1113
Modules/EncounterAlerts/LuraRunes.lua
Normal file
File diff suppressed because it is too large
Load Diff
1
Modules/EncounterAlerts/Media/LuraRunes/.gitkeep
Normal file
1
Modules/EncounterAlerts/Media/LuraRunes/.gitkeep
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_Circle.tga
Normal file
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_Circle.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_Diamond.tga
Normal file
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_Diamond.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_T.tga
Normal file
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_T.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_Triangle.tga
Normal file
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_Triangle.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_X.tga
Normal file
BIN
Modules/EncounterAlerts/Media/LuraRunes/Rune_X.tga
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 64 KiB |
@@ -23,8 +23,12 @@ function module:GetDefinition()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function module:GetSettings()
|
function module:GetSettings()
|
||||||
local profile = HMGT.db and HMGT.db.profile
|
for _, tracker in ipairs(HMGT:GetTrackerConfigs()) do
|
||||||
return profile and profile[self.definition.dbKey] or nil
|
if tracker.trackerKey == self.definition.trackerKey then
|
||||||
|
return tracker
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function module:Enable()
|
function module:Enable()
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ function module:GetDefinition()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function module:GetSettings()
|
function module:GetSettings()
|
||||||
local profile = HMGT.db and HMGT.db.profile
|
for _, tracker in ipairs(HMGT:GetTrackerConfigs()) do
|
||||||
return profile and profile[self.definition.dbKey] or nil
|
if tracker.trackerKey == self.definition.trackerKey then
|
||||||
|
return tracker
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function module:Enable()
|
function module:Enable()
|
||||||
|
|||||||
@@ -23,8 +23,12 @@ function module:GetDefinition()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function module:GetSettings()
|
function module:GetSettings()
|
||||||
local profile = HMGT.db and HMGT.db.profile
|
for _, tracker in ipairs(HMGT:GetTrackerConfigs()) do
|
||||||
return profile and profile[self.definition.dbKey] or nil
|
if tracker.trackerKey == self.definition.trackerKey then
|
||||||
|
return tracker
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
function module:Enable()
|
function module:Enable()
|
||||||
|
|||||||
@@ -1037,5 +1037,10 @@ function HMGT:OnCommReceived(prefix, message, distribution, sender)
|
|||||||
tonumber(duration)
|
tonumber(duration)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
elseif msgType == HMGT.MSG_LURA_RUNES then
|
||||||
|
local payload = message:match("^%a+|(.+)$") or ""
|
||||||
|
if HMGT.EncounterAlerts and HMGT.EncounterAlerts.HandleLuraRunesComm then
|
||||||
|
HMGT.EncounterAlerts:HandleLuraRunesComm(senderName, payload)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
19
readme.md
19
readme.md
@@ -16,7 +16,6 @@ It combines cooldown tracking, encounter reminders, notes, and map utilities in
|
|||||||
- Per-tracker bar and icon layouts
|
- Per-tracker bar and icon layouts
|
||||||
- Aura Expiry for selected buffs and channels
|
- Aura Expiry for selected buffs and channels
|
||||||
- Raid Timeline for encounter-based text reminders and raid cooldown assignments
|
- Raid Timeline for encounter-based text reminders and raid cooldown assignments
|
||||||
- Notes window for raid or personal note management
|
|
||||||
- Map Overlay with custom world map POIs
|
- Map Overlay with custom world map POIs
|
||||||
- Version mismatch detection inside groups and raids
|
- Version mismatch detection inside groups and raids
|
||||||
- Blizzard AddOn options integration with Ace3-based module configuration
|
- Blizzard AddOn options integration with Ace3-based module configuration
|
||||||
@@ -59,12 +58,24 @@ Provides a dedicated notes window for raid notes, personal notes, and drafts.
|
|||||||
Toggles tracker test mode
|
Toggles tracker test mode
|
||||||
- `/hmgt notes`
|
- `/hmgt notes`
|
||||||
Opens the notes window
|
Opens the notes window
|
||||||
|
- `/hmgt lura`
|
||||||
|
Opens the L'ura rune helper
|
||||||
|
- `/hmgt lura circle|x|diamond|t|triangle`
|
||||||
|
Adds one rune to the next L'ura sequence slot; slot 5 sends the sequence for raid leader/assist
|
||||||
|
- `Encounter Alerts > L'ura Runes > Rune action bar`
|
||||||
|
Shows five clickable rune buttons plus a local clear button for building the sequence
|
||||||
|
- `/hmgt lura reset`
|
||||||
|
Clears the local L'ura sequence builder
|
||||||
|
- `/hmgt lura bar`
|
||||||
|
Toggles the L'ura rune action bar
|
||||||
- `/hmgt debug`
|
- `/hmgt debug`
|
||||||
Opens the developer tools window
|
Opens the debug console
|
||||||
- `/hmgt dev`
|
- `/hmgt dev`
|
||||||
Alias for the developer tools window
|
Alias for the debug console
|
||||||
|
- `/hmgt status`
|
||||||
|
Prints a compact addon health check
|
||||||
- `/hmgt version`
|
- `/hmgt version`
|
||||||
Opens the version window when developer tools are enabled
|
Opens the version window when the debug console is enabled
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user