tiny refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-04-26 21:48:57 +02:00
parent 98a702b2fc
commit bab829687e
+1 -1
View File
@@ -370,7 +370,7 @@ function public.item_key(hyperlink)
end
function public.parse_hyperlink(hyperlink)
local _, _, item_id, enchant_id, suffix_id, unique_id, name = strfind(hyperlink, '|Hitem:(%d+):(%d+):(%d+):(%d+)|h[[]([^]]+)[]]|h')
local _, _, item_id, enchant_id, suffix_id, unique_id, name = strfind(hyperlink, '|Hitem:(%d+):(%d+):(%d+):(%d+)|h%[([^]]+)%]|h')
return tonumber(item_id) or 0, tonumber(suffix_id) or 0, tonumber(unique_id) or 0, tonumber(enchant_id) or 0, name
end