fix(Core/Loot): Only Paladins, Warriors and Shamans should be able to roll Need on shields (#7696)

- Closes #4858
This commit is contained in:
UltraNix
2021-09-06 13:06:54 +02:00
committed by GitHub
parent e5b13c392d
commit 29559d3747

View File

@@ -2380,6 +2380,12 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
if (proto->Class == ITEM_CLASS_WEAPON && GetSkillValue(item_weapon_skills[proto->SubClass]) == 0)
return EQUIP_ERR_NO_REQUIRED_PROFICIENCY;
// check for shields
if ((proto->SubClass == ITEM_SUBCLASS_ARMOR_SHIELD) && !(_class == CLASS_PALADIN || _class == CLASS_WARRIOR || _class == CLASS_SHAMAN))
{
return EQUIP_ERR_NO_REQUIRED_PROFICIENCY;
}
if (proto->Class == ITEM_CLASS_ARMOR && proto->SubClass > ITEM_SUBCLASS_ARMOR_MISC && proto->SubClass < ITEM_SUBCLASS_ARMOR_BUCKLER &&
proto->InventoryType != INVTYPE_CLOAK)
{