Yeah, you have to tooltip parse. I did it a few times.
Let me dig out my code.
---------- Post added 2011-07-04 at 04:06 PM ----------
Code:
local scanTip = CreateFrame("GameTooltip", "CBMTSpellLoggerSpellScanTooltip", UIParent, "GameTooltipTemplate")
local scanLine
local function GetSpellTooltipText(spellID)
scanTip:SetOwner(UIParent, "ANCHOR_NONE")
scanTip:SetSpellByID(spellID)
scanLine = CBMTSpellLoggerSpellScanTooltipTextLeft3
local t = scanLine:GetText()
if (not t) then return end
if (t == SPELL_CAST_TIME_INSTANT_NO_MANA) or (t:find(SPELL_CAST_TIME_SEC:gsub("%%%.3g", "%d+"))) then
scanLine = CBMTSpellLoggerSpellScanTooltipTextLeft4
end
local r=scanLine:GetText():match("[ ]*(.+)")
scanTip:Hide()
return r
end
You can adapt it easily I guess.