Skip to content

Commit

Permalink
Fix IsOpenable itemLink support
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim committed Oct 12, 2020
1 parent 8223c57 commit 79f030b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions LibProcessable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ posesses.
* `professionItem`: The itemID for the unlocking item _(number)_
--]]
function lib:IsOpenableProfession(itemID)
assert(tonumber(itemID), 'itemID needs to be a number or convertable to a number')
itemID = tonumber(itemID)
if(type(itemID) == 'string') then
assert(string.match(itemID, 'item:(%d+):') or tonumber(itemID), 'item must be an item ID or item Link')
itemID = (tonumber(itemID)) or (GetItemInfoFromHyperlink(itemID))
end

local pickLevel = lib.containers[itemID]
if(not pickLevel) then
Expand Down

0 comments on commit 79f030b

Please sign in to comment.