diff options
-rw-r--r-- | src/game/Item.cpp | 23 | ||||
-rw-r--r-- | src/game/Item.h | 3 | ||||
-rw-r--r-- | src/game/Player.cpp | 6 |
3 files changed, 0 insertions, 32 deletions
diff --git a/src/game/Item.cpp b/src/game/Item.cpp index 1a32bfd4107..eed876082bf 100644 --- a/src/game/Item.cpp +++ b/src/game/Item.cpp @@ -727,29 +727,6 @@ bool Item::CanBeTraded(bool mail) const return true; } -bool Item::HasEnchantRequiredSkill(const Player *pPlayer) const -{ - // Check all enchants for required skill - for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot) - if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot))) - if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id)) - if (enchantEntry->requiredSkill && pPlayer->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue) - return false; - return true; -} - -uint32 Item::GetEnchantRequiredLevel() const -{ - uint32 level = 0; - // Check all enchants for required level - for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot) - if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot))) - if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id)) - if (enchantEntry->requiredLevel > level) - level = enchantEntry->requiredLevel; - return level; -} - bool Item::IsBoundByEnchant() const { // Check all enchants for soulbound diff --git a/src/game/Item.h b/src/game/Item.h index bf893fcd3c3..c9279e5e0ca 100644 --- a/src/game/Item.h +++ b/src/game/Item.h @@ -250,9 +250,6 @@ class TRINITY_DLL_SPEC Item : public Object void SetInTrade(bool b = true) { mb_in_trade = b; } bool IsInTrade() const { return mb_in_trade; } - bool HasEnchantRequiredSkill(const Player *pPlayer) const; - uint32 GetEnchantRequiredLevel() const; - bool IsFitToSpellRequirements(SpellEntry const* spellInfo) const; bool IsTargetValidForItemUse(Unit* pUnitTarget); bool IsLimitedToAnotherMapOrZone( uint32 cur_mapId, uint32 cur_zoneId) const; diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e5aff30d2a1..f3383c8e5bc 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -10890,12 +10890,6 @@ 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; } } |