View Single Post
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,989
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