Created
August 3, 2014 00:45
-
-
Save nefftd/ea13a77c9d3908650d7d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- use this lib: http://www.curse.com/addons/wow/utf8 | |
-- defaults to ASCII-only lower if not present | |
local lower = string.utf8lower or string.lower | |
local function fullIDbyname(itemname) | |
itemname = lower(itemname) | |
for bag = 0,4 do | |
for slot = 1,GetContainerNumSlots(bag) do | |
if lower(GetContainerItemLink(bag,slot)) == itemname then | |
return bag,slot | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment