For Players
Install this Library, if an addon tells you to install. Otherwise it's mostly for addon authors.
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.
You can also check your inventory for consumable items and use (consume) them.
Supported Addons (known)
FCO Starve Stop
Scootworks HUD
Grubmaster
Group Buffs
ExoYs Quickslot Assistant
The Elder Bar
Functions
You need to create an instance of this lib with:
Lua Code:
local lib = LibFoodDrinkBuff
-- or
local lib = LIB_FOOD_DRINK_BUFF
Use the variable lib to call the following functions then:
lua Code:
function lib:GetTimeLeftInSeconds(timeInMilliseconds)
Parameter: number timeInMilliseconds - any number in milliseconds Returns: time in seconds rounded up
lua Code:
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
function lib:IsFoodBuffActiveAndGetTimeLeft(unitTag)
Parameter: string unitTag - any unitTag (http://wiki.esoui.com/UnitTag) Returns: bool isBuffActive, number timeLeftInSeconds , number abilityId
lua Code:
function lib:IsAbilityAFoodBuff(abilityId)
Parameter: number abilityId - any valid ability in the game Returns: nilable:bool isAbilityAFoodBuff, or nil if not a food or drink buff
lua Code:
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:
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:
function lib:UnRegisterAbilityIdsFilterOnEventEffectChanged()
To Unregister the function above.
lua Code:
function lib:GetVersion()
Returns: lib version
lua Code:
function lib:GetEvents()
Returns: eventList from added eventnames from lib:RegisterAbilityIdsFilterOnEventEffectChanged
lua Code:
function lib:GetAddonVersionFromManifest(addOnNameString)
Parameter: string addOnNameString (optional) - any addOnName like "AwesomeGuildStore" Returns: number nilable:addOnVersion
lua Code:
function lib:IsConsumableItem(bagId, slotIndex, ignoreBlacklistItems)
Returns: isConsumableItem (ignoreBlacklistItems will filter items that contain strings from table lib.BLACKLIST_STRING_PATTERN)
lua Code:
function lib:ConsumeItemFromInventory(slotIndex)
Returns: bool successfulConsummation
lua Code:
function lib:GetConsumablesItemListFromInventory()
Returns: table consumableItemsInInventory
v18 Scootworks
- Updated API to Waking Flame
- Fixed error message in API.lua
- Added optional dependencies: LibDebugLogger, LibChatMessage
v17
- added new function: IsAbilityAFoodOrDrinkBuff
- removed function: GetAddonVersionFromManifest
- added new buff
v16
- API update
- added new blacklist items (new cyrodiil buffs)
v15
- splitted the lib into different files
- new global to access the lib: LibFoodDrinkBuff + LIB_FOOD_DRINK_BUFF
- buffTypes are now global constants and not local anymore -> check _Constants.lua
- minor code changes
- works with Greymoor patch
v14
fixed a problem with function lib:IsAbilityADrinkBuff()
v13
Pack Leader's Bone Broth is a drink buff now and not a food buff
v12
- 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
- changed how the collector works (hwo to collect and savedVars)
- implemented LibChatMessage (optional)
- added two more functions: lib:GetVersion() and lib:GetEvents()
v10
- minor code changes for collect modus
- api update
v9
- minor code changes for collect modus
- api update
v8
- use global LIB_FOOD_DRINK_BUFF to call the addon
- api update
v7
- fixed two buffs
- tiny code changes
v6
- New AddOn structure (removed subfolder)
v5
- Fixed optional LibAsync call via LibStub (no error message anymore if library is missing).
- Fixed APIVersion in manifest txt file
v4
- Recoded standalone.lua -> if LibAsync is available, then use it for dump food/drink abilities.
- Changed DEBUG_ACTIVE_BUFFS() slightly
v3
- Added UnRegisterAbilityIdsFilterOnEventEffectChanged()
- Corrected one recipe to food instead drink buff
v2
- Added 2 more foods for api 100023 (4.0 summerset)
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.
*Clicking the donate button above will take you to PayPal.com
*Clicking the donate button above will take you to Pledgie.com