Go to Page... |
Compatibility: | Endless Archive (9.2.5) base-game patch (9.1.5) Necrom (9.0.0) |
Updated: | 11/04/23 12:32 AM |
Created: | 07/03/23 10:22 PM |
Monthly downloads: | 811 |
Total downloads: | 22,177 |
Favorites: | 6 |
MD5: |
-- Returns _*boolean*_ local wouldTicketsExcedeMax = lib.WouldTicketsExcedeMax wouldTicketsExcedeMax(eventTickets) -- Returns _*init*_ remainingTimeinSeconds local getDailyResetTimeRemainingSeconds = lib.GetDailyResetTimeRemainingSeconds getDailyResetTimeRemainingSeconds() -- Returns _*boolean*_ eventAactive IJA_Seasona_Event_Manager:IsEventActive() -- Returns _*init*_ index IJA_Seasona_Event_Manager:GetActiveEventIndex() -- Returns _*init*_ eventType IJA_Seasona_Event_Manager:GetActiveEventType() -- Returns _*object*_ eventObject IJA_Seasona_Event_Manager:GetCurrentEvent() -- Returns _*string*_ eventTitle IJA_Seasona_Event_Manager:GetEventTitle() -- Returns _*string*_ eventDescription IJA_Seasona_Event_Manager:GetEventDescription() -- Returns _*string*_ eventTitle, _*string*_ eventDescription IJA_Seasona_Event_Manager:GetEventInfo() -- Returns _*init*_ maxDailyRewards IJA_Seasona_Event_Manager:GetEventMaxDailyRewards()
-- _*boolean*_ active -- _*object*_ eventObject local function onSeasonalEventUpdate(active, eventObject) self.currentEvent = {} if active then if eventObject:GetType() == VAR_EVENT_TYPE_TICKETS then self.currentEvent = eventObject if not eventObject:IsSameEvent(self.savedVars.eventIndex) then -- start new event self:SetupEvent(eventObject) self.eventActive = false self.savedVars.eventIndex = eventObject:GetIndex() else -- reset for dailies? self:ResetDailyInfo(eventObject) end else active = false end end self:ChangeState(active) end IJA_Seasona Event_Manager:RegisterUpdateCallback(onSeasonalEventUpdate)
-- Returns _*init*_ index -- The table index of lib.events eventObject:GetIndex() -- Returns _*init*_ eventType eventObject:GetType() local EVENT_TYPE_NONE = LibSeasonalEventManager.constants.eventTypeNone local EVENT_TYPE_UNKNOWN = LibSeasonalEventManager.constants.eventTypeUnknown local EVENT_TYPE_TICKETS = LibSeasonalEventManager.constants.eventTypeTickets local EVENT_TYPE_BG = LibSeasonalEventManager.constants.eventTypeBG EVENT_TYPE_NONE = 0 -- EVENT_TYPE_UNKNOWN = 1 -- Has not yet been determined EVENT_TYPE_TICKETS = 2 -- Event that awards event tickets EVENT_TYPE_BG = 3 -- Weekend battlegrounds event -- Returns _*init*_ rewardsBy eventObject:GetRewardsBy() local REWARDS_BY_NONE = LibSeasonalEventManager.constants.rewardsByNone local REWARDS_BY_UNKNOWN = LibSeasonalEventManager.constants.rewardsByUnknown -- The event rewards, Event Tickets, are offered at quest turn in. local REWARDS_BY_QUEST = LibSeasonalEventManager.constants.rewardsByQuest -- The event rewards, Event Tickets, are offered loot pickup. local REWARDS_BY_LOOT = LibSeasonalEventManager.constants.rewardsByLoot -- The event rewards, Event Tickets, are offered by interacting with a specific target (Aniversary cake). local REWARDS_BY_TARGET = LibSeasonalEventManager.constants.rewardsByTarget -- Returns _*init*_ maxDailyRewards eventObject:GetMaxDailyRewards() -- Currently, this is used for number of event tickets per day. -- Not all event have a correct max, since zos does change them sometimes. -- Returns _*boolean*_ isSame eventObject:IsSameEvent(eventIndex) -- If the addon saves the eventIndex of events, -- it can be used to check if the event sent by update matches the saved eventIndex. -- Returns _*string*_ eventTitle eventObject:GetTitle() -- Returns _*string*_ eventDescription eventObject:GetDescription() -- Returns _*string*_ eventTitle, _*string*_ eventDescription eventObject:GetInfo()
File Name |
Version |
Size |
Uploader |
Date |
1.2 |
15kB |
IsJustaGhost |
07/27/23 07:05 PM |
|
1.1 |
15kB |
IsJustaGhost |
07/13/23 04:58 PM |
|
1 |
14kB |
IsJustaGhost |
07/03/23 10:22 PM |
Comment Options |
DohNotAgain |
View Public Profile |
Send a private message to DohNotAgain |
Find More Posts by DohNotAgain |
Add DohNotAgain to Your Buddy List |
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
07/13/23, 03:31 PM | |
|
details would look like this
I'll see what I can do. Lua Code:
|
|
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
07/13/23, 06:13 PM | |||
Forum posts: 1
File comments: 121
Uploads: 0
|
Sorry, didn't realize there was an option like that. I thought it just dumped everything it got by default. And thanks for fixing it. |
||
|
DohNotAgain |
View Public Profile |
Send a private message to DohNotAgain |
Find More Posts by DohNotAgain |
Add DohNotAgain to Your Buddy List |
07/14/23, 04:51 AM | |
|
Hi there,
your repository link is broken and somehow I do not understand how to use this library The global name of the library is LibSeasonalEventManager, right? I'd add that to the description top then. -> LibSeasonalEventManager.GetDailyResetTimeRemainingSeconds() is clear for example. What is IJA_Seasona_Event_Manager then, is it provided by this library too? |
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |
07/14/23, 06:21 AM | ||
|
IJA_Seasonal_Event_Manager is the object that manages the data and updates. The 2 functions defined using . were made for simple transposing to addons for local use. local wouldTicketsExcedeMax = LibSeasonalEventManager.WouldTicketsExcedeMax local getDailyResetTimeRemainingSeconds = LibSeasonalEventManager.GetDailyResetTimeRemainingSeconds IJA_Seasonal_Event_Manager:RegisterUpdateCallback(callback) registers a callback and triggers the update to send to the addon. That way the addon will recive the update without having to wait for daily reset. The callback will again fire on daily reset, for when a client is connected before and after the time has passed. IJA_Seasonal_Event_Manager functions independently from addons to store and check for current events. It creates an object for the current event that can be used by addons to see what event is running. If an event that awards event tickets is detected and unidentifiable on scan, it will create the object as an unknown event and register events to watch for loot and quests that will update the active event when it detects known info. When updated, it will again fire the callback to send the updated data to addons. It detects events by... If Impresario is visible then it knows an event that offers tickets is active. If not, it checks for active battlegrounds to see if one of the weekend types are active If Impresario then it checks to see if 1 of the 4 events is running that has a map pin. if not then it sets it as unknown ticket event and waits for updates. However, if was unknown and was previously identified, it will load that info from saved variables so it does not need to wait for loot or quests to update it. It will also check for active quests in the player's journal to see if they already have the quest for an unknown event Basically, IJA_Seasonal_Event_Manager does a lot of behind the scenes work to send info, in the form of an object, to addons via the update callback.
Last edited by IsJustaGhost : 07/15/23 at 06:10 AM.
|
|
|
IsJustaGhost |
View Public Profile |
Send a private message to IsJustaGhost |
Find More Posts by IsJustaGhost |
Add IsJustaGhost to Your Buddy List |
07/15/23, 05:08 AM | |
|
Thanks for the exaplantion, it's more clear now.
Hint: IJA_Seasona_Event_Manager -> Typo, should be IJA_Seasonal_Event_Manager
Last edited by Baertram : 07/15/23 at 05:09 AM.
|
|
Baertram |
View Public Profile |
Send a private message to Baertram |
Find More Posts by Baertram |
Add Baertram to Your Buddy List |