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

Spell: Fix Runestrike #593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

insunaa
Copy link
Contributor

@insunaa insunaa commented Mar 4, 2025

🍰 Pullrequest

This PR fixes multiple issues with Runestrike:
RuneStrike has a serverside enablement Aura similar to the warlock's demonic circle. This aura is currently being triggered by 56816 whenever the DK dodges or parries an attack, but the aura is never removed even if the duration goes to 0 because the aura is passive, also the aura stacks infinitely which can cause update packets larger than 10MB, which crashes the server due to an assert.
Additionally right now the Rune Strike enablement spell is not removed when Rune Strike is successfully cast.

How2Test

  • .unaura all
  • .gm unk on
  • .mod dodge 100
  • .cast 56816 (required so that the spell can proc)
  • .npc tempspawn 25760 200000
  • then keep doing .list auras on yourself

Todo / Checklist

  • Sanity check

- fixes infinite aura duration
- fixes infinite aura stacking
- fixes aura not being removed when rune strike is used
@killerwife
Copy link
Contributor

56817 is meant to proc off after runestrike is used not explcitly removed. Configure spell_proc_event so that happens.

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

@killerwife how does that work tho? as far as I can tell you can only use spell_proc_event to cast a spell, not to remove an aura. And 56817 is an aura that needs to be removed on successful spellcast of 56815

@killerwife
Copy link
Contributor

If it procs, charge is removed and as a result whole aura. Thats the only default behaviour of procs. Casting, damage, whatever else is optional behaviour.

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

The spell_proc_event page says "All spells in this table must have Aura Id 42 (SPELL_AURA_PROC_TRIGGER_SPELL) as one of its Effects"
But 56817 does not have spell_aura_proc_trigger_spell does that matter?

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

Would this work? Whatever the f- SpellFamilyMask[A-C][0-2] is supposed to be is opaque to me

INSERT INTO `spell_proc_event` (`entry`, `SpellFamilyName`, `SpellFamilyMaskA0`, `SpellFamilyMaskA1`, `SpellFamilyMaskA2`, `procFlags`, `procEx`, `CustomChance`) VALUES
(56817, 15, 0x00000000, 0x20000000, 0x00000000, 0x00010000, 0x0010000, 100);

@killerwife
Copy link
Contributor

Well test and let me know. I am not capable of divining proc system from github. SpellFamilyMask corresponds to the spell you want it to proc off of, meaning family DK, flags runestrike

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

No, doesn't work.
I tried with all combinations and also

DELETE FROM `spell_proc_event` WHERE `entry`=56817;
INSERT INTO `spell_proc_event` (`entry`, `SpellFamilyName`, `SpellFamilyMaskA0`, `SpellFamilyMaskA1`, `SpellFamilyMaskA2`, `SpellFamilyMaskB0`, `SpellFamilyMaskB1`, `SpellFamilyMaskB2`, `SpellFamilyMaskC0`, `SpellFamilyMaskC1`, `SpellFamilyMaskC2`, `procFlags`, `procEx`, `CustomChance`) VALUES
(56817, 15, 0x00000000, 0x20000000, 0x00000000, 0x00000000, 0x20000000, 0x00000000, 0x00000000, 0x20000000, 0x00000000, 0x00010000, 0x0010000, 100);

and none of them remove the aura
I still have no idea what the spellfamilymask values are supposed to mean.
I guessed maybe it's supposed to represent this:

     SpellFamilyFlags = 2305843009213693952
     SpellFamilyFlags2 = 0

somehow, but that's a much larger number so it doesn't fit at all

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

I now also tried it with this and all the variations thereof:

DELETE FROM `spell_proc_event` WHERE `entry`=56817;
INSERT INTO `spell_proc_event` (`entry`, `SpellFamilyName`, `SpellFamilyMaskA0`, `SpellFamilyMaskB0`, `SpellFamilyMaskC0`, `SpellFamilyMaskA1`, `SpellFamilyMaskB1`, `SpellFamilyMaskC1`, `SpellFamilyMaskA2`, `SpellFamilyMaskB2`, `SpellFamilyMaskC2`, `procFlags`, `procEx`, `CustomChance`) VALUES
(56817, 15, 0x00000000, 0x20000000, 0x00000000, 0x00000000, 0x20000000, 0x00000000, 0x00000000, 0x20000000, 0x00000000, 0x00010000, 0x0010000, 100);

DELETE FROM `spell_proc_event` WHERE `entry`=56817;
INSERT INTO `spell_proc_event` (`entry`, `SpellFamilyName`, `SpellFamilyMaskA2`, `SpellFamilyMaskB2`, `SpellFamilyMaskC2`, `procFlags`, `procEx`, `CustomChance`) VALUES
(56817, 15, 0x00000000, 0x20000000, 0x00000000, 0x00010000, 0x0010000, 100);

the only thing I haven't tried yet is to change the endianness

@killerwife
Copy link
Contributor

Well, qsw shows you the mask exactly:

0x00000000 20000000 00000000

Thats A1, which ur not setting to 0x20000000 anywhere. Why are you rawdogging spells from spell_template instead of running QSW in Wine or making it work for linux? Not even I can work with spells directly without a tool.

And if you do not understand how this works, there is exactly one option, putting a breakpoint in procspellanddamagefor and reading it. Proc system is more complex to script than everything else.

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

No I told you, I did try literally all iterations, including A1 being 0x20000000
image

@insunaa
Copy link
Contributor Author

insunaa commented Mar 4, 2025

It wouldn't be a problem if the exact same flags were not stored as uint32+uint32+uint32 in one table and as uint64+uint32 in another table.

@killerwife
Copy link
Contributor

Ok, then i advise what i would do, put a breakpoint in core and figure it out. Otherwise I will have to.

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

Successfully merging this pull request may close these issues.

2 participants