Files
wow-weakauras/WeakAuras/Projects/_Big ass hammer thing.lua

29 lines
975 B
Lua

--COMBAT_LOG_EVENT_UNFILTERED
function()
myTooltip = CreateFrame("GameTooltip", "MyTooltip", UIParent, "GameTooltipTemplate")
if aura_env.owner == 0 then
myTooltip:SetOwner(UIParent, "ANCHOR_NONE")
myTooltip:SetSpellByID(213757)
aura_env.owner = 1
end
local text = _G["MyTooltipTextLeft4"]:GetText()
local time = text:match("after (%d%.?%d*) sec")
if not time then
text = _G["MyTooltipTextLeft5"]:GetText()
time = text:match("after (%d%.?%d*) sec")
end
if time then
time = time + GetTime()
local judgtime = select(7, UnitDebuff("target", "Judgment", _, "PLAYER")) or 0
local gcds, gcdd = GetSpellCooldown(203539) or 0, 0
if gcdd > 0 then aura_env.gcd = gcdd end
if gcds > 0 then time = time + (gcdd - (GetTime() - gcds)) end
if judgtime == 0 and aura_env.gcd > 0 then judgtime = GetTime() + aura_env.gcd end
print(time, judgtime)
if judgtime < time then return true else return false end
end
end
--INIT
aura_env.gcd = 0
aura_env.owner = 0