aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp33
1 files changed, 24 insertions, 9 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index aaeb40c7fc9..fd57fd5f8ba 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2628,7 +2628,20 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
continue;
}
- // TODO: validate attributes
+ if ((attributes & SPELL_ATTR0_CU_NEGATIVE) != 0)
+ {
+ for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
+ {
+ if (spellInfo->Effects[i].IsEffect())
+ continue;
+
+ if ((attributes & (SPELL_ATTR0_CU_NEGATIVE_EFF0 << i)) != 0)
+ {
+ TC_LOG_ERROR("sql.sql", "Table `spell_custom_attr` has attribute SPELL_ATTR0_CU_NEGATIVE_EFF%u for spell %u with no EFFECT_%u", uint32(i), spellId, uint32(i));
+ continue;
+ }
+ }
+ }
spellInfo->AttributesCu |= attributes;
++count;
@@ -2829,14 +2842,7 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
spellInfo->AttributesCu |= SPELL_ATTR0_CU_SCHOOLMASK_NORMAL_WITH_MAGIC;
}
- if (!spellInfo->_IsPositiveEffect(EFFECT_0, false))
- spellInfo->AttributesCu |= SPELL_ATTR0_CU_NEGATIVE_EFF0;
-
- if (!spellInfo->_IsPositiveEffect(EFFECT_1, false))
- spellInfo->AttributesCu |= SPELL_ATTR0_CU_NEGATIVE_EFF1;
-
- if (!spellInfo->_IsPositiveEffect(EFFECT_2, false))
- spellInfo->AttributesCu |= SPELL_ATTR0_CU_NEGATIVE_EFF2;
+ spellInfo->_InitializeSpellPositivity();
if (spellInfo->SpellVisual[0] == 3879)
spellInfo->AttributesCu |= SPELL_ATTR0_CU_CONE_BACK;
@@ -3122,6 +3128,15 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].MiscValueB = 64;
});
+ // Battlegear of Eternal Justice
+ ApplySpellFix({
+ 26135, // Battlegear of Eternal Justice
+ 37557 // Mark of Light
+ }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->SpellFamilyFlags = flag96();
+ });
+
ApplySpellFix({
40244, // Simon Game Visual
40245, // Simon Game Visual