Add notifications for essence
This commit is contained in:
@@ -955,7 +955,7 @@ function shared.Config.Init()
|
||||
Heimdall_Data.config.inviter.listeningChannel,
|
||||
function(self)
|
||||
local text = self:GetText()
|
||||
if string.match(text, "%d+") then
|
||||
if string.match(text, "%D+") then
|
||||
Heimdall_Data.config.inviter.listeningChannel = text
|
||||
print("Listening channel set to", tostring(text))
|
||||
else
|
||||
|
||||
@@ -153,6 +153,7 @@ function shared.Spotter.Init()
|
||||
print(string.format("[%s] Player %s coordinates: %.2f, %.2f", ModuleName, name, x * 100, y * 100))
|
||||
end
|
||||
|
||||
local pvpOn = UnitIsPVP(unit)
|
||||
local stinky = shared.IsStinky(name) or false
|
||||
SetMapToCurrentZone()
|
||||
SetMapByID(GetCurrentMapAreaID())
|
||||
@@ -163,6 +164,7 @@ function shared.Spotter.Init()
|
||||
stinky and string.format("(%s)", "!!!!") or "",
|
||||
race,
|
||||
faction,
|
||||
pvpOn and shared.L.en.tidbits.pvpOn or shared.L.en.tidbits.pvpOff,
|
||||
string.gsub(FormatHP(hp), "M", "kk"),
|
||||
string.gsub(FormatHP(maxHp), "M", "kk"),
|
||||
location,
|
||||
@@ -210,11 +212,20 @@ function shared.Spotter.Init()
|
||||
stinky and string.format("(%s)", "!!!!") or "",
|
||||
ruRace or race,
|
||||
ruFaction or faction,
|
||||
FormatHP(hp),
|
||||
FormatHP(maxHp),
|
||||
pvpOn and shared.L.ru.tidbits.pvpOn or shared.L.ru.tidbits.pvpOff,
|
||||
string.gsub(FormatHP(hp), "M", "kk"),
|
||||
string.gsub(FormatHP(maxHp), "M", "kk"),
|
||||
string.format("%s (%s)", ruZone or zone, ruSubzone or subzone),
|
||||
tostring(GetCurrentMapAreaID()),
|
||||
x * 100, y * 100)
|
||||
if Heimdall_Data.config.essencex.spotter and Heimdall_Data.config.essencex.enabled then
|
||||
local msg = {
|
||||
channel = "CHANNEL",
|
||||
data = Heimdall_Data.config.essencex.masterChannel,
|
||||
message = text
|
||||
}
|
||||
table.insert(shared.messenger.queue, msg)
|
||||
end
|
||||
|
||||
if Heimdall_Data.config.spotter.debug then
|
||||
print(string.format("[%s] Sending notification: %s", ModuleName, text))
|
||||
|
||||
@@ -200,6 +200,10 @@ function shared.Whoer.Init()
|
||||
}
|
||||
--table.insert(shared.messenger.queue, msg)
|
||||
table.insert(shared.networkMessenger.queue, msg)
|
||||
if Heimdall_Data.config.essencex.who and Heimdall_Data.config.essencex.enabled then
|
||||
msg.data = Heimdall_Data.config.essencex.masterChannel
|
||||
table.insert(shared.messenger.queue, msg)
|
||||
end
|
||||
|
||||
if Heimdall_Data.config.who.doWhisper then
|
||||
if Heimdall_Data.config.who.debug then
|
||||
@@ -277,6 +281,11 @@ function shared.Whoer.Init()
|
||||
}
|
||||
--table.insert(shared.messenger.queue, msg)
|
||||
table.insert(shared.networkMessenger.queue, msg)
|
||||
if Heimdall_Data.config.essencex.who and Heimdall_Data.config.essencex.enabled then
|
||||
msg.data = Heimdall_Data.config.essencex.masterChannel
|
||||
table.insert(shared.messenger.queue, msg)
|
||||
end
|
||||
|
||||
if Heimdall_Data.config.who.doWhisper then
|
||||
for _, name in pairs(Heimdall_Data.config.whisperNotify) do
|
||||
---@type Message
|
||||
@@ -331,6 +340,12 @@ function shared.Whoer.Init()
|
||||
}
|
||||
--table.insert(shared.messenger.queue, msg)
|
||||
table.insert(shared.networkMessenger.queue, msg)
|
||||
if Heimdall_Data.config.essencex.who and Heimdall_Data.config.essencex.enabled then
|
||||
--if player.guild == "БеспредеЛ" then
|
||||
msg.data = Heimdall_Data.config.essencex.masterChannel
|
||||
table.insert(shared.messenger.queue, msg)
|
||||
--end
|
||||
end
|
||||
|
||||
if Heimdall_Data.config.who.doWhisper then
|
||||
for _, name in pairs(Heimdall_Data.config.whisperNotify) do
|
||||
|
||||
Reference in New Issue
Block a user