Jump to content

[10526][dev] Server side GCD check


darkstalker

Recommended Posts

This patch implements server side global cooldown checking using data provided in Spell.dbc (StartRecoveryCategory, StartRecoveryTime), player stats (haste rating) and latency to provide a more accurate result. Testing and feedback needed ;>

patch for 10432:

v1: http://paste2.org/p/974537

v2: http://paste2.org/p/980906

v3: http://paste2.org/p/995984

Changelog:

v1: Original version

v2: Use time difference against last casted spell instead of future cooldown time. That way the latency variable gets "cancelled off", providing more accurate and fail-safe result

v3: implemented gcd cancel on interrupted cast (as displayed on client)

Link to comment
Share on other sites

as you can see in Creature:

   if(m_GlobalCooldown <= diff)
       m_GlobalCooldown = 0;
   else
       m_GlobalCooldown -= diff;

Why didn''t you move this simple code to Unit, and changed it, that GCD takes latency and haste into account? (latency - perhaps there is a simple "guesswork" like 80% enough to handle this gcd check accurate enough ;)

Link to comment
Share on other sites

That kind of timers require periodic update to work (rougly 100ms), so its extra work to do. I fetch the time only when i need it, not on every world update tick.

And its not just one gcd timer, its actually one per category. That is what makes some abilities independant of the gcd or have a special gcd trait.

Link to comment
Share on other sites

Discovered a "bug" related to this. It blocks non-triggered casts caused by other spells effects, like Chimera Shot (53209) trigggers a 1500 ms gcd in category 133, then the sting effect gets blocked by gcd check (like Spell 53353: Chimera Shot - Serpent) cause it has the same category 133. Setting the sting effect as triggered fixes it, but maybe should add an extra check to identify spells casted from client side (as opposed to casts from spell handlers). It could be just a dbc "redundant data bug" in this case.

Link to comment
Share on other sites

  • 2 weeks later...
I think such check must be implemented in Unit class (to support case of charmed creatures too).

It still player client cast. And different from creature gcd way work.

I prepare currently modifed patch with include controlled unit cases

[added]

This is version with extended to controlled units:

http://gist.github.com/593512

It not deep tested (i will do some hours later). But if someone test for player and pets/etc will be nice.

Link to comment
Share on other sites

hmm, maybe. Also my version have one not nice problem: if player have 2 controlled pets as possible by some spells (but not yet implemented in mangos) then its will share global cooldown. I select this version originally just becase see that only pets have currently global cooldown and not do research spells.

If global cooldown spells only exist for player/pet cases thne not reason have data in Unit.

I think we in this case can have same structure in charmed data (this will affect pets/charmed cases/controlled players) and in player as currently.

As you see i move some your code to spell for speedup and this can hide this 2 way work in 2 spell functions.

Ofc, if some raw creature spells have global cooldown data then no reason not have its just in Unit.

I will do look at spell.

Any way you implement main functionality of gcd system in right way as i look and only need select proper implementation details :)

Link to comment
Share on other sites

GCD must be limited to between 1 second and 1.5 seconds, no matter what haste ratings/aura effects are applied. This can be tested from client-side only, because client calculated GCD independently from server based only on haste rating and auras.

Based on my understanding, GCD should be limited to between 1000ms and 1500ms:

With >>100% haste rating, I saw GCD only decrease to 1.0s, so for this part, patch as given is incorrect. Cap at bottom of 1.0s does not happen just for haste rating either: see comments at http://www.wowhead.com/spell=18288.

Haste debuffs (like http://www.wowhead.com/spell=72297) increase GCD, but not beyond 1.5s. When you receive this buff with 0 other haste mods, GCD remains 1.5s. When you decrease GCD to 1.0s via only haste rating at haste rating cap, then apply this debuff, GCD does increase again to 1.5s.

Link to comment
Share on other sites

I test spell http://www.wowhead.com/spell=30283 that single player directly learned form having no std. gcd time.

And not see that this spell gcd affected any speedup/slowdown casting mods. For example ( http://www.wowhead.com/spell=29310 ) not affect client show gcd for this spell but not for other spells.

So i think all non std. gdc values not affected any mods. At least this good expected way work by tests. If some different results will be found we can fgix this local problem.

Link to comment
Share on other sites

It is an epic fail for the hunter MM, SV, the autoshot is not working well, it is generating a gcd and you cant do the sequence for example: chimera shot + silencing shot + another thing, it says skill not able, it means the burst in MM has dead, the second thing is when you run and stop the autoshot is not working well also, you have to wait for a while to shot, this is a big nerf for the hunter in general.

Link to comment
Share on other sites

spell 75 (auto-shot) has no gcd (StartRecoveryCategory = 0, StartRecoveryTime = 0)

spell 53209 (chimera shot) has the standard gcd (StartRecoveryCategory = 133, StartRecoveryTime = 1500)

spell 34490 (silencing shot) is again with no gcd (both values 0), so shouldn't interfere with chimera

That "another thing" you say must be a spell with no gcd or in a different category to be able to cast it succefully on a single gcd. So maybe you should say "MM burst exploit is dead"?

Link to comment
Share on other sites

spell 75 (auto-shot) has no gcd (StartRecoveryCategory = 0, StartRecoveryTime = 0)

spell 53209 (chimera shot) has the standard gcd (StartRecoveryCategory = 133, StartRecoveryTime = 1500)

spell 34490 (silencing shot) is again with no gcd (both values 0), so shouldn't interfere with chimera

That "another thing" you say must be a spell with no gcd or in a different category to be able to cast it succefully on a single gcd. So maybe you should say "MM burst exploit is dead"?

First at all, thanks for answer quickly.

I dont agree, try this: run with the hunter and stop, the autoshot will not shot inmediately, I think it has 0.1-0.2s at the begin.

Other thing, if you use for example chimera and wait 1s and you use silincing shot and after that you spam the key for the next skill, it will block the next skill and you will need to wait a short time for use the skill that you want again. I dont know if you understand me.

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use