aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-01-10 23:47:57 +0100
committerShauren <shauren.trinity@gmail.com>2025-01-10 23:47:57 +0100
commit1e3b8d172148b201f58595254d05ad91d7263bb9 (patch)
treebdfc60fd9bacf68d67e0f79abd502a3e7e9ab500
parent6e3c8a84637cc669fe08c3933ce5323f8cf4c5cb (diff)
Core/Spells: Fixed crashes with spells using SPELL_EFFECT_ENCHANT_ITEM/SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC that are not cast by an item
Closes #28664
-rw-r--r--src/server/game/Spells/Spell.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index adbe4fad5b6..906697fd565 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -7797,7 +7797,7 @@ SpellCastResult Spell::CheckItems(int32* param1 /*= nullptr*/, int32* param2 /*=
if (requiredLevel < m_spellInfo->BaseLevel)
return SPELL_FAILED_LOWLEVEL;
}
- if ((m_CastItem || effectInfo->IsEffect(SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC))
+ if ((m_CastItem || spellEffectInfo.IsEffect(SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC))
&& m_spellInfo->MaxLevel > 0 && targetItem->GetItemLevel(targetItem->GetOwner()) > m_spellInfo->MaxLevel)
return SPELL_FAILED_HIGHLEVEL;