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

Fix maul + swipe clearcasting bug #2580

Open
wants to merge 3 commits into
base: development
Choose a base branch
from

Conversation

pepopo978
Copy link

@pepopo978 pepopo978 commented Apr 10, 2024

🍰 Pullrequest

I have very limited vmangos experience so I have no idea if this is a smart way to fix this bug or if it will have other side effects. Just wanted to help out a druid in my guild :)

If you gain clearcasting and then queue maul followed by swipe before maul gets used clearcasting gets consumed and you pay the rage cost for both abilities.

This seems to be happening because Spell:Prepare for maul is consuming the clearcasting charge:

some debug logs I added
ERROR: Spell 9881 current cost 150  (this is Spell::prepare for maul)
ERROR: Checking mod type 108 charges 1 value -100 spellId 16870
ERROR: Spell 9881 new cost 0 (CC got applied but spell not cast yet)
ERROR: ---
ERROR: Spell 9908 current cost 200 (this is Spell::prepare for swipe)
ERROR: Checking mod type 108 charges -1 value -100 spellId 16870
ERROR: mod out of charges
ERROR: Spell 9908 new cost 200
ERROR: ---
ERROR: Spell 9908 current cost 200 (this is Spell::cast for swipe)
ERROR: Checking mod type 108 charges -1 value -100 spellId 16870
ERROR: mod out of charges
ERROR: Spell 9908 new cost 200
ERROR: ---
ERROR: Spell 9881 current cost 150 (this is Spell::cast for maul)
ERROR: Spell 9881 new cost 150 (seems to be when mana actually deducted)
ERROR: ---

To fix I made it so that ApplySpellMod doesn't get called during Spell:Prepare for IsNextMeleeSwingSpell() spells.
Again no idea if this is a smart way to do it or whether there might be other types of delayed spells with similar bugs.

Proof

maul bug
Can see I start with 100 rage and end with 65 (maul 15, swipe 20) and lose clearcasting

Issues

How2Test

  1. Use omen of clarity
  2. switch to bear form
  3. turn on 100% proc cheat + auto to get clearcasting
  4. use maul -> swipe in quick succession right after an auto attack
  5. check that you don't pay the rage cost for swipe and clearcasting is consumed (if you start at 100 rage should end at 85)

Todo / Checklist

  • None

@pepopo978 pepopo978 changed the title Fix maul cc Fix maul + swipe clearcasting bug Apr 10, 2024
@twowTurtReynolds
Copy link

Clearer replication steps:

.mod mainspeed 1000000 on an enemy or just spawn a target dummy that wont hit you and build you rage
.mod mainspeed 1000000 on yourself while in bear form
Attack once so that your swing timer is now on its long cooldown and you are in combat.
Target yourself, then .aura 16870 and then .mod rage 0, target enemy, see both swipe and maul are lit up, then hit maul and then try to hit swipe, and then see the rage error.

@0blu 0blu added the CPP A issue / PR which references CPP code label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CPP A issue / PR which references CPP code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 [Bug] Using Maul + Swipe with clearcasting consumes it without reducing rage cost
3 participants