mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-27 01:46:03 +00:00
unitframes: cache strsub raid frame detection call
This commit is contained in:
+11
-2
@@ -185,9 +185,18 @@ function pfUI.uf:UpdateVisibility()
|
||||
return
|
||||
end
|
||||
|
||||
-- cache result of strsub to avoid repeating calls
|
||||
if not self.cache_raid then
|
||||
if strsub(self:GetName(),0,6) == "pfRaid" then
|
||||
self.cache_raid = tonumber(strsub(self:GetName(),7,8))
|
||||
else
|
||||
self.cache_raid = 0
|
||||
end
|
||||
end
|
||||
|
||||
-- show groupframes as raid
|
||||
if strsub(self:GetName(),0,6) == "pfRaid" then
|
||||
local id = tonumber(strsub(self:GetName(),7,8))
|
||||
if self.cache_raid > 0 then
|
||||
local id = self.cache_raid
|
||||
|
||||
-- always show self in raidframes
|
||||
if not UnitInRaid("player") and GetNumPartyMembers() == 0 and C.unitframes.selfinraid == "1" and id == 1 then
|
||||
|
||||
Reference in New Issue
Block a user