Quantcast
WoWInterface - View Single Post - New Item API
Thread: New Item API
View Single Post
05-31-18, 03:28 AM   #3
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 65
Originally Posted by runamonk View Post
I scan the tooltip and pull the scaled item level from there, it works everytime.

This looks interesting.
That is what I was using before but this is a lot easier. One side note is you may need to wrap the code in the following code if it is going to load at startup.

Lua Code:
  1. local item = Item:CreateFromBagAndSlot(bagID, slotID)
  2. item:ContinueOnItemLoad(function()
  3.   -- Do thing with the data here.
  4. end)

The way they have item and spell data it needs to make sure everything is loaded before when the player first logs in.

-----

Oh and it also has a function to check if an item is soulbound or not.

Lua Code:
  1. local item = Item:CreateFromBagAndSlot(bagID, slotID)
  2.  
  3. item:ContinueOnItemLoad(function()
  4.     local location = item:GetItemLocation()
  5.     local isSoulbound = C_Item.IsBound(location)
  6.  
  7.     -- Do stuff here.
  8. end)
__________________
Thomas aka Urnn

Last edited by thomasjohnshannon : 05-31-18 at 03:35 AM.
  Reply With Quote