Quantcast
Download
(6 Kb)
Download
Updated: 05/27/20 01:09 AM
Compatibility:
Greymoor (6.0.5)
Updated:05/27/20 01:09 AM
Created:07/14/19 12:19 PM
Monthly downloads:3,870
Total downloads:27,305
Favorites:18
MD5:
6.0.5
LibItemLink  Popular! (More than 5000 hits)
Version: 3
by: Scootworks [More]
For Players
This Library is only for use by Add-on Developers

For Developers
This addon helps to generate some itemLinks, depending on item parameters/levels, etc...


-- global constant
lua Code:
  1. local lib = LIB_ITEM_LINK


-- Generates an item link
--- itemId = any itemId of a valid item
--- itemQuality = number - any valid quality type like ITEM_QUALITY_NORMAL (optional)
--- itemLevel = number 1-50 - if it's not a champion item, define the level (optional)
--- itemChampionPoints = number 0-160 - if you want to create a cp item (optional)
--- itemStyle = number - choose a motif style (optional)
--- isCrafted = boolean - if it's a crafted item (optional)
--- enchantId = number 1-unknown - if you want to add any enchantment to your item (optional)
--- enchantQuality = number - any valid quality type like ITEM_QUALITY_LEGENDARY (optional)
--- linkStyle = if you want some brackets or not (optional)
lua Code:
  1. function lib:BuildItemLink(itemId, itemQuality, itemLevel, itemChampionPoints, itemStyle, isCrafted, enchantId, enchantQuality, linkStyle)
Returns: string:nilable itemLink


-- Show a tooltip when you hover a control
--- control = control from parent (owner)
--- itemLink = string - any itemLink
--- point / relativePoint = number - like LEFT or TOPLEFT, etc (optional)
--- offsetX / offsetY = number - any value for an offsetX (optional)
lua Code:
  1. function lib:ShowTooltip(control, itemLink, point, offsetX, offsetY, relativePoint)


-- This functions allows you to add or remove brackets of an item link.
lua Code:
  1. function lib:ReplaceLinkStyle(itemLink, newLinkStyle)
Returns: string itemLink


-- There are just several item link styles available for chat messages. This function checks, if it's allowed to use.
lua Code:
  1. function lib:GetValidLinkStyle(linkStyle)
Returns: number linkStyle


-- The function checks for a valid item style id.
lua Code:
  1. function lib:GetValidItemStyle(itemStyleId)
Returns: number itemStyleId


-- Only returns a valid quality of an item.
-- Allowed item qualities: https://wiki.esoui.com/Globals#ItemQuality
lua Code:
  1. function lib:GetValidQuality(quality)
Returns: number quality


-- An enchant id has to be a value (number).
lua Code:
  1. function lib:GetValidEnchantId(enchantId)
Returns: number enchantId


-- Item levels have to be from 0-50. If it's higher, it still returns 50.
lua Code:
  1. function lib:GetValidLevel(itemLevel)
Returns: number itemLevel


-- Item champion points have steps of 10.
lua Code:
  1. function lib:GetValidChampionPoints(championPoints)
Returns: number championPoints


-- This functions checks for item level and item quality. Please check the file LibItemLinkData.
lua Code:
  1. function lib:GetItemSubTypeInfo(itemSubType)
Returns: number nilable:itemLevel, number nilable:itemQuality


-- SubTypes of items and enchant is encrypted. This function helps you to create a valid SubType.
lua Code:
  1. function lib:CreateSubTypes(itemLevel, championPoints, itemQuality, enchantQuality)
Returns: number itemSubType, number enchantSubType
v3 - Updated for Greymoor API
v2 - Updates dynamic Tooltip position
Optional Files (0)


Archived Files (2)
File Name
Version
Size
Uploader
Date
2
5kB
Scootworks
01/26/20 10:45 PM
1
5kB
Scootworks
07/14/19 12:19 PM


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



Category Jump: