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:
if unit == "player" then
-- Power spark!
local spark = pp:CreateTexture(nil, "OVERLAY")
spark:SetVertexColor(1, 1, 1, 0.5)
-- 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
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
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
- Fix the 5sr spark from not showing at all if you didn't use the manaticker.
- Fix 5sr spark showing when it wasn't supposed to.
- Less jerky.
- Hide energy ticker when out of combat, at full energy and with no attackable target.
- Hide mana ticker at full mana.
- Mana ticker!
- Much optimization in the OnUpdates
- Smarter energy tick detection.
- Right-to-Left setting