Clean up the modules a little

This commit is contained in:
2025-05-04 20:47:00 +02:00
parent 1da1e7bf9f
commit 3a1639ab27
9 changed files with 53 additions and 36 deletions

View File

@@ -1,6 +1,5 @@
local addonname, shared = ...
local _, shared = ...
---@cast shared HeimdallShared
---@cast addonname string
local ModuleName = "CombatAlerter"
---@diagnostic disable-next-line: missing-fields
@@ -20,7 +19,10 @@ function shared.CombatAlerter.Init()
return
end
local destination, err = CLEUParser.GetDestName(...)
---@type string|nil, string, string
local err, source, destination
destination, err = CLEUParser.GetDestName(...)
if err then
if Heimdall_Data.config.combatAlerter.debug then
print(string.format("[%s] Error getting destination: %s", ModuleName, err))
@@ -39,7 +41,7 @@ function shared.CombatAlerter.Init()
return
end
local source, err = CLEUParser.GetSourceName(...)
source, err = CLEUParser.GetSourceName(...)
if err then
if Heimdall_Data.config.combatAlerter.debug then
print(string.format("[%s] Error getting source, using 'unknown': %s", ModuleName, err))