Code format

This commit is contained in:
2025-05-15 20:37:50 +02:00
parent 9e6432d0b0
commit 69d1f9fd93
105 changed files with 24069 additions and 28084 deletions

View File

@@ -8,27 +8,27 @@ aura_env.messageQueue = {}
---@type table<string, string>
aura_env.raceMap = {
["Orc"] = "Horde",
["Undead"] = "Horde",
["Tauren"] = "Horde",
["Troll"] = "Horde",
["Blood Elf"] = "Horde",
["Goblin"] = "Horde",
["Human"] = "Alliance",
["Dwarf"] = "Alliance",
["Night Elf"] = "Alliance",
["Gnome"] = "Alliance",
["Draenei"] = "Alliance",
["Worgen"] = "Alliance",
["Vulpera"] = "Horde",
["Nightborne"] = "Horde",
["Zandalari Troll"] = "Horde",
["Kul Tiran"] = "Alliance",
["Dark Iron Dwarf"] = "Alliance",
["Void Elf"] = "Alliance",
["Lightforged Draenei"] = "Alliance",
["Mechagnome"] = "Alliance",
["Mag'har Orc"] = "Horde"
["Orc"] = "Horde",
["Undead"] = "Horde",
["Tauren"] = "Horde",
["Troll"] = "Horde",
["Blood Elf"] = "Horde",
["Goblin"] = "Horde",
["Human"] = "Alliance",
["Dwarf"] = "Alliance",
["Night Elf"] = "Alliance",
["Gnome"] = "Alliance",
["Draenei"] = "Alliance",
["Worgen"] = "Alliance",
["Vulpera"] = "Horde",
["Nightborne"] = "Horde",
["Zandalari Troll"] = "Horde",
["Kul Tiran"] = "Alliance",
["Dark Iron Dwarf"] = "Alliance",
["Void Elf"] = "Alliance",
["Lightforged Draenei"] = "Alliance",
["Mechagnome"] = "Alliance",
["Mag'har Orc"] = "Horde",
}
local throttleTimer = aura_env.config.throttle or 10
@@ -40,20 +40,16 @@ local throttleMap = {}
aura_env.NotifySpotted = function(playerName, race)
local now = GetTime()
local throttleTime = throttleMap[playerName] or 0
if now - throttleTime < throttleTimer then
return
end
if now - throttleTime < throttleTimer then return end
throttleMap[playerName] = now
local zone = aura_env.config.zone
if not zone or zone == "" then
zone = GetZoneText() .. " " .. GetSubZoneText()
end
if not zone or zone == "" then zone = GetZoneText() .. " " .. GetSubZoneText() end
local message = {
channel = "CHANNEL",
data = aura_env.config.channel,
message = string.format("I see %s at %s!", playerName, zone)
message = string.format("I see %s at %s!", playerName, zone),
}
table.insert(WeakAurasSaved.Cyka.MessageQueue, message)
end
end