More betterer race detection hopefully

This commit is contained in:
2024-10-14 00:04:36 +02:00
parent f272766915
commit 177517c268
2 changed files with 23 additions and 0 deletions

View File

@@ -35,6 +35,13 @@ function(allstates, e, ...)
if UnitIsPlayer("nameplate" .. i) then if UnitIsPlayer("nameplate" .. i) then
local name = UnitName("nameplate" .. i) local name = UnitName("nameplate" .. i)
local faction = UnitFactionGroup("nameplate" .. i) local faction = UnitFactionGroup("nameplate" .. i)
local _, race = UnitRace("nameplate" .. i)
local raceFaction = aura_env.raceFactions[race]
if not raceFaction then
print("Unknown race faction", race)
else
faction = raceFaction
end
WeakAurasSaved.Cyka.PlayerFactionCache[name] = faction WeakAurasSaved.Cyka.PlayerFactionCache[name] = faction
end end
end end

View File

@@ -36,6 +36,22 @@ WeakAurasSaved.Cyka.Stinkies = {
["Zawaz"] = nil, ["Zawaz"] = nil,
["Totleta"] = nil, ["Totleta"] = nil,
} }
aura_env.raceFactions = {
["Orc"] = "Horde",
["Undead"] = "Horde",
["Tauren"] = "Horde",
["Troll"] = "Horde",
["BloodElf"] = "Horde",
["Goblin"] = "Horde",
["Human"] = "Alliance",
["Dwarf"] = "Alliance",
["NightElf"] = "Alliance",
["Gnome"] = "Alliance",
["Draenei"] = "Alliance",
["Worgen"] = "Alliance",
}
local toNotify = { "Succpotato", "Extazyk", "Smokefire", "Smokemantra", "Хихихантер", "Муркот", "Растафаркрай" } local toNotify = { "Succpotato", "Extazyk", "Smokefire", "Smokemantra", "Хихихантер", "Муркот", "Растафаркрай" }
-- local toNotify = { "Succpotato" } -- local toNotify = { "Succpotato" }
aura_env.whisperQueue = {} aura_env.whisperQueue = {}