mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-18 13:59:39 -04:00
Check of required skill value and level in Item enchants, by azazel. Closes #512
* Added some cosmetic changes to the original patch --HG-- branch : trunk
This commit is contained in:
@@ -10666,6 +10666,12 @@ uint8 Player::CanUseItem( Item *pItem, bool not_loading ) const
|
||||
if (getLevel() < pProto->RequiredLevel)
|
||||
return EQUIP_ERR_CANT_EQUIP_LEVEL_I;
|
||||
|
||||
if (getLevel() < pItem->GetEnchantRequiredLevel())
|
||||
return EQUIP_ERR_CANT_EQUIP_LEVEL_I;
|
||||
|
||||
if (!pItem->HasEnchantRequiredSkill(this))
|
||||
return EQUIP_ERR_NO_REQUIRED_PROFICIENCY;
|
||||
|
||||
return EQUIP_ERR_OK;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user