1. #1

    [API] How can I get the values in spell tooltip ?

    Thanks for reply to my last question. What I want to do is correcting error in Affdots.

    Affdots renew the DOT when duration of DOT is changed and at that time, it updates DOT damage based on players stats(at that time).

    So, Affdots is out of order when player do soul-swap. (soul swap change duration of DOT and affdots renew dot based on that time player stats when

    soul:exhaling)

    ------------------------------------------------------------------------------------------------------------------------------------------------
    I want to get the values in spell tooltip. I used GetSpellDescription() but, it didn't print exact value but just '$d, $t1' things.

    Is there any way to do?

  2. #2
    This is a snippet from an addon I made a long time ago that does what you're asking for.

    Code:
    local tooltip = CreateFrame("GameTooltip", "DebuffTextDebuffScanTooltip", UIParent, "GameTooltipTemplate")
    local tl2 = DebuffTextDebuffScanTooltipTextLeft2
    
    local function GetDebuffText(debuffNum)
    	tooltip:SetOwner(self.main, "ANCHOR_NONE")
    	tooltip:SetUnitDebuff("player", debuffNum)
    	local n = tl2:GetText()
    	tooltip:Hide()
    	return n
    end
    You should be able to figure out the rest from there.
    UI & AddOns expert | Interface & Macros moderator - My work

  3. #3
    Treeston/

    Thanks, I gonna use it.

    However, then, We cannot read tooltip of spell just by calling simple function. right?

  4. #4
    There's no dedicated API for it, no. You'd probably write your own function for easy use if you intend to use it frequently (such as the one I posted above).
    UI & AddOns expert | Interface & Macros moderator - My work

  5. #5
    Quote Originally Posted by Treeston View Post
    There's no dedicated API for it, no. You'd probably write your own function for easy use if you intend to use it frequently (such as the one I posted above).

    Thanks for your reply. I just found "reply with Quote" option lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •