Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is some issue regarding the modRate #452

Open
Surarn opened this issue Nov 18, 2024 · 1 comment
Open

There is some issue regarding the modRate #452

Surarn opened this issue Nov 18, 2024 · 1 comment
Assignees
Labels

Comments

@Surarn
Copy link

Surarn commented Nov 18, 2024

Some icons, i think its the ones that display both a buff and the cooldown, gets the modRate set to 0.001
I only found a bandaid fix to it i hope this will point you towards the correct place to fix it.

\Interface\AddOns\OmniCC\core\timer.lua
Row 50 that says "local modRate = cooldown._occ_modRate"
Under that row paste "if modRate < 0.01 then modRate = 1 end"
Save and the time is now displayed correctly. (if the modRate is 0.001 and not something like 0.0013)

Edit: This most heavily affects OmniCD but i've also seen some stuff in WeakAuras get a cooldown of 1 day etc.

@Surarn
Copy link
Author

Surarn commented Nov 19, 2024

Okey, In cooldown.lua, the function Cooldown:Refresh(force), you use both GetCooldownTimes() and GetCooldownDisplayDuration() which the wiki says are both in ms, afterwards you change 2 out of 3 returned variables to sec but then use the unchanged rawDuration to calculate the modRate which causes the issue.

My fix so far is after checking rawDuration > 0 on row 331 simply do rawDuration = rawDuration / 1000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants