feat(Core/Spells): Implement SPELL_ATTR0_CU_IGNORE_BINARY (#27927)

This commit is contained in:
sogladev
2026-10-03 17:35:30 -03:00
committed by GitHub
parent ef96a8f3bc
commit b065ee7c9d
4 changed files with 28 additions and 17 deletions
@@ -0,0 +1,25 @@
-- SPELL_ATTR0_CU_IGNORE_BINARY (512) for spells that must not be auto-classified as binary.
-- Replaces the hardcoded id list in SpellMgr::LoadSpellInfoCustomAttributes.
DELETE FROM `spell_custom_attr` WHERE `spell_id` IN (62457, 62469, 62576, 62580, 62583, 62597, 62601, 62602, 62604, 62605, 65370, 69425, 69649, 70827, 71056, 71057, 71058, 73061, 73062, 73063, 73064);
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES
(62457, 512), -- Ice Shards (Hodir, small)
(62469, 512), -- Freeze (Hodir)
(62576, 512), -- Blizzard (Thorim 10m)
(62580, 512), -- Frostbolt Volley (Thorim 10m)
(62583, 512), -- Frostbolt (Thorim 10m)
(62597, 512), -- Frost Nova (Thorim 10m)
(62601, 512), -- Frostbolt (Thorim 25m)
(62602, 512), -- Blizzard (Thorim 25m)
(62604, 512), -- Frostbolt Volley (Thorim 25m)
(62605, 512), -- Frost Nova (Thorim 25m)
(65370, 512), -- Ice Shards (Hodir, big)
(69425, 512), -- Ice Shards (Pit of Saron)
(69649, 512), -- Frost Breath (Sindragosa)
(70827, 512), -- Ice Shards (Pit of Saron)
(71056, 512), -- Frost Breath (Sindragosa)
(71057, 512), -- Frost Breath (Sindragosa)
(71058, 512), -- Frost Breath (Sindragosa)
(73061, 512), -- Frost Breath (Sindragosa)
(73062, 512), -- Frost Breath (Sindragosa)
(73063, 512), -- Frost Breath (Sindragosa)
(73064, 512); -- Frost Breath (Sindragosa)
+1 -1
View File
@@ -183,7 +183,7 @@ enum SpellCustomAttributes
SPELL_ATTR0_CU_DONT_BREAK_STEALTH = 0x00000040,
SPELL_ATTR0_CU_NO_PVP_FLAG = 0x00000080,
SPELL_ATTR0_CU_DIRECT_DAMAGE = 0x00000100,
SPELL_ATTR0_CU_CHARGE = 0x00000200,
SPELL_ATTR0_CU_IGNORE_BINARY = 0x00000200,
SPELL_ATTR0_CU_PICKPOCKET = 0x00000400,
SPELL_ATTR0_CU_IGNORE_EVADE = 0x00000800,
SPELL_ATTR0_CU_NEGATIVE_EFF0 = 0x00001000,
+1 -15
View File
@@ -3357,13 +3357,6 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
case SPELL_EFFECT_CREATE_ITEM:
spellInfo->AttributesCu |= SPELL_ATTR0_CU_NO_INITIAL_THREAT;
break;
case SPELL_EFFECT_CHARGE:
case SPELL_EFFECT_CHARGE_DEST:
case SPELL_EFFECT_JUMP:
case SPELL_EFFECT_JUMP_DEST:
case SPELL_EFFECT_LEAP_BACK:
spellInfo->AttributesCu |= SPELL_ATTR0_CU_CHARGE;
break;
case SPELL_EFFECT_PICKPOCKET:
spellInfo->AttributesCu |= SPELL_ATTR0_CU_PICKPOCKET;
break;
@@ -3405,7 +3398,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
}
// Xinef: spells ignoring hit result should not be binary
if (!spellInfo->HasAttribute(SPELL_ATTR3_ALWAYS_HIT))
if (!spellInfo->HasAttribute(SPELL_ATTR3_ALWAYS_HIT) && !spellInfo->HasAttribute(SPELL_ATTR0_CU_IGNORE_BINARY))
{
for (uint8 j = 0; j < MAX_SPELL_EFFECTS; ++j)
{
@@ -3443,16 +3436,9 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
!spellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES))))
continue;
if (spellInfo->Id == 69649 || spellInfo->Id == 71056 || spellInfo->Id == 71057 || spellInfo->Id == 71058 ||
spellInfo->Id == 73061 || spellInfo->Id == 73062 || spellInfo->Id == 73063 || spellInfo->Id == 73064)
continue;
if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE && (spellInfo->SpellFamilyFlags[0] & 0x20)) // Frostbolt
continue;
if (spellInfo->Id == 55095) // Frost Fever
continue;
if (spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK &&
((spellInfo->SpellFamilyFlags[1] & 0x40000) || (spellInfo->SpellFamilyFlags[0] & 0x4000))) // Haunt/Drain Soul
continue;
+1 -1
View File
@@ -786,7 +786,7 @@ public:
if (spell->AttributesCu & SPELL_ATTR0_CU_DONT_BREAK_STEALTH) handler->PSendSysMessage(" - SPELL_ATTR0_CU_DONT_BREAK_STEALTH");
if (spell->AttributesCu & SPELL_ATTR0_CU_NO_PVP_FLAG) handler->PSendSysMessage(" - SPELL_ATTR0_CU_NO_PVP_FLAG");
if (spell->AttributesCu & SPELL_ATTR0_CU_DIRECT_DAMAGE) handler->PSendSysMessage(" - SPELL_ATTR0_CU_DIRECT_DAMAGE");
if (spell->AttributesCu & SPELL_ATTR0_CU_CHARGE) handler->PSendSysMessage(" - SPELL_ATTR0_CU_CHARGE");
if (spell->AttributesCu & SPELL_ATTR0_CU_IGNORE_BINARY) handler->PSendSysMessage(" - SPELL_ATTR0_CU_IGNORE_BINARY");
if (spell->AttributesCu & SPELL_ATTR0_CU_PICKPOCKET) handler->PSendSysMessage(" - SPELL_ATTR0_CU_PICKPOCKET");
if (spell->AttributesCu & SPELL_ATTR0_CU_IGNORE_EVADE) handler->PSendSysMessage(" - SPELL_ATTR0_CU_IGNORE_EVADE");
if (spell->AttributesCu & SPELL_ATTR0_CU_NEGATIVE_EFF0) handler->PSendSysMessage(" - SPELL_ATTR0_CU_NEGATIVE_EFF0");