Thread Tools Display Modes
04-16-08, 02:50 PM   #1
XAlliedYouthX
A Kobold Labourer
Join Date: Apr 2008
Posts: 1
Viewing players gear

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.
  Reply With Quote
06-18-08, 05:11 PM   #2
lifetapt
A Murloc Raider
 
lifetapt's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 6
You might want to take a look at the code for InventoryOnPar. Whenever you target a friendly player, it will retrieve their gear, score it and save it to its database, with no user interaction required.
http://files.wowace.com/InventoryOnP...ntoryOnPar.zip
  Reply With Quote
06-21-08, 04:41 AM   #3
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Originally Posted by XAlliedYouthX View Post
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.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Viewing players gear


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