|
|
|
@ -1430,6 +1430,13 @@ namespace MWMechanics
|
|
|
|
|
if (heldIter != inventoryStore.end() && heldIter->getTypeName() != typeid(ESM::Light).name())
|
|
|
|
|
inventoryStore.unequipItem(*heldIter, ptr);
|
|
|
|
|
}
|
|
|
|
|
else if (heldIter == inventoryStore.end() || heldIter->getTypeName() == typeid(ESM::Light).name())
|
|
|
|
|
{
|
|
|
|
|
// For hostile NPCs, see if they have anything better to equip first
|
|
|
|
|
auto shield = inventoryStore.getPreferredShield(ptr);
|
|
|
|
|
if(shield != inventoryStore.end())
|
|
|
|
|
inventoryStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, shield, ptr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
heldIter = inventoryStore.getSlot(MWWorld::InventoryStore::Slot_CarriedLeft);
|
|
|
|
|
|
|
|
|
|