Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(2 Kb)
Download
Updated: 03-06-09 02:29 PM
Pictures
File Info
Updated:03-06-09 02:29 PM
Created:03-06-09 02:29 PM
Downloads:2,007
Favorites:15
MD5:
oUF GCD global cooldown timer for oUF
Version: 1.0
by: Exactly [More]
This is a global cooldown timer for oUF.

Currently, it only moves the spark horizontally from left to right, centered vertically on its parent. I think that's what most people want. I will probably add more options and features later.

The addon requires a reference spell for accurate timing. You may set the spell name in your layout if it's not already included in the reference spell list at the top of the addon. Ideally, the reference spell list will include all of the spells that make good cooldown timer references. That will make the addon self-configuring and useful for multiple characters. You can add more to the list if you like. I've only added a handful so far, but I will add more. Let me know which spells belong there and I'll add them in future versions.

Code:
--[[
oUF_GCD - Global Cooldown timer for oUF
by Exactly
   
  
Example
  
    self.GCD = CreateFrame('Frame', nil, self)
    self.GCD:SetPoint('BOTTOMLEFT', self.Title, 'BOTTOMLEFT')
    self.GCD:SetPoint('BOTTOMRIGHT', self.Title, 'BOTTOMRIGHT')
    self.GCD:SetHeight(2)

    self.GCD.Spark = self.GCD:CreateTexture(nil, "OVERLAY")
    self.GCD.Spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
    self.GCD.Spark:SetBlendMode("ADD")
    self.GCD.Spark:SetHeight(10)
    self.GCD.Spark:SetWidth(10)
    self.GCD.Spark:SetPoint('BOTTOMLEFT', self.Title, 'BOTTOMLEFT', -5, -5)
    
    self.GCD.ReferenceSpellName = '***SEE BELOW***'
    
You have to set a reference spell. You should choose one that has no cooldown 
 except the global cooldown, and that cant be interrupted or silenced -- and
 it has to be one that's in your spellbook.
   
Alternatively, you can add spells to the "referenceSpells" block at the top of 
this file and the addon will automatically choose the first one that you know. I'll add 
more spells to the list as I figure out what they are. For now, you can just add more 
spells to the list -- it doesnt matter where. 

Enjoy!
--]]
Optional Files (0)


Post A Reply Comment Options
Unread 06-19-09, 04:36 PM  
leizeQ
A Murloc Raider
 
leizeQ's Avatar
AddOn Compiler - Click to view compilations

Forum posts: 8
File comments: 44
Uploads: 1
for me its working only for the spell set as referenceSpell. do i have to set all spell to the table i wanna use or ?

thx
leizeQ is offline Report comment to moderator  
Reply With Quote
Unread 05-02-09, 03:11 AM  
kewlbear77
A Kobold Labourer

Forum posts: 1
File comments: 16
Uploads: 0
3.1X

Is this mod still usable on 3.1X client version? Well I'll give it a shot.. Great mod and two thumbs up~~~!!!
kewlbear77 is offline Report comment to moderator  
Reply With Quote
Unread 03-15-09, 12:41 PM  
Jhodas
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Hey there.
I'm using OUf Freeb and I want to integrate this mod.
Problem is, I paste the code into OUf_Freeb.lua and I cant seem to get the spark to attach itself to the player frame, its just runs along the bottom of the screen.

I'd like to know exactly where I need to paste the code and what I need to change to make the player frame the parent. Also, I'd like to shift the spark to the top of the frame.

Great addon tho, it will complete my UI! :-D
Jhodas is offline Report comment to moderator  
Reply With Quote
Unread 03-12-09, 01:03 PM  
Thizzelle
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 29
Uploads: 1
same problem with gcd not moving

im using modified coree layout and the gcd spark isnt moving just stays on the left side
Thizzelle is offline Report comment to moderator  
Reply With Quote
Unread 03-07-09, 05:45 AM  
Oakayam
Premium Member
 
