cleanup: use plain string.find where possible

This commit is contained in:
shagu
2017-01-02 00:41:47 +01:00
parent 2f22f9e4a2
commit cc0c086ca2
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -305,7 +305,7 @@ pfUI:RegisterModule("panel", function ()
local tmpText = getglobal("repairToolTipTextLeft"..i)
if (tmpText ~= nil) and (tmpText:GetText()) then
local searchstr = string.gsub(DURABILITY_TEMPLATE, "%%[^%s]+", "(.+)")
local _, _, lval, rval = string.find(tmpText:GetText(), searchstr)
local _, _, lval, rval = string.find(tmpText:GetText(), searchstr, 1)
if (lval and rval) then
repPercent = math.floor(lval / rval * 100)
break