diff --git a/Heimdall.lua b/Heimdall.lua index 65e93af..48919eb 100644 --- a/Heimdall.lua +++ b/Heimdall.lua @@ -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), }, diff --git a/Heimdall.toc b/Heimdall.toc index 2c73d44..62836d7 100644 --- a/Heimdall.toc +++ b/Heimdall.toc @@ -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 diff --git a/Heimdall.zip b/Heimdall.zip index 34a93b1..d4f25d7 100644 --- a/Heimdall.zip +++ b/Heimdall.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3223114b0d8b93863f7e475318d0db0cd77c5043177dc941240e189e91b8f845 -size 983738 +oid sha256:4cc2002caa8bb428d04448716673296771d91617a0a441d3423a23bb8a472e33 +size 983929 diff --git a/Modules/Config.lua b/Modules/Config.lua index 85a3f3a..d41ce10 100644 --- a/Modules/Config.lua +++ b/Modules/Config.lua @@ -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, diff --git a/Modules/DeathReporter.lua b/Modules/DeathReporter.lua index 1af5a4c..534b5f6 100644 --- a/Modules/DeathReporter.lua +++ b/Modules/DeathReporter.lua @@ -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, "([^-]+)") diff --git a/_L.lua b/_L.lua index 3893200..5eefc0b 100644 --- a/_L.lua +++ b/_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 = {