+local function onEvent(self, event, ...)
+ if event == "PLAYER_REGEN_ENABLED" then
+ for _, t in pairs(self.ooc_queue) do
+ t.func(unpack(t.args));
+ end
+ if next(self.ooc_queue) ~= nil then
+ wipe(self.ooc_queue);
+ end
+ elseif event == "PLAYER_LOGIN" then
+ self:OnEnable();
+ elseif event == "ADDON_LOADED" then
+ self:OnInitialize();
+ end
+end
+