Jump to content

item not detected


Recommended Posts

https://github.com/MOUZU/Blizzard-WoW-Interface/blob/d162a4c0d198a4381b5b6573d975635ed7316702/1.12.1/FrameXML/ContainerFrame.lua#L52

Not tested, but try:

local itemIdSearch = 3467;
local bag = KEYRING_CONTAINER;
for slot = 1,MAX_CONTAINER_ITEMS do
	local itemLink = GetContainerItemLink(bag,slot);
	local _, itemCount = GetContainerItemInfo(bag,slot);
	if itemLink and itemCount then
		local _,_,itemId = string.find(itemLink, '.*|Hitem:(%d+):.*');
		if itemId and tonumber(itemId) == itemIdSearch then 
			print("Key found");
			return
		end
	end
end
print("Key no found");

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...