Add zone to note

This commit is contained in:
2024-10-14 19:44:49 +02:00
parent c1972f461f
commit caa6e0e379
3 changed files with 18 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
-- TODO: Add zone detection and all that shit so we're not always in orgrimmar
-- see GetSubZoneText() and GetZoneText()
---@type Message[]
aura_env.messageQueue = {}
@@ -158,12 +159,12 @@ Stinky = {
---@param self Stinky
---@return string
FormMessage = function(self)
return string.format("%s в Оргриммаре!", self.name)
return string.format("%s in %s!", self.name, aura_env.GetZone())
end,
---@param self Stinky
---@return string
FormAddonMessage = function(self)
return table.concat({ self.name, self.threat, self.note }, aura_env.separator)
return table.concat({ self.name, self.threat, aura_env.GetZone() }, aura_env.separator)
end,
}
@@ -225,6 +226,10 @@ aura_env.raceFactions = {
["Worgen"] = "Alliance",
}
aura_env.GetZone = function()
return string.format("%s (%s)", GetZoneText(), GetSubZoneText())
end
local killSpamTime = 30
local recentlyKilled = {}
aura_env.RegisterKill = function(source, destination, spellName, overkill)