Inspect another's transmog info? - WoWInterface
Thread Tools Display Modes
Prev Previous Post   Next Post Next
05-14-16, 02:13 PM   #1
An Aku'mai Servant
Hiketeia's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 33
Inspect another's transmog info?

Still new at this all so I can't tell if I just can't find the function I want, or if it doesn't exist, or if I'm not using the calls I have correctly...

I want to be able to get item info about another person's transmog gear.

In the default UI, if you inspect someone, hover over them, the game tooltip shows the "Transmogrified to:" entry and lists the name of the item. Looking into InspectPaperDollFrame.lua in the Blizzard_InspectUI it just uses GameTooltip:SetInventoryItem(InspectFrame.unit, self:GetID()) to do that. Looking at GameTooltip.lua from FrameXML though has no SetInventoryItem method that I can review to see how it does that.

Looking through the API listing, and I found GetTransmogrifySlotInfo, with works great for my own inventory but doesn't seem to take a 'unit' like all the other GetInventory* calls so I can't use it during an inspect?

Will I have to do that tooltip scraping thing others have mentioned and then look up the inventory info based on the name of the item pulled from the tooltip? Seems like there should be a better way.

Thanks for any pointers.

In you're curious here is the code that dumps your own transmog info.
Lua Code:
  1. transmogSlots = { InspectHeadSlot, InspectShoulderSlot, InspectBackSlot, InspectChestSlot, InspectWristSlot, InspectHandsSlot, InspectWaistSlot, InspectLegsSlot, InspectFeetSlot, InspectMainHandSlot, InspectSecondaryHandSlot }
  3. unit = "player"
  5. for i, slot in ipairs(transmogSlots) do
  6.    slotId = slot:GetID()
  7.    local isTransmogrified, canTransmogrify, cannotTransmogrifyReason, hasPending, hasUndo, visibleItemID, textureName = GetTransmogrifySlotInfo(slotId)
  8.    if isTransmogrified then
  9.       local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(visibleItemID)
  10.       print (format("Slot %s is transmogrified to %s. %s", slotId, link))
  11.    end
  13. end
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Inspect another's transmog info?

Thread Tools
Display Modes

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