mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 13:45:34 +00:00
Third minor fix
This commit is contained in:
parent
46925e93a6
commit
44ef02eb99
1 changed files with 10 additions and 9 deletions
|
@ -40,19 +40,20 @@ namespace MWWorld
|
||||||
|
|
||||||
bool equipped = false;
|
bool equipped = false;
|
||||||
|
|
||||||
|
switch(MWWorld::Class::get (object).canBeEquipped (actor, object))
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
return; //Item cannot be equipped, so function breaks.
|
||||||
|
case 2:
|
||||||
|
invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end());
|
||||||
|
case 3:
|
||||||
|
invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end());
|
||||||
|
}
|
||||||
|
|
||||||
// equip the item in the first free slot
|
// equip the item in the first free slot
|
||||||
for (std::vector<int>::const_iterator slot=slots.first.begin();
|
for (std::vector<int>::const_iterator slot=slots.first.begin();
|
||||||
slot!=slots.first.end(); ++slot)
|
slot!=slots.first.end(); ++slot)
|
||||||
{
|
{
|
||||||
switch(MWWorld::Class::get (object).canBeEquipped (actor, object))
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
return;
|
|
||||||
case 2:
|
|
||||||
invStore.equip(MWWorld::InventoryStore::Slot_CarriedLeft, invStore.end());
|
|
||||||
case 3:
|
|
||||||
invStore.equip(MWWorld::InventoryStore::Slot_CarriedRight, invStore.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
// if all slots are occupied, replace the last slot
|
// if all slots are occupied, replace the last slot
|
||||||
if (slot == --slots.first.end())
|
if (slot == --slots.first.end())
|
||||||
|
|
Loading…
Reference in a new issue