This commit is contained in:
@@ -67,8 +67,13 @@ function shared.Spotter.Init()
|
||||
end
|
||||
|
||||
if Heimdall_Data.config.spotter.debug then
|
||||
print(string.format("[%s] Using everyone setting: %s", ModuleName,
|
||||
tostring(Heimdall_Data.config.spotter.everyone)))
|
||||
print(
|
||||
string.format(
|
||||
"[%s] Using everyone setting: %s",
|
||||
ModuleName,
|
||||
tostring(Heimdall_Data.config.spotter.everyone)
|
||||
)
|
||||
)
|
||||
end
|
||||
return Heimdall_Data.config.spotter.everyone
|
||||
end
|
||||
@@ -158,7 +163,8 @@ function shared.Spotter.Init()
|
||||
print(string.format("[%s] Processing channel: %s", ModuleName, channel))
|
||||
end
|
||||
local locale = shared.GetLocaleForChannel(channel)
|
||||
local text = string.format(shared._L("spotterSpotted", locale),
|
||||
local text = string.format(
|
||||
shared._L("spotterSpotted", locale),
|
||||
hostile and shared._L("hostile", locale) or shared._L("friendly", locale),
|
||||
name,
|
||||
shared._L(class, locale),
|
||||
@@ -168,15 +174,18 @@ function shared.Spotter.Init()
|
||||
pvpOn and shared._L("pvpOn", locale) or shared._L("pvpOff", locale),
|
||||
string.gsub(FormatHP(hp), "M", "kk"),
|
||||
string.gsub(FormatHP(maxHp), "M", "kk"),
|
||||
shared._L(zone, locale), shared._L(subzone, locale),
|
||||
shared._L(zone, locale),
|
||||
shared._L(subzone, locale),
|
||||
areaId,
|
||||
x * 100, y * 100)
|
||||
x * 100,
|
||||
y * 100
|
||||
)
|
||||
|
||||
---@type Message
|
||||
local msg = {
|
||||
channel = "C",
|
||||
data = channel,
|
||||
message = text
|
||||
message = text,
|
||||
}
|
||||
if Heimdall_Data.config.spotter.debug then
|
||||
print(string.format("[%s] Queuing spotter message", ModuleName))
|
||||
@@ -201,9 +210,7 @@ function shared.Spotter.Init()
|
||||
return
|
||||
end
|
||||
|
||||
if event == "UNIT_TARGET" then
|
||||
unit = "target"
|
||||
end
|
||||
if event == "UNIT_TARGET" then unit = "target" end
|
||||
|
||||
local err = NotifySpotted(unit)
|
||||
if err then
|
||||
@@ -213,8 +220,6 @@ function shared.Spotter.Init()
|
||||
end
|
||||
end)
|
||||
|
||||
if Heimdall_Data.config.spotter.debug then
|
||||
print(string.format("[%s] Module initialized", ModuleName))
|
||||
end
|
||||
if Heimdall_Data.config.spotter.debug then print(string.format("[%s] Module initialized", ModuleName)) end
|
||||
print("[Heimdall] Spotter loaded")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user