Commit e5fa9ece authored by Simpy's avatar Simpy 🐹
Browse files

sync ouf

parent 9c2c9c05
......@@ -82,6 +82,8 @@ local function Update(self, event, unit)
element:PreUpdate()
end
-- BUG: UnitPhaseReason returns wrong data for friendly NPCs in phased scenarios like WM or Chromie Time
-- https://github.com/Stanzilla/WoWUIBugs/issues/49
local phaseReason = UnitIsPlayer(unit) and UnitIsConnected(unit) and UnitPhaseReason(unit) or nil
if(phaseReason) then
element:Show()
......
......@@ -69,6 +69,7 @@ local _, ns = ...
local oUF = ns.oUF
local Private = oUF.Private
local xpcall = Private.xpcall
local unitExists = Private.unitExists
-- ElvUI block
......@@ -735,8 +736,10 @@ end
local function registerEvent(fontstr, event)
if(not events[event]) then events[event] = {} end
eventFrame:RegisterEvent(event)
tinsert(events[event], fontstr)
local isOK = xpcall(eventFrame.RegisterEvent, eventFrame, event)
if(isOK) then
tinsert(events[event], fontstr)
end
end
local function registerEvents(fontstr, tagstr)
......@@ -761,7 +764,7 @@ local function unregisterEvents(fontstr)
eventFrame:UnregisterEvent(event)
end
table.remove(data, index)
tremove(data, index)
else
index = index + 1
end
......
......@@ -137,6 +137,7 @@ function frame_metatable.__index:RegisterEvent(event, func, unitless)
else
self.unitEvents = self.unitEvents or {}
self.unitEvents[event] = true
-- UpdateUnits will take care of unit event registration for header
-- units in case we don't have a valid unit yet
local unit1, unit2 = self.unit
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment