From 3e52971a13087a032bbbc1a0a6f36a7bd82b8155 Mon Sep 17 00:00:00 2001 From: Zackhasacat Date: Wed, 14 Jun 2023 22:28:45 +0000 Subject: [PATCH] Add duration to core.MagicEffectWithParams --- apps/openmw/mwlua/magicbindings.cpp | 2 ++ files/lua_api/openmw/core.lua | 1 + 2 files changed, 3 insertions(+) diff --git a/apps/openmw/mwlua/magicbindings.cpp b/apps/openmw/mwlua/magicbindings.cpp index ab097a8202..c4c95e5efe 100644 --- a/apps/openmw/mwlua/magicbindings.cpp +++ b/apps/openmw/mwlua/magicbindings.cpp @@ -284,6 +284,8 @@ namespace MWLua = sol::readonly_property([](const ESM::ENAMstruct& params) -> int { return params.mMagnMin; }); effectParamsT["magnitudeMax"] = sol::readonly_property([](const ESM::ENAMstruct& params) -> int { return params.mMagnMax; }); + effectParamsT["duration"] + = sol::readonly_property([](const ESM::ENAMstruct& params) -> int { return params.mDuration; }); // MagicEffect record auto magicEffectT = context.mLua->sol().new_usertype("ESM3_MagicEffect"); diff --git a/files/lua_api/openmw/core.lua b/files/lua_api/openmw/core.lua index 4fe9b082a5..c5b7c3deba 100644 --- a/files/lua_api/openmw/core.lua +++ b/files/lua_api/openmw/core.lua @@ -643,6 +643,7 @@ -- @field #number area -- @field #number magnitudeMin -- @field #number magnitudeMax +-- @field #number duration --- -- @type ActiveEffect