WoWInterface SVN NeedyGreedy

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 25 to Rev 26
    Reverse comparison

Rev 25 → Rev 26

NeedyGreedy.lua
610,7 → 610,7
 
function NeedyGreedy:RollText(number)
if number then
return " " .. number
return " - " .. number
else
return ""
end
660,9 → 660,17
end
end
 
local CONVERTED_FORMATS = {}
function NeedyGreedy:unformat(fmt, msg)
local pattern = string.gsub(string.gsub(fmt, "(%%s)", "(.+)"), "(%%d)", "(.+)")
local _, _, a1, a2, a3, a4 = string.find(msg, pattern)
local pattern, captureIndices
if CONVERTED_FORMATS[fmt] then
pattern, captureIndices = unpack(CONVERTED_FORMATS[fmt])
else
pattern, captureIndices = patternFromFormat(fmt)
CONVERTED_FORMATS[fmt] = {pattern, captureIndices}
end
 
local _, _, a1, a2, a3, a4 = superFind(msg, pattern, captureIndices)
return a1, a2, a3, a4
end