Implement player faction cache

This commit is contained in:
2024-10-05 02:12:25 +02:00
parent a1e34b3adf
commit 939be6558a
3 changed files with 8 additions and 22 deletions

View File

@@ -35,13 +35,10 @@ function(allstates, e, ...)
if UnitIsPlayer("nameplate" .. i) then
local name = UnitName("nameplate" .. i)
local faction = UnitFactionGroup("nameplate" .. i)
if faction and faction == "Alliance" then
aura_env.RegisterAlly(name)
end
WeakAurasSaved.Cyka.PlayerFactionCache[name] = faction
end
end
aura_env.CleanAlliance()
return true
end