What is with the core.lua:initObject function? I placed a
object:SetScript("OnUpdate", PvpUpdate) in it where PvpUpdate is defined as:
local PvPUpdate = function(self, a1)
time = time + a1
if(time > 1.5) then
self:UpdatePVP()
time = 0
end
end
Yet the
UpdatePVP function is never called. Similarly, I inserted
UNIT_FACTION = "UpdatePVP", into the events table and
object:RegisterEvent"UNIT_FACTION" into the initObject function and still, the UpdatePVP function is never called. Judging from the Spawn function, initObject is called for all non-raid unit frames, so what am I missing?
In a nutshell, how can I add a new event to the unit frames and how can I get a generic OnUpdate to work?