Fix deathreporter
This commit is contained in:
@@ -92,7 +92,7 @@ local function init()
|
||||
---@field debug boolean
|
||||
---@field throttle number
|
||||
---@field doWhisper boolean
|
||||
---@field notifyChannel string
|
||||
---@field masterChannel string
|
||||
---@field zoneOverride string?
|
||||
---@field duelThrottle number
|
||||
|
||||
@@ -272,7 +272,7 @@ local function init()
|
||||
debug = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "debug" }, false),
|
||||
throttle = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "throttle" }, 10),
|
||||
doWhisper = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "doWhisper" }, true),
|
||||
notifyChannel = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "notifyChannel" }, "Agent"),
|
||||
masterChannel = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "masterChannel" }, "Agent"),
|
||||
zoneOverride = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "zoneOverride" }, nil),
|
||||
duelThrottle = shared.GetOrDefault(Heimdall_Data, { "config", "deathReporter", "duelThrottle" }, 5),
|
||||
},
|
||||
|
@@ -1,6 +1,6 @@
|
||||
## Interface: 70300
|
||||
## Title: Heimdall
|
||||
## Version: 3.2.2
|
||||
## Version: 3.2.3
|
||||
## Notes: Watches over areas and alerts when hostiles spotted
|
||||
## Author: Cyka
|
||||
## SavedVariables: Heimdall_Data
|
||||
|
BIN
Heimdall.zip
(Stored with Git LFS)
BIN
Heimdall.zip
(Stored with Git LFS)
Binary file not shown.
@@ -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, "([^-]+)")
|
||||
|
4
_L.lua
4
_L.lua
@@ -8,7 +8,7 @@ shared.L = {
|
||||
whoerNew = "%s %s of class %s, race %s (%s) and guild %s in %s, first seen: %s, last seen: %s, times seen: %d",
|
||||
whoerMoved = "%s of class %s (%s - %s) and guild %s moved to %s",
|
||||
whoerGone = "%s of class %s and guild %s left %s",
|
||||
killed = "%s killed %s with %s in %s (%s) at [%s](%2.2f, %2.2f)",
|
||||
killed = "%s killed %s with %s in %s at [%s](%2.2f, %2.2f)",
|
||||
tidbits = {
|
||||
hostile = "hostile",
|
||||
friendly = "friendly",
|
||||
@@ -81,7 +81,7 @@ shared.L = {
|
||||
"%s %s класса %s, расы %s (%s) и гильдии %s в %s, первый раз видели: %s, последний раз видели: %s, раз видели: %d",
|
||||
whoerMoved = "%s класса %s (%s - %s) и гильдии %s переместился в %s",
|
||||
whoerGone = "%s класса %s и гильдии %s покинул %s",
|
||||
killed = "%s убил %s с %s в %s (%s) на [%s](%2.2f, %2.2f)",
|
||||
killed = "%s убил %s с %s в %s на [%s](%2.2f, %2.2f)",
|
||||
-- A lot of this shit I get straight from the API in english (my locale)
|
||||
-- So there is no need to translate it from english to english
|
||||
tidbits = {
|
||||
|
Reference in New Issue
Block a user