azerothcore / azerothcore-wotlk

Complete Open Source and Modular solution for MMO
http://www.azerothcore.org
GNU Affero General Public License v3.0
6.46k stars 2.59k forks source link

Drums of Forgotten Kings stacks with Blessing of Kings. #19324

Open heyitsbench opened 3 months ago

heyitsbench commented 3 months ago

Current Behaviour

Currently if you cast Drums of Forgotten Kings and Blessing of Kings, the two will not overwrite each other.

Expected Blizzlike Behaviour

The two should not stack, I assume Blessing of Kings should take priority given that it gives more stats, but not sure.

Source

Wowhead comments

Steps to reproduce the problem

  1. .additem 49633, .learn 20217
  2. Cast the drums.
  3. Cast the Blessing.
  4. Observe both auras stay applied.

Extra Notes

No response

AC rev. hash/commit

f85d8433a66e98a97e0969182ecc5a1429a838b6

Operating system

Windows 10 x64

Custom changes or Modules

mod-ptr-template

sogladev commented 3 months ago

managed to get kings/sanc/forgotten to no longer to stack by manually setting priority in spell_group, however

There's 1 interaction that I haven't solved and not sure if it's even blizzlike

interaction with forgotten kings and blessing of sanctuary:

  1. cast sanctuary, cast forgotten kings: 10% stam/str, no forgotten kings buff
  2. cast forgotten kings, cast sanctuary: 8% stats, both buffs

short video on wrath classic demonstrating https://youtu.be/wXFnMCACA6U?si=RgcE3ksV6FULEXTD&t=43

Here's uncleaned sql fix:

-- remove SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK
-- forgotten kings
UPDATE `spell_group` SET `special_flag` = `special_flag` & ~32 WHERE `id`=1002 AND `spell_id`=72586;
-- sanc
UPDATE `spell_group` SET `special_flag` = `special_flag` & ~32 WHERE `id`=1002 AND `spell_id`=67480;

-- SPELL_GROUP_SPECIAL_FLAG_PRIORITY1
-- kings
UPDATE `spell_group` SET `special_flag` = `special_flag` | 256 WHERE `id`=1002 AND `spell_id` IN (20217, 25898, 43223, 56525, 58054);
-- sanctuary
UPDATE `spell_group` SET `special_flag` = `special_flag` | 256 WHERE `id`=1002 AND `spell_id` = 67480;
-- SPELL_GROUP_SPECIAL_FLAG_PRIORITY2
-- forgotten kings
UPDATE `spell_group` SET `special_flag` = `special_flag` | 512 WHERE `id`=1002 AND `spell_id`=72586;
20217 Blessing of Kings
67480 Blessing of Sanctuary stats
72586 Blessing of Forgotten Kings
20911, 25899 Blessing of Sanctuary, Greater Blessing of Sanctuary

in core this check needs to fail when casting forgotten kings when kings/sanctuary is active https://github.com/azerothcore/azerothcore-wotlk/blob/681ae4eeae6c4554a8d4e8a8a44a1c3017d1810e/src/server/game/Spells/SpellInfo.cpp#L1918

SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK auto succeeds when disabled it still succeeds because the effects are different https://github.com/azerothcore/azerothcore-wotlk/blob/681ae4eeae6c4554a8d4e8a8a44a1c3017d1810e/src/server/game/Spells/SpellInfo.cpp#L1634

sql reset

-- reset
UPDATE `spell_group` SET `special_flag` = 0 WHERE `id`=1002 AND `spell_id` IN (20217, 25898, 43223, 56525, 58054);
UPDATE `spell_group` SET `special_flag` = 0 WHERE `id`=1002 AND `spell_id` IN (20911, 25899);
UPDATE `spell_group` SET `special_flag` = 32 WHERE `id`=1002 AND `spell_id` =67480;
UPDATE `spell_group` SET `special_flag` = 32 WHERE `id`=1002 AND `spell_id`=72586;

edit: wiki links https://www.azerothcore.org/wiki/spell_group_stack_rules https://www.azerothcore.org/wiki/spell_group