Quantcast
Download
(7 Kb)
Download
Updated: 10/21/19 09:22 AM
Compatibility:
Dragonhold (5.2.5)
Updated:10/21/19 09:22 AM
Created:01/27/18 09:16 AM
Monthly downloads:6,365
Total downloads:35,850
Favorites:42
MD5:
5.2.5
LibFoodDrinkBuff  Popular! (More than 5000 hits)
Version: 10
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
  • 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.
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 (9)
File Name
Version
Size
Uploader
Date
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: