Thread Tools Display Modes
Prev Previous Post   Next Post Next
04-09-18, 03:00 AM   #1
saxitoxin
A Theradrim Guardian
 
saxitoxin's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 60
how to get a visibleItemID from transmog

I'm looking around Transmogrification_Functions for a replacement API for GetTransmogrifySlotInfo().
I think that C_Transmog.GetSlotVisualInfo() will get me the name or itemID of the selected item, but when I
try to get the info by using print(C_Transmog.GetSlotInfo(1)) i get the following error
Code:
3x SX_WallpaperKit_v.2\setup.lua:135: Usage: GetSlotInfo(slot, type)
[C]: in function `GetSlotInfo'
SX_WallpaperKit_v.2\setup.lua:135: in function <SX_WallpaperKit_v.2\setup.lua:132>

Locals:
(*temporary) = 1
(*temporary) = nil
now I have no idea what to put in as type


my plan was to do this until I found out that GetTransmogrifySlotInfo() was removed:
Lua Code:
  1. *** CREATING MAINFRAME AND OTHER STUFF HERE ***
  2.  
  3. local gearEditBox = CreateFrame("EditBox",nil,mainFrame,"InputBoxTemplate")
  4. gearEditBox:SetSize(128,32)
  5. gearEditBox:SetPoint("BOTTOM")
  6. gearEditBox:IsNumeric()
  7. gearEditBox:SetText("|cffff0000 NO GEAR LIST ")
  8. gearEditBox:SetJustifyH("CENTER")
  9. gearEditBox:SetAutoFocus(false)
  10.  
  11. local copyGearList = CreateFrame("BUTTON", nil, gearEditBox)
  12. copyGearList:SetSize(16, 16)
  13. copyGearList:SetPoint("BOTTOM", gearEditBox, "TOP")
  14. copyGearList:SetNormalTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Up")
  15. copyGearList:SetPushedTexture("Interface\\Buttons\\UI-SpellbookIcon-NextPage-Down")
  16.  
  17.  
  18. local gearList = {}
  19.  
  20. copyGearList:SetScript("OnMouseUp", function(self, button)
  21.    
  22.     gearList = table.wipe(gearList)
  23.  
  24.     for slotId = 1,19 do
  25.         local canTransmogrify = select(2, GetTransmogrifySlotInfo(slotId))
  26.         local visibleItemID = select(6, GetTransmogrifySlotInfo(slotId))
  27.  
  28.         if canTransmogrify then
  29.             if slotId == 19 then
  30.                 table.insert(gearList, "[ "..slotId.."] = ".. visibleItemID)
  31.             else
  32.                 table.insert(gearList, "[ "..slotId.."] = ".. visibleItemID..", ")
  33.             end
  34.         end
  35.     end
  36.  
  37.     gearEditBox:SetText(gearList)
  38.     print("|cff6699FFSX |cffffff00WallpaperKit|r: Gear list copied")
  39. end)
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » how to get a visibleItemID from transmog


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off