tullamods / OmniCC

Cooldown count for everything
https://tullamods.com/omnicc
MIT License
99 stars 21 forks source link

Handle modRate (also called timeMod) #385

Open mrbuds opened 2 years ago

mrbuds commented 2 years ago

Is your feature request related to a problem? Please describe.

Since Nighthold raid blizzard made it possible for spell cooldowns and auras to be slowed or accelerated thru modRate parameter https://wowpedia.fandom.com/wiki/API_UnitAura 15th return https://wowpedia.fandom.com/wiki/API_GetSpellCooldown 4th return

Blizzard action buttons handle it in Cooldown.lua CooldownFrameTemplate self:SetCooldown(start, duration, modRate)

https://github.com/Gethe/wow-ui-source/blob/49fe59cf55d5998693b780b29dd5b8ca8fbc1242/Interface/FrameXML/Cooldown.lua#L5

progress shown is simply calculated like this remaining = (expirationTime - GetTime()) / modRate

Describe the solution you'd like

Handle the time modifier like Blizzard does

Additional context

@infusonwow found that OmniCC didn't handle it while working on it's support in WeakAuras https://github.com/WeakAuras/WeakAuras2/pull/3548

For testing we used for testing on cooldown Holy Paladin https://www.wowhead.com/spell=216331/avenging-crusader with Jugement And for auras 2nd boss of nighthold (Legion) in P2 slow or accelerate time https://www.wowhead.com/spell=207011/speed-slow https://www.wowhead.com/spell=207013/speed-fast

Tuller commented 2 years ago

mod rate still doesn’t impact the actual duration of the cooldown, correct? I lean towards thinking that OmniCC should present the real time remaining.

InfusOnWoW commented 2 years ago

Yes it basically makes the timer run faster for the time of the cdr.

For example, a cooldown of 10s, that on 8s gets a cdr of 100%, which is removed after 2 real seconds. (Those are numbers choosen for exposition.)

Displays as (one second tick rate) with the default blizzard display: 10s 9s 8s (cdr starts) 6s 4s (cdr ends) 3s 2s 1s

So the display is smooth, the seconds just tick faster while the cdr is active.

Whereas with omnicc that looks like this: 10s 9s 8.1s => 4s (cdr starts) 3s 2s (cdr ends) => 3.9 3s 2s 1s

Tuller commented 2 years ago

That’s a bit more annoying then, I had assumed Blizzard was running at a single mod rate for the duration of the cooldown.

InfusOnWoW commented 2 years ago

Well the system is very flexible, and there are multiple different mod rates in the game.

E.g. The current m+ 10 affix, which affects all spell cooldowns by 200% for 10s. Summer of Autom, a Covenant ability, that affects all spells by 30% for 30s. Benelovent Fae Guardians, a Covenant ability, that affects a "major cooldown" by 100% for 20s. Thunderchrage, a pvp talent for shamans that affects all spell cooldown by 30% for 10s. Avenging Crusader which only affects two spells by 30% for 20s.

I'm pretty sure some people actually like how it behaves atm, because sometimes only a few selected spells are affected and it is strange that different abilities tick down at different rates.

Tuller commented 2 years ago

I do actually handle this in tullaCTC (https://github.com/Tuller/tullaCTC/releases/tag/v1.2.0). That’s because that addon just enhances the built in cooldown text a bit.