Implement toggling stinkiness and integrate stinkies with spotter

This commit is contained in:
2024-12-12 17:43:57 +01:00
parent e5151bc688
commit 33538be9f5
3 changed files with 25 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ function data.Spotter.Init()
---@return string? error
local function ShouldNotify(unit, name, faction, hostile)
if data.config.spotter.stinky then
if data.stinkies[name] then return true end
if data.config.stinkies[name] then return true end
end
if data.config.spotter.alliance then
if faction == "Alliance" then return true end
@@ -78,8 +78,10 @@ function data.Spotter.Init()
location = string.format("%s (%s)", zone, subzone)
end
local text = string.format("I see (%s) %s of race %s (%s) with health %s/%s at %s",
local stinky = data.config.stinkies[name] or false
local text = string.format("I see (%s) %s %s of race %s (%s) with health %s/%s at %s",
hostile and "Hostile" or "Friendly",
stinky and string.format("(%s)", "!!!!") or "",
name,
race,
faction,