The intent here is to be able to enable/disable addon functions that are only needed while an event is running.
An event ID would be nice. Something that would allow the use of a comparator to determine what type of awards are available. Personally, I need it for enabling specific functions depending on whether the event tickets are awarded by quest, loot, or item.
Just an example.
Lua Code:
local LOOT_TYPE_CAKE = 3
local function getEventLoopType(eventType)
local gameEventId = ZO_GetCurrentEvent():GetId() -- just a suggested function as an idea
return someTableOfData[gameEventId ] == eventType
end
ZO_PreHook(RETICLE, "TryHandlingInteraction", function(self, interactionPossible, currentFrameTimeSeconds)
if getEventLoopType(LOOT_TYPE_CAKE ) then
-- do all the stuff
return true
else
return false
end
end)
Currently my addon is stuck with using a prediction table. Not accurate at all. I try to have it over-run based on the dates I have found for past events. But. it does not need Event Ticket reminders when there is not even an Impresario out in the world.
If there is another way of doing this, that is ZOS code, please suggest that.