Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Runes:UpdateUsable(frame, event, id, usable)
- if( not id ) then
- self:UpdateColors(frame)
- return
- elseif( not frame.runeBar.runes[id] ) then
- return
- end
- local rune = frame.runeBar.runes[id]
- local startTime, cooldown, cooled = GetRuneCooldown(id)
- if( not cooled and cooled ~= nil) then
- rune.endTime = startTime + cooldown
- rune:SetMinMaxValues(startTime, rune.endTime)
- rune:SetValue(GetTime())
- rune:SetAlpha(0.40)
- rune:SetScript("OnUpdate", runeMonitor)
- elseif (cooled == nil) then
- -- do nothing
- else
- rune:SetMinMaxValues(0, 1)
- rune:SetValue(1)
- rune:SetAlpha(1.0)
- rune:SetScript("OnUpdate", nil)
- rune.endTime = nil
- end
- if( rune.fontString ) then
- rune.fontString:UpdateTags()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement