1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:59:56 +00:00

Merge branch '8300_create_arrows_bolts' into 'master'

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

See merge request OpenMW/openmw!4514
This commit is contained in:
jvoisin 2025-01-13 14:31:36 +00:00
commit 7d47b225ab
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));