View Single Post
10-15-15, 11:21 PM   #1
Nikita S. Doroshenko
A Cyclonian
 
Nikita S. Doroshenko's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2015
Posts: 45
Can we get Global Cooldown time info for our spells/abilitys/itmes?

I would like to enhance spells, abilitys and itmes tooltips with information about their Global Cooldown (GC), and get GC time (if i'm right GC depends of haste and for monks GC time cut, so it's not static value).
And then I would like to add GC countdown timer near Player Portrait and if possible even on Enemy Player Target Portrait (but that part could be tricky and not accurate because of ping and unknown haste).

Accordion to this article's comments: http://www.wowhead.com/spell=61304/global-cooldown we can get GC info right after we use an ability, with this code for example:
Lua Code:
  1. /use Ice Barrier
  2. /run local _,gc = GetSpellCooldown(61304); print(gc)
Sure i can make table:
Lua Code:
  1. spellsWithGC = {72183 = {affectedByHaste = true}, 12831 = {affectedByHaste = true}, 90128, 89218}
  2. itemsWithGC = {82993, 29101}
And update this tables each time used uses new ability, but i think it's an ineffective way to do this, and we have to recheck this tables each time Blizzard updates their game, so we get actual updated info.

As well, there are some debuffs that makes your GC time, very long, and i would like to dynamically update tooltips as well.

Could you please give my your thoughts, and advises how I can make it most effective, stable and optimized, and how can i build such a table (how can I run GetSpellCooldown(index) right after spell/ability/item cast with correct index and add it's data to my table)?

Last edited by Nikita S. Doroshenko : 10-16-15 at 12:13 AM.
  Reply With Quote