Core/Player: Fixed HasItemFitToSpellRequirements for SPELL_ATTR8_ARMOR_SPECIALIZATION (#21535)

This commit is contained in:
Traesh
2018-03-04 12:10:16 +01:00
committed by joschiwald
parent 06520a322b
commit f24bbdc5f1

View File

@@ -24663,12 +24663,15 @@ bool Player::HasItemFitToSpellRequirements(SpellInfo const* spellInfo, Item cons
}
else
{
// requires item equipped in all armor slots
for (uint8 i : {EQUIPMENT_SLOT_HEAD, EQUIPMENT_SLOT_SHOULDERS, EQUIPMENT_SLOT_CHEST, EQUIPMENT_SLOT_WAIST, EQUIPMENT_SLOT_LEGS, EQUIPMENT_SLOT_FEET, EQUIPMENT_SLOT_WRISTS, EQUIPMENT_SLOT_HANDS})
{
Item* item = GetUseableItemByPos(INVENTORY_SLOT_BAG_0, i);
if (!item || !item->IsFitToSpellRequirements(spellInfo))
if (!item || item == ignoreItem || !item->IsFitToSpellRequirements(spellInfo))
return false;
}
return true;
}
break;