Oakayam's Avatar
Premium Member

Forum posts: 40
File comments: 136
Uploads: 0
Originally posted by Exactly

I would make sure that you have the variable "width" defined. Otherwise, it looks right.
The 'width' is defined at the beginning of the layout and used through out. I changed it to a number to make sure. I disabled other plug-ins to see if there is a conflict.. no idea why it doesn't work. I use modified version of oUF coree.
__________________
Oakayam is offline Report comment to moderator  
Reply With Quote
Unread 03-07-09, 12:52 AM  
Exactly
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 3
Uploads: 1
Hmmm. I pasted your code into my layout and it worked fine. I only had to change the width and the backdrop because you have them set in variables. I also had to change the spell because I don't know that one.

I would make sure that you have the variable "width" defined. Otherwise, it looks right.
Exactly is offline Report comment to moderator  
Reply With Quote
Unread 03-06-09, 09:05 PM  
Oakayam
Premium Member
 
Oakayam's Avatar
Premium Member

Forum posts: 40
File comments: 136
Uploads: 0
Originally posted by Exactly
Yes. The addon searches your spellbook for a match, so that should work. Can you post the part of your layout that creates the timer?
Code:
if(unit == 'player') then
        self.GCD = CreateFrame('Frame', nil, self)
        self.GCD:SetPoint('TOPLEFT', self.Power, 'BOTTOMLEFT', 0 , 32)
        self.GCD:SetWidth(width)
	self.GCD:SetBackdrop(backdrop)
	self.GCD:SetBackdropColor(0.2, 0.2, 0.2)
        self.GCD:SetAlpha(0.4)
        self.GCD:SetHeight(3)

        self.GCD.Spark = self.Power:CreateTexture(nil, "OVERLAY")
        self.GCD.Spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
        self.GCD.Spark:SetBlendMode("ADD")
        self.GCD.Spark:SetHeight(10)
        self.GCD.Spark:SetWidth(10)
        self.GCD.Spark:SetPoint('BOTTOMLEFT', self.Power, 'BOTTOMLEFT', -4, 26)
    
        self.GCD.ReferenceSpellName = 'Cure Poison'
end
I've pretty much copied you.

The frame and the spark are created but the sparky hangs out in its point of attachment rather then moving along the frame.

edit:

I tried different spells. Lifebloom, Rejuvenation, Cure Poison, etc.
__________________
Last edited by Oakayam : 03-06-09 at 09:10 PM.
Oakayam is offline Report comment to moderator  
Reply With Quote
Unread 03-06-09, 06:14 PM  
Exactly
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 3
Uploads: 1
Re: reference spells

Originally posted by Wraanger
MAy be it would be more wise to use spell IDs instead of names to make it locale independant ?
That's a good idea.
Exactly is offline Report comment to moderator  
Reply With Quote
Unread 03-06-09, 06:13 PM  
Exactly
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 3
Uploads: 1
Originally posted by Oakayam
Is there any format i need to follow when adding a spell? From your describtion I was under impression I can just use the spell name as it appears in the spellbook , like :

'Lifebloom'

however the spark doesn't move at all.
Yes. The addon searches your spellbook for a match, so that should work. Can you post the part of your layout that creates the timer?
Exactly is offline Report comment to moderator  
Reply With Quote
Unread 03-06-09, 06:06 PM  
Oakayam
Premium Member
 
Oakayam's Avatar
Premium Member

Forum posts: 40
File comments: 136
Uploads: 0
Is there any format i need to follow when adding a spell? From your describtion I was under impression I can just use the spell name as it appears in the spellbook , like :

'Lifebloom'

however the spark doesn't move at all.
__________________
Oakayam is offline Report comment to moderator  
Reply With Quote
Unread 03-06-09, 05:50 PM  
Wraanger
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 12
File comments: 24
Uploads: 2
reference spells

MAy be it would be more wise to use spell IDs instead of names to make it locale independant ?
Wraanger is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: