1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 12:39:55 +00:00

Lua: Allow creating arrows and bolt records (#8300)

This commit is contained in:
Mehdi Yousfi-Monod 2025-01-12 18:00:19 +01:00
parent 763e88817a
commit ffedd62ea1
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ message(STATUS "Configuring OpenMW...")
set(OPENMW_VERSION_MAJOR 0)
set(OPENMW_VERSION_MINOR 49)
set(OPENMW_VERSION_RELEASE 0)
set(OPENMW_LUA_API_REVISION 69)
set(OPENMW_LUA_API_REVISION 70)
set(OPENMW_POSTPROCESSING_API_REVISION 2)
set(OPENMW_VERSION_COMMITHASH "")

View File

@ -63,7 +63,7 @@ namespace
if (rec["type"] != sol::nil)
{
int weaponType = rec["type"].get<int>();
if (weaponType >= 0 && weaponType <= ESM::Weapon::MarksmanThrown)
if (weaponType >= 0 && weaponType <= ESM::Weapon::Last)
weapon.mData.mType = weaponType;
else
throw std::runtime_error("Invalid Weapon Type provided: " + std::to_string(weaponType));