Commit 87dc77ef authored by Merathilis's avatar Merathilis

Updated GetItemLevel function.

parent 19fe8976
......@@ -201,9 +201,12 @@ function MER:GetItemLevel(link, arg1, arg2, fullScan)
gems, essences = MER:InspectItemTextures(nil, true)
for i = 1, tip:NumLines() do
local text = _G[tip:GetName().."TextLeft"..i]:GetText() or ""
iLvl, enchantText = MER:InspectItemInfo(text, iLvl, enchantText)
if enchantText then break end
local line = _G[tip:GetName().."TextLeft"..i]
if line then
local text = line:GetText() or ""
iLvl, enchantText = MER:InspectItemInfo(text, iLvl, enchantText)
if enchantText then break end
end
end
return iLvl, enchantText, gems, essences
......@@ -220,12 +223,15 @@ function MER:GetItemLevel(link, arg1, arg2, fullScan)
end
for i = 2, 5 do
local text = _G[tip:GetName().."TextLeft"..i]:GetText() or ""
local found = strfind(text, itemLevelString)
if found then
local level = strmatch(text, "(%d+)%)?$")
iLvlDB[link] = tonumber(level)
break
local line = _G[tip:GetName().."TextLeft"..i]
if line then
local text = line:GetText() or ""
local found = strfind(text, itemLevelString)
if found then
local level = strmatch(text, "(%d+)%)?$")
iLvlDB[link] = tonumber(level)
break
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment