Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(7 Kb)
Download
Updated: 06-11-08 03:20 AM
Addon for:
oUF.
Pictures
File Info
Updated:06-11-08 03:20 AM
Created:unknown
Downloads:9,846
Favorites:79
MD5:
oUF PowerSpark  Popular! (More than 5000 hits)
Version: r76455
by: Snago [More]
This is an addon that adds a power spark to oUF.

The spark behaves differently depending if you're a mana or energy user.

For energy users it will indicate when the next normal energy tick is going to happen. It needs one tick to sync before it's usable and depending on latency it will only be a rough estimate as the real energy ticks seems to fluctuate ~100 ms every now and again.

For mana users it will start moving from left to right when you cast a spell that cost mana, indicating when you're inside the "5 sec rule" and don't have full mana regen. There's also a setting to show normal mana ticks as well (like the energy ticker) between casts.


Only works for one frame. As long as you want the spark on your player frame load order won't matter but to work on another frame you should OptDep oUF_PowerSpark as on load it only looks for a spark on the player frame.

Here's an example:

Code:
	if unit == "player" then
		-- Power spark!
		local spark = pp:CreateTexture(nil, "OVERLAY")
		spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
		spark:SetVertexColor(1, 1, 1, 0.5)
		spark:SetBlendMode("ADD")
		spark:SetHeight(pp:GetHeight()*2)
		spark:SetWidth(pp:GetHeight())
		--  Options and settings
		--spark.rtl = true
		--    Make the spark go from Right To Left instead
		--    Defaults to false
		--spark.manatick = true
		--    Show mana regen ticks outside FSR (like the energy ticker)
		--    Defaults to false
		--spark.highAlpha = 1
		--    What alpha setting to use for the FSR and energy spark
		--    Defaults to spark:GetAlpha()
		--spark.lowAlpha = 0.25
		--    What alpha setting to use for the mana regen ticker
		--    Defaults to highAlpha / 4
		self.Spark = spark
	end
Experiment with Texture, VertexColor, BlendMode, Height and Width to make the spark look like you want!


If you change any settings on the go you need to call

oUF_PowerSpark_ReapplySettings([object])

to make oUF_PowerSpark grab the new settings.
object is the frame to get the spark from. (Defaults to oUF.units["player"])



If you have any suggestions for improvements please post a comment or PM me
r76455:
- Fix the 5sr spark from not showing at all if you didn't use the manaticker.

r76259:
- Fix 5sr spark showing when it wasn't supposed to.
- Less jerky.

r73795:
- Hide energy ticker when out of combat, at full energy and with no attackable target.

r73572:
- Hide mana ticker at full mana.

r73475:
- Mana ticker!
- Much optimization in the OnUpdates

r73214:
- Smarter energy tick detection.
- Right-to-Left setting
Post A Reply Comment Options
Unread 05-09-08, 02:35 PM  
Snago
A Kobold Labourer
 
Snago's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 4
Originally posted by nodq
Nope your are wrong, you still gain mana even if you do NOT cast a spell... every 5 Seconds, while in Combat! Kinda obvisious, or not? Why do you think is that, that other 5 Second rule Addons work like this? Because you are the only one who understands the 5 Second Rule?
I'm sorry but you're wrong again. Read the link I posted.
Mana regeneration ticks, like energy, every 2 seconds (even the mana gained from items that give "mana per 5 seconds"). After you cast a spell though your mana regen is interrupted for 5 seconds. This is called "the 5 second rule".
But the mana spark isn't meant to show when you get the next mana tick like the energy ticker is (I thought it was of no importance since the gain is so small per tick compared to energy ) it's meant to show you when your spirit based regen is interrupted after casting.

Due to popular demand, however, I'm implementing the feature to show mana ticks. You'll see the current five second rule indicator after a spellcast and when you're back to normal regen it'll continue to tick, like the energy ticker, every 2 seconds.
The mana ticker will be configurable with different alpha on the spark for the FSR indicator and the ticker.
Coming soon™
Snago is offline Report comment to moderator  
Reply With Quote
Unread 05-09-08, 01:46 PM  
nodq
A Kobold Labourer
 
nodq's Avatar

Forum posts: 0
File comments: 105
Uploads: 0
Originally posted by Snago
Wrong. You have normal spirit based mana regen while in combat except for 5 seconds after you cast a spell that cost mana.

WoWWiki: Formulas:Mana Regen - Five Second Rule

Nope your are wrong, you still gain mana even if you do NOT cast a spell... every 5 Seconds, while in Combat! Kinda obvisious, or not? Why do you think is that, that other 5 Second rule Addons work like this? Because you are the only one who understands the 5 Second Rule?
Last edited by nodq : 05-09-08 at 01:50 PM.
nodq is offline Report comment to moderator  
Reply With Quote
Unread 05-08-08, 10:08 AM  
Snago
A Kobold Labourer
 
Snago's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 4
Originally posted by nodq
Good Addon, but.. if in Combat, it does not show the 5 second rule timer on manabar, it just shows up after casting a Spell.

5 Second rule counts all the time, if in Combat, not only if you cast a Spell / after casting a Spell.
Wrong. You have normal spirit based mana regen while in combat except for 5 seconds after you cast a spell that cost mana.

WoWWiki: Formulas:Mana Regen - Five Second Rule
Snago is offline Report comment to moderator  
Reply With Quote
Unread 05-08-08, 09:50 AM  
nodq
A Kobold Labourer
 
nodq's Avatar

Forum posts: 0
File comments: 105
Uploads: 0
Good Addon, but.. if in Combat, it does not show the 5 second rule timer on manabar, it just shows up after casting a Spell.

5 Second rule counts all the time, if in Combat, not only if you cast a Spell / after casting a Spell.



greets
Last edited by nodq : 05-08-08 at 09:51 AM.
nodq is offline Report comment to moderator  
Reply With Quote
Unread 05-08-08, 06:57 AM  
Snago
A Kobold Labourer
 
Snago's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 10
Uploads: 4
Originally posted by ganders
One little thing I'd like to point out (that I had to learn the hard way on my spark ) is that because of "odd ticks" you can't use if power == lastPower + 20, as it won't detect it when you're energy ticks for 21 or something weird like that.

I had to use if energy >= lastEnergy + 20 and energy < lastEnergy + 25.

Also you may want to add + 40 in there too for Adrenaline Rush.
Yes, it will ignore odd ticks, but that's only for syncing. It will tick continuously every 2 seconds regardless and as long as you've had at least one tick for exactly 20 energy it will be pretty well synced anyway. It was a choice I made since I didn't want to, for example, reset the timer if you proc Relentless Strikes and Combat Potency at the same time and only get one UNIT_ENERGY (25 + 15 = 40, not to be confused with a normal tick during AR )

There's room for improvement and I have a few ideas I want to test. But it works "good enough" for now
Snago is offline Report comment to moderator  
Reply With Quote
Unread 05-08-08, 06:29 AM  
ganders
A Flamescale Wyrmkin
AddOn Author - Click to view AddOns

Forum posts: 131
File comments: 59
Uploads: 11
Hi,

One little thing I'd like to point out (that I had to learn the hard way on my spark ) is that because of "odd ticks" you can't use if power == lastPower + 20, as it won't detect it when you're energy ticks for 21 or something weird like that.

I had to use if energy >= lastEnergy + 20 and energy < lastEnergy + 25.

Also you may want to add + 40 in there too for Adrenaline Rush.

Good addon, only a matter of time before someone replaced mine.
ganders is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: