engine/items/source/HandsRequiredItemFilter.cpp
// Check to see if the item can be wielded.
Check to see if the item can be wielded.
Check to see if the item can be wielded .
bool HandsRequiredItemFilter::passes_filter(ItemPtr item) const
{
  bool passes = false;
  if (item && (hands_available > 0))
  {
    int hands_required = item->get_hands_required();
    passes = ((hands_required == 1) || (hands_required <= hands_available));
    passes = passes && ((hands_required == 1) || (slot_location == EquipmentWornLocation::EQUIPMENT_WORN_WIELDED));
  }
  return passes;
}
bool HandsRequiredItemFilter :: passes_filter ( ItemPtr item ) const { bool passes = false ; if ( item && ( hands_available > 0 ) ) { int hands_required = item -> get_hands_required ( ) ; passes = ( ( hands_required == 1 ) || ( hands_required <= hands_available ) ) ; passes = passes && ( ( hands_required == 1 ) || ( slot_location == EquipmentWornLocation :: EQUIPMENT_WORN_WIELDED ) ) ; } return passes ; }
Check to see if the item can be wielded.
Check to see if the item can be wielded .
// Can't equip anything if your hands are full! // Two-handed weapons can't be wielded in the off-hand.