Лови получение "времени весения"

PHP код:
local GetDuration;
do
    
local m_scaner CreateFrame("GameTooltip""ff%ds23e2cx"nil"GameTooltipTemplate")
    
m_scaner:SetOwner(WorldFrame"ANCHOR_NONE")
    
local m_texttonumberselect ""tonumberselect
    GetDuration 
= function(spellID)
        
m_scaner:SetSpellByID(spellID)
        for 
1m_scaner:GetNumRegions() do
            
local region select(im_scaner:GetRegions())
            if 
region and region:GetObjectType() == "FontString" then
                m_text 
region:GetText()
                if 
m_text then
                    m_text 
m_text:match("%d+ сек.")
                    if 
m_text then
                        
return tonumber(m_text:match("%d+"))
                    
end
                end
            end
        end
    end
end