From ffedd62ea1aeaf200eee9c8374e746098e32fec3 Mon Sep 17 00:00:00 2001 From: Mehdi Yousfi-Monod Date: Sun, 12 Jan 2025 18:00:19 +0100 Subject: [PATCH] Lua: Allow creating arrows and bolt records (#8300) --- CMakeLists.txt | 2 +- apps/openmw/mwlua/types/weapon.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bcb27f7649..170a56aade 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "") diff --git a/apps/openmw/mwlua/types/weapon.cpp b/apps/openmw/mwlua/types/weapon.cpp index d5c52c8c4f..7fbfd5fb41 100644 --- a/apps/openmw/mwlua/types/weapon.cpp +++ b/apps/openmw/mwlua/types/weapon.cpp @@ -63,7 +63,7 @@ namespace if (rec["type"] != sol::nil) { int weaponType = rec["type"].get(); - 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));