--- spell.lua.orig 2009-01-30 23:46:31.117375000 -0500 +++ spell.lua 2009-02-01 13:40:44.820500000 -0500 @@ -33,15 +33,20 @@ local spellTooltip local function CreateSpellTooltip() local tt = CreateFrame"GameTooltip" - local lefts = {} + local lefts, rights = {}, {} for i = 1, 20 do local left, right = tt:CreateFontString(), tt:CreateFontString() left:SetFontObject(GameFontNormal) right:SetFontObject(GameFontNormal) tt:AddFontStrings(left, right) lefts[i] = left + -- Only the first few lines might also have right-hand components. + -- Doing this unconditionally would simplify the loop in __index but + -- would also waste memory. + rights[i] = (i<7) and right or nil end tt.lefts = lefts + tt.rights = rights function tt:SetSpell(spell) if self.spell ~= spell then self:SetOwner(TalentedFrame) @@ -54,7 +59,15 @@ __index = function (self, key) if not key then return "" end tt:SetSpell(key) - local value = tt.lefts[tt:NumLines()]:GetText() + local value = {} + for i=2,tt:NumLines() do + local line = {left=tt.lefts[i]:GetText()} + if tt.rights[i] then + local maybe_right = tt.rights[i]:GetText() + if maybe_right then line.right = maybe_right end + end + table.insert(value, line) + end self[key] = value return value end,