View Single Post
12-30-14, 08:07 AM   #3
Rilgamon
Premium Member
 
Rilgamon's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 822
Funny I've started working on a cleaner-addon for my alts only yesterday and ran into exactly that problem
Seems there is no API for that. So I fell back to tooltip scanning. No ETA for a first version ... perhaps someone is quicker than me

Lua Code:
  1. local cTip = CreateFrame("GameTooltip",name.."Tooltip",nil,"GameTooltipTemplate")
  2. local function IsSoulbound(bag, slot)
  3.     cTip:SetOwner(UIParent, "ANCHOR_NONE")
  4.     cTip:SetBagItem(bag, slot)
  5.     cTip:Show()
  6.     for i = 1,cTip:NumLines() do
  7.         if(_G[name.."TooltipTextLeft"..i]:GetText()==ITEM_SOULBOUND) then
  8.             return true
  9.         end
  10.     end
  11.     cTip:Hide()
  12.     return false
  13. end
__________________
The cataclysm broke the world ... and the pandas could not fix it!
  Reply With Quote