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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user