Thread Tools Display Modes
04/04/21, 12:57 AM   #1
IsJustaGhost
AddOn Author - Click to view addons
Join Date: May 2020
Posts: 37
Question Question about cooldowns

Is there a function to get cooldown times for special items such as the jubilee cake cooldown for last time used to get tickets?
  Reply With Quote
04/04/21, 09:46 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Edit: Oh there is an API function:

Code:
* GetCollectibleCooldownAndDuration(*integer* _collectibleId_)
** _Returns:_ *integer* _cooldownRemaining_, *integer* _cooldownDuration_

There is a return value "CollectibleUsageBlockReason" saying it's COLLECTIBLE_USAGE_BLOCK_REASON_ON_COOLDOWN via function:

Code:
* GetCollectibleBlockReason(*integer* _collectibleId_)
** _Returns:_ *[CollectibleUsageBlockReason|#CollectibleUsageBlockReason]* _usageBlockReason_
Other fucntions are:
Code:
* IsCollectibleBlocked(*integer* _collectibleId_)
** _Returns:_ *bool* _isBlocked_

* IsCollectibleValidForPlayer(*integer* _collectibleId_)
** _Returns:_ *bool* _isValidForPlayer_

* IsCollectibleSlottable(*integer* _collectibleId_)
** _Returns:_ *bool* _isSlottable_

* IsCollectibleUsable(*integer* _collectibleId_)
** _Returns:_ *bool* _isUsable_
But non of them seem to return the cooldown time. Guess you could check the collectible type via the collectibel manager and the same types shoudl provide the same coolowns (like the event cake currently will be on cd for e.g. 45s then, and mounts maybe only 10s, others only 5s).

Code:
* GetCollectibleLink(*integer* _collectibleId_, *[LinkStyle|#LinkStyle]* _linkStyle_)
** _Returns:_ *string* _link_

* GetCollectibleCategoryTypeFromLink(*string* _link_)
** _Returns:_ *[CollectibleCategoryType|#CollectibleCategoryType]* _categoryType_

* GetCollectibleIdFromLink(*string* _link_)
** _Returns:_ *integer:nilable* _collectibleId_

* GetActiveCollectibleByType(*[CollectibleCategoryType|#CollectibleCategoryType]* _categoryType_)
** _Returns:_ *integer* _collectibleId_

All of them found in the API txt files linked here, for the most current API version -> "API TXT Documentation"
https://wiki.esoui.com/APIVersion#live_API_version

Last edited by Baertram : 04/04/21 at 09:49 AM.
  Reply With Quote
04/05/21, 11:07 PM   #3
IsJustaGhost
AddOn Author - Click to view addons
Join Date: May 2020
Posts: 37
Thank you for the reply.
However, not really what I was looking for.

Situation example:
You use the Jubilee cake for the first time after daily reset and a loot container opens up.
Any other time you use it after that, until the next reset, there is no loot container.
Somewhere there must be a time stamp stored telling the client/server you had previously used the cake during this reset.
  Reply With Quote
04/06/21, 08:58 AM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
This is saved and checked at server side and reset by the server at 9am in the morning (or at least it was in the past at that time).
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Question about cooldowns

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off