Core/Spells: Fixed crashes with spells using SPELL_EFFECT_ENCHANT_ITEM/SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC that are not cast by an item

Port From (https://github.com/TrinityCore/TrinityCore/commit/1e3b8d172148b201f58595254d05ad91d7263bb9)
This commit is contained in:
Hondacrx
2025-06-04 09:09:09 -04:00
parent d9cf0e3a36
commit 89118b3e27
+1 -1
View File
@@ -6952,7 +6952,7 @@ namespace Game.Spells
if (requiredLevel < m_spellInfo.BaseLevel)
return SpellCastResult.Lowlevel;
}
if ((m_CastItem != null || effectInfo.IsEffect(SpellEffectName.EnchantItemPrismatic))
if ((m_CastItem != null || spellEffectInfo.IsEffect(SpellEffectName.EnchantItemPrismatic))
&& m_spellInfo.MaxLevel > 0 && targetItem.GetItemLevel(targetItem.GetOwner()) > m_spellInfo.MaxLevel)
return SpellCastResult.Highlevel;