Quantcast
Download
(8 Kb)
Download
Updated: 01/16/20 07:02 AM
Compatibility:
Dragonhold (5.2.5)
Updated:01/16/20 07:02 AM
Created:01/27/18 09:16 AM
Monthly downloads:10,477
Total downloads:52,440
Favorites:42
MD5:
5.2.5
LibFoodDrinkBuff  Updated this week!  Popular! (More than 5000 hits)
Version: 14
by: Scootworks, Baertram
For Players
This Library is only for use by Add-on Developers

For Developers
This Library includes a list of all current food and drinks buff along with their type (food or drink, special food, etc.).
It includes functions to get information about group member's and/or player food statuses.
The Library can be used by itself or packaged in an Add-on without the standalone.lua file.

Supported Addons (known)
  • FCO Starve Stop
  • Scootworks HUD
  • Grubmaster
  • Group Buffs


Functions

You need to create an instance of this lib with:
Lua Code:
  1. local lib = LIB_FOOD_DRINK_BUFF



Use the variable lib to call the following functions then:


lua Code:
  1. function lib:GetTimeLeftInSeconds(timeInMilliseconds)
Parameter: number timeInMilliseconds - any number in milliseconds
Returns: time in seconds rounded up


lua Code:
  1. function lib:GetFoodBuffInfos(unitTag)
Parameter: string unitTag - any unitTag (http://wiki.esoui.com/UnitTag)
Returns: number buffType, bool isDrink, number abilityId, string buffName, number timeStarted, number timeEnds, textureString iconTexture


lua Code:
  1. function lib:IsFoodBuffActive(unitTag)
Parameter: string unitTag - any unitTag (http://wiki.esoui.com/UnitTag)
Returns: bool isBuffActive


lua Code:
  1. function lib:IsFoodBuffActiveAndGetTimeLeft(unitTag)
Parameter: string unitTag - any unitTag (http://wiki.esoui.com/UnitTag)
Returns: bool isBuffActive, number timeLeftInSeconds , number abilityId


lua Code:
  1. function lib:IsAbilityADrinkBuff(abilityId)
Parameter: number abilityId - any valid ability in the game
Returns: nilable:bool isAbilityADrinkBuff, or nil if not a food or drink buff


lua Code:
  1. function lib:RegisterAbilityIdsFilterOnEventEffectChanged(addonEventNameSpace, callbackFunc, filterType, filterParameter)
Parameters: addonEventNameSpace - prefered to insert your addon name. if you want to call this function twice, make sure the second/third/... addonEventNameSpace has anotehr name. example `addonName.."_01"`, `addonName.."_02"`
callbackFunc - any global function you want to run when the event is firing
filterType - choose any filter type from here: http://wiki.esoui.com/AddFilterForEvent
filterParameter - choose any filter parameter from here: http://wiki.esoui.com/AddFilterForEvent


lua Code:
  1. function lib:UnRegisterAbilityIdsFilterOnEventEffectChanged()
To Unregister the function above.



lua Code:
  1. function lib:GetVersion()
Returns: lib version


lua Code:
  1. function lib:GetEvents()
Returns: eventList from added eventnames from lib:RegisterAbilityIdsFilterOnEventEffectChanged


lua Code:
  1. function lib:GetAddonVersionFromManifest(addOnNameString)
Parameter: string addOnNameString (optional) - any addOnName like "AwesomeGuildStore"
Returns: number nilable:addOnVersion
v14 - Scootworks
fixed a problem with function lib:IsAbilityADrinkBuff()

v13 - Scootworks
Pack Leader's Bone Broth is a drink buff now and not a food buff

v12 - Scootworks
- added 3 more functions: lib:IsConsumableItem(bagId, slotIndex), lib:ConsumeItemFromInventory(slotIndex) and lib:GetConsumablesItemListFromInventory()
- the lib is able now to add more than just one filterType in function lib:RegisterAbilityIdsFilterOnEventEffectChanged

v11 - Scootworks/Baertram:
- changed how the collector works (hwo to collect and savedVars)
- implemented LibChatMessage (optional)
- added two more functions: lib:GetVersion() and lib:GetEvents()

v10 - Scootworks:
- minor code changes for collect modus
- api update
v9 - Scootworks:
- minor code changes for collect modus
- api update
v8 - Scootworks:
- use global LIB_FOOD_DRINK_BUFF to call the addon
- api update
v7 - Scootworks:
- fixed two buffs
- tiny code changes
v6 - Scootworks:
- New AddOn structure (removed subfolder)
v5 - Baertram:
- Fixed optional LibAsync call via LibStub (no error message anymore if library is missing).
- Fixed APIVersion in manifest txt file
v4 - Scootworks:
- Recoded standalone.lua -> if LibAsync is available, then use it for dump food/drink abilities.
- Changed DEBUG_ACTIVE_BUFFS() slightly
v3 - Scootworks:
- Added UnRegisterAbilityIdsFilterOnEventEffectChanged()
- Corrected one recipe to food instead drink buff
v2 - Scootworks::
- Added 2 more foods for api 100023 (4.0 summerset)
Optional Files (0)


Archived Files (12)
File Name
Version
Size
Uploader
Date
13
8kB
Scootworks
12/25/19 05:11 AM
11
8kB
Scootworks
12/08/19 09:33 PM
10
7kB
Scootworks
10/21/19 09:22 AM
9
7kB
Scootworks
08/05/19 09:46 AM
8
7kB
Scootworks
05/20/19 08:28 AM
7
7kB
Scootworks
04/20/19 03:50 PM
6
7kB
Scootworks
03/10/19 01:10 PM
5
8kB
Baertram
11/12/18 03:18 PM
4
7kB
Scootworks
11/05/18 11:49 AM
3
7kB
Scootworks
05/23/18 06:46 PM
2
7kB
Scootworks
04/26/18 09:25 AM
1
6kB
Scootworks
01/27/18 09:16 AM


There have been no comments posted to this file.
Be the first to add one.



Category Jump: