Лови получение "времени весения"
PHP код:
local GetDuration;
do
local m_scaner = CreateFrame("GameTooltip", "ff%ds23e2cx", nil, "GameTooltipTemplate")
m_scaner:SetOwner(WorldFrame, "ANCHOR_NONE")
local m_text, tonumber, select = "", tonumber, select
GetDuration = function(spellID)
m_scaner:SetSpellByID(spellID)
for i = 1, m_scaner:GetNumRegions() do
local region = select(i, m_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