Fourth minor fix

This commit is contained in:
Glorf 2013-04-09 19:41:03 +02:00
parent 44ef02eb99
commit 248fff6eb7
2 changed files with 5 additions and 1 deletions

View file

@ -43,11 +43,13 @@ namespace MWWorld
switch(MWWorld::Class::get (object).canBeEquipped (actor, object)) switch(MWWorld::Class::get (object).canBeEquipped (actor, object))
{ {
case 0: case 0:
return; //Item cannot be equipped, so function breaks. return;
case 2: case 2:
invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end()); invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end());
break;
case 3: case 3:
invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end()); invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end());
break;
} }
// equip the item in the first free slot // equip the item in the first free slot

View file

@ -192,8 +192,10 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& npc)
continue; continue;
case 2: case 2:
invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end()); invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end());
break;
case 3: case 3:
invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end()); invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end());
break;
} }
if (!itemsSlots.second) // if itemsSlots.second is true, item can stay stacked when equipped if (!itemsSlots.second) // if itemsSlots.second is true, item can stay stacked when equipped