git
/
wowui.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
87236a4
)
20b6934 - Fix old frame removal
author
Aleksi Blinnikka <aleksi.blinnikka@gmail.com>
Wed, 21 Mar 2018 22:44:07 +0000
committer
Aleksi Blinnikka <aleksi.blinnikka@gmail.com>
Wed, 21 Mar 2018 22:44:07 +0000
OmaCD/Cooldowns.lua
patch
|
blob
|
history
diff --git
a/OmaCD/Cooldowns.lua
b/OmaCD/Cooldowns.lua
index
3663615
..
9c7add4
100644
(file)
--- a/
OmaCD/Cooldowns.lua
+++ b/
OmaCD/Cooldowns.lua
@@
-282,8
+282,10
@@
local function updatePlayer()
idToGuid["player"] = guid;
else
idToGuid["player"] = nil;
idToGuid["player"] = guid;
else
idToGuid["player"] = nil;
- for _, frame in pairs(frames[guid]) do
- removeFrame(frame);
+ if frames[guid] then
+ for _, frame in pairs(frames[guid]) do
+ removeFrame(frame);
+ end
end
end
end
end
end
end
@@
-378,25
+380,10
@@
end
-- just check removals, don't cause inspects
local function fastUpdateUnitids()
-- just check removals, don't cause inspects
local function fastUpdateUnitids()
- local size = 0;
- local prefix = "solo";
- if IsInGroup() then
- if IsInRaid() then
- size = 40;
- prefix = "raid";
- else
- size = 4;
- prefix = "party";
- end
- end
- for i = 1,size do
- local id = format("%s%i", prefix, i);
- if not UnitExists(id) or UnitGroupRolesAssigned(id) ~= "HEALER" then
- idToGuid[id] = nil;
- if frames[guid] then
- for _, frame in pairs(frames[guid]) do
- removeFrame(frame);
- end
+ for guid, unitFrames in pairs(frames) do
+ if UnitGUID(guidToId[guid]) ~= guid then
+ for _, frame in pairs(unitFrames) do
+ removeFrame(frame);
end
end
end
end
end
end