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

Wrong cooldown info after PLAYER_ENTERING_WORLD or /reload #47

Open
izyspania opened this issue Dec 23, 2023 · 0 comments
Open

Wrong cooldown info after PLAYER_ENTERING_WORLD or /reload #47

izyspania opened this issue Dec 23, 2023 · 0 comments

Comments

@izyspania
Copy link

izyspania commented Dec 23, 2023

It seems that the addon is sending wrong cooldown info after a /reload or when changing zone and stuff , the problem seems to be with AceComm-3.0 , i think because of the ChatThrottleLib , it delays the sending of cooldown updates from 3 to 8 seconds so all the cooldowns are 3 to 8 seconds behind, tested without the AceComm-3.0 and it works ok.

The problem with is if you /reload in the middle of a Arena/Dung/Raid etc .. .or you get a crash and you have to log in again you will send delayed cooldown data to everybody.

What i was thinking is to use GetServerTime() (seems to work fine now) to keep the cooldowns data in sync, for compatibility reasons an workaround could be something like:

      local serverTime = GetServerTime()
      local data = data .. ",Q," .. serverTime
...

for cooldowns sending part, doing something like this seems not to interfere with the actual code and we can do, for ex, something like this for the receiving part:

            local localServerTime = GetServerTime()
            local timeLeft = start + duration - GetTime() - (localServerTime  - serverTime )
...

Ofc , ideal would be to make everything to use GetServerTime() instead of GetTime() or maybe a GetTime() sync before cooldown updates ( i like the GetServerTime() option more) .

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

No branches or pull requests

1 participant