Spell(item check): turn ItemLevel to RequiredLevel
This commit is contained in:
@@ -7497,9 +7497,9 @@ SpellCastResult Spell::CheckItems()
|
|||||||
// Xinef: Apply item level restriction if the enchanting spell has max level restrition set
|
// Xinef: Apply item level restriction if the enchanting spell has max level restrition set
|
||||||
if (m_CastItem && m_spellInfo->MaxLevel > 0)
|
if (m_CastItem && m_spellInfo->MaxLevel > 0)
|
||||||
{
|
{
|
||||||
if (item->GetTemplate()->ItemLevel < m_CastItem->GetTemplate()->RequiredLevel)
|
if (item->GetTemplate()->RequiredLevel < m_CastItem->GetTemplate()->RequiredLevel)
|
||||||
return SPELL_FAILED_LOWLEVEL;
|
return SPELL_FAILED_LOWLEVEL;
|
||||||
if (item->GetTemplate()->ItemLevel > m_spellInfo->MaxLevel)
|
if (item->GetTemplate()->RequiredLevel > m_spellInfo->MaxLevel)
|
||||||
return SPELL_FAILED_HIGHLEVEL;
|
return SPELL_FAILED_HIGHLEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user