Jump to content

[patch] creature spell cooldown and spellmod


pasdVn

Recommended Posts

Originally I just wanted to apply spellmods to creature cooldowns in this patch, but I worked out a bit more now, that should improve creature (mostly pet) cooldown handling at all.

The main points:

  • * unified creature and spell cooldown handling, setting cooldown will be done in Spell:: and not in any AI or opcode handlers, for creatures cooldowns will be stored for all directly player-controlled pets/charms, as we need it only there for the pet action bar
    * the original idea: apply spellmods to creature cooldowns, in connection changed the store system for category cooldowns (old system quite strange and not correct, compare to handling inPlayer::PetSpellIntialize)
    * improved global cooldown handling for creatures, that means, that spells without gcd can be casted while gcd is active (from ai as well as via opcode) and also dont trigger the gcd, note that this is still a simplified handling of gcd's, but should be enough for creatures in any case
    * added support for sending cooldownmessage after canceling aura for auras with SPELL_ATTR_DISABLED_WHILE_ACTIVE (e.g. correctly show cooldown after "Prowl" or "Phase Shift" in client)

The patch: http://github.com/pasdVn/mangos/commit/b9e2f87a6814b9535f289767fa9f9995ad2348ea

One thing, that I did not got working is the correct showing of the gcd in your pet actionbar. Currently things are working the following: When you have a spell on autcast, you will see the global cooldown when the casting time is over (not as we are used to it, when you start casting). Strangely, this is also the case on official servers.

If you cast a spell manually, it works the same as for players (gcd starts when yo start to cast the spell), but not on mangos. The gcd starts one time when you click at the button, and a second time, when casting time is over and spell starts to go to target (best to try it with the imp's fire bolt, but you will notice the second gcd also with every instant spell). The first gcd is shown automatically by the client, the second one is somehow caused by SMSG_SPELL_GO packet, that gets builded in Spell::SendSpellGo. In fact this is a minor bug and just eycandy (the client does not check the gcd, it just shows it), but I like the details :)

I tried different things, but don't know much about the package building. Maybe anyone of you has an idea what to change to make the client not show this second cooldown!?

greetings, pasdVn

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...
×
×
  • 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