Fix deathreporter
This commit is contained in:
@@ -842,20 +842,20 @@ function shared.Config.Init()
|
||||
end)
|
||||
deathReporterConfigFrame:Add(duelThrottle, 2, 6)
|
||||
|
||||
local notifyChannel = CreateBasicSmallEditBox("HeimdallDeathReporterConfigNotifyChannel",
|
||||
deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.notifyChannel,
|
||||
Heimdall_Data.config.deathReporter.notifyChannel,
|
||||
local masterChannel = CreateBasicSmallEditBox("HeimdallDeathReporterConfigMasterChannel",
|
||||
deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.masterChannel,
|
||||
Heimdall_Data.config.deathReporter.masterChannel,
|
||||
function(self)
|
||||
local text = self:GetText()
|
||||
if string.match(text, "%S+") then
|
||||
Heimdall_Data.config.deathReporter.notifyChannel = text
|
||||
print("Notify channel set to", tostring(text))
|
||||
Heimdall_Data.config.deathReporter.masterChannel = text
|
||||
print("Master channel set to", tostring(text))
|
||||
else
|
||||
print("Invalid channel name", tostring(text))
|
||||
self:SetText(Heimdall_Data.config.deathReporter.notifyChannel)
|
||||
self:SetText(Heimdall_Data.config.deathReporter.masterChannel)
|
||||
end
|
||||
end)
|
||||
deathReporterConfigFrame:Add(notifyChannel, 2, 6)
|
||||
deathReporterConfigFrame:Add(masterChannel, 2, 6)
|
||||
|
||||
local zoneOverride = CreateBasicSmallEditBox("HeimdallDeathReporterConfigZoneOverride",
|
||||
deathReporterConfigFrame.frame, shared.L[Heimdall_Data.config.locale].config.zoneOverride,
|
||||
|
||||
@@ -92,14 +92,6 @@ function shared.DeathReporter.Init()
|
||||
SetMapByID(GetCurrentMapAreaID())
|
||||
local zoneId = GetCurrentMapAreaID()
|
||||
|
||||
source = source or "unknown"
|
||||
destination = destination or "unknown"
|
||||
spellName = spellName or "unknown"
|
||||
location = location or "unknown"
|
||||
zoneId = zoneId or 0
|
||||
x = x or 0
|
||||
y = y or 0
|
||||
|
||||
---@type Message
|
||||
local msg = {
|
||||
channel = "CHANNEL",
|
||||
@@ -187,7 +179,7 @@ function shared.DeathReporter.Init()
|
||||
local source, destination = string.match(msg, "([^ ]+) has defeated ([^ ]+) in a duel")
|
||||
if Heimdall_Data.config.deathReporter.debug then
|
||||
print(string.format("[%s] Received system message: %s", ModuleName, msg))
|
||||
print(string.format("[%s] Source: %s, Destination: %s", ModuleName, source, destination))
|
||||
print(string.format("[%s] Source: %s, Destination: %s", ModuleName, tostring(source), tostring(destination)))
|
||||
end
|
||||
if not source or not destination then return end
|
||||
source = string.match(source, "([^-]+)")
|
||||
|
||||
Reference in New Issue
Block a user