View Single Post
05-18-13, 04:50 AM   #2
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
To check for an enchant, you need to parse the itemstring.

You can get an itemlink for a slot in your inventory with GetInventoryItemLink:
lua Code:
  1. local slotId = GetInventorySlotInfo("ChestSlot")
  2. local link = GetInventoryItemLink("player", slotId)
  3. local itemId, enchantId, gem1, gem2, gem3, gem4 = link:match("item:(%d+):(%d+):(%d+):(%d+):(%d+):(%d+)")
Tekkub's Bimbo is an excellent example of how you can detect enchants/gems.
  Reply With Quote