From 89118b3e2706b9d34d3232b84bd18265f76ccf6b Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Wed, 4 Jun 2025 09:09:09 -0400 Subject: [PATCH] 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) --- Source/Game/Spells/Spell.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index 3f4879661..1b4a4199e 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -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;