View Single Post
07/23/21, 11:11 AM   #2
IsJustaGhost
AddOn Author - Click to view addons
Join Date: May 2020
Posts: 38
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:
  1. local LOOT_TYPE_CAKE = 3
  2. local function getEventLoopType(eventType)
  3.      local gameEventId = ZO_GetCurrentEvent():GetId() -- just a suggested function as an idea
  4.      return someTableOfData[gameEventId ] == eventType
  5. end
  6.  
  7. ZO_PreHook(RETICLE, "TryHandlingInteraction", function(self, interactionPossible, currentFrameTimeSeconds)
  8.      if getEventLoopType(LOOT_TYPE_CAKE ) then
  9.           -- do all the stuff
  10.           return true
  11.      else
  12.           return false
  13.      end
  14. 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.

Last edited by IsJustaGhost : 08/23/21 at 06:50 PM.
  Reply With Quote