View Single Post
11-23-22, 02:30 PM   #2
fatrog
A Fallenroot Satyr
Join Date: Nov 2022
Posts: 21
I got myself through it

here's how I did it

Code:
_G["GameTooltip"]:HookScript("onShow",function(this)

    local cooldownMS, gcdMS, spellName
    local spellName, spellID = this:GetSpell()
    local itemName, ItemLink = this:GetItem()
    if spellID ~= nil then
       cooldownMS, gcdMS = GetSpellBaseCooldown(spellID)
       print("ID:"..gcdMS)
    elseif itemName ~= nil then
       spellName, spellID = GetItemSpell(ItemLink)
       cooldownMS, gcdMS = GetSpellBaseCooldown(spellID)
       print("spell from item link:"..gcdMS)
    else
       spellName = _G[this:GetName().."TextLeft"..1]:GetText()
       _,_,_,_,_,_,spellID = GetSpellInfo(spellName)
       cooldownMS, gcdMS = GetSpellBaseCooldown(spellID)
       print("spell with no ID:"..gcdMS)
    end
end)
  Reply With Quote