Originally Posted by XAlliedYouthX
Is there a way that I could check the gear another player has I selected around me without just using the built-in "inspect" interface? I know of the function to bring up that window but I have yet to find any other way. What I am looking to do is have it spam my chat window with the gear slot and the corresponding piece of gear.
|
http://www.wowace.com/forums/index.php?topic=13753.0 shows a basic way to get gear information without seeing the inspect screen. Relevant code:
Code:
if CheckInteractDistance(name, 1) then
NotifyInspect(name)
for _,slot in pairs(SLOTS) do
local itemLink = GetInventoryItemLink(name, GetInventorySlotInfo(slot))
if itemLink then
local _, _, itemCode = strfind(itemLink, "(%d+):")
itemCode = tonumber(itemCode)
if not self:ItemRecorded(itemCode, name) then
table.insert(self.db.account.info[name].items, itemCode)
DEFAULT_CHAT_FRAME:AddMessage("Added ".. name .. " slot: ".. slot ..";item ".. itemLink ..";ID: " .. itemCode)
end
else
DEFAULT_CHAT_FRAME:AddMessage(name.."'s slot: "..slot.."; no item")
end
end
DEFAULT_CHAT_FRAME:AddMessage("Scanned "..name)
end
SLOTS is just a table with all of the inventory slot names for iterating through every inventory slot on a character, you can see that in the post. You can then call GetItemInfo on the itemlink for just about all the info you could want.