1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-31 22:45:35 +00:00

Don't pass obsolete slot parameter to cast

This commit is contained in:
Evil Eye 2023-08-25 16:48:38 +02:00
parent 773d78192c
commit 8f10c8f84a

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);
}
}
}