mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Items: Implemented ITEM_BONUS_DISENCHANT_LOOT_ID
This commit is contained in:
@@ -7882,10 +7882,10 @@ SpellCastResult Spell::CheckItems(int32* param1 /*= nullptr*/, int32* param2 /*=
|
||||
if (!itemProto)
|
||||
return SPELL_FAILED_CANT_BE_SALVAGED;
|
||||
|
||||
ItemDisenchantLootEntry const* itemDisenchantLoot = item->GetDisenchantLoot(m_caster->ToPlayer());
|
||||
if (!itemDisenchantLoot)
|
||||
Optional<uint16> disenchantSkillRequired = item->GetDisenchantSkillRequired();
|
||||
if (!disenchantSkillRequired)
|
||||
return SPELL_FAILED_CANT_BE_SALVAGED;
|
||||
if (itemDisenchantLoot->SkillRequired > player->GetSkillValue(SKILL_ENCHANTING))
|
||||
if (disenchantSkillRequired > player->GetSkillValue(SKILL_ENCHANTING))
|
||||
return SPELL_FAILED_CANT_BE_SALVAGED_SKILL;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user