1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'remembertofeedyourgems' into 'master'

Don't pass obsolete slot parameter to cast

Closes #7556

See merge request OpenMW/openmw!3375
This commit is contained in:
psi29a 2023-08-27 11:34:12 +00:00
commit 518aa5c6ae

View File

@ -3062,17 +3062,7 @@ namespace MWWorld
if (inv.getSelectedEnchantItem() != inv.end())
{
const auto& itemPtr = *inv.getSelectedEnchantItem();
auto [slots, _] = itemPtr.getClass().getEquipmentSlots(itemPtr);
int slot = 0;
for (std::size_t i = 0; i < slots.size(); ++i)
{
if (inv.getSlot(slots[i]) == inv.getSelectedEnchantItem())
{
slot = slots[i];
break;
}
}
cast.cast(itemPtr, slot);
cast.cast(itemPtr);
}
}
}