diff --git a/src/luascript.cpp b/src/luascript.cpp index 05ccd2ff..e10b9bef 100644 --- a/src/luascript.cpp +++ b/src/luascript.cpp @@ -3010,6 +3010,7 @@ void LuaScriptInterface::registerFunctions() registerMetaMethod("MonsterType", "__eq", LuaScriptInterface::luaUserdataCompare); registerMethod("MonsterType", "isAttackable", LuaScriptInterface::luaMonsterTypeIsAttackable); + registerMethod("MonsterType", "isRewardBoss", LuaScriptInterface::luaMonsterTypeIsRewardBoss); registerMethod("MonsterType", "isChallengeable", LuaScriptInterface::luaMonsterTypeIsChallengeable); registerMethod("MonsterType", "isConvinceable", LuaScriptInterface::luaMonsterTypeIsConvinceable); registerMethod("MonsterType", "isSummonable", LuaScriptInterface::luaMonsterTypeIsSummonable); @@ -14729,6 +14730,18 @@ int LuaScriptInterface::luaMonsterTypeIsAttackable(lua_State* L) return 1; } +int LuaScriptInterface::luaMonsterTypeIsRewardBoss(lua_State* L) +{ + // lua monsterType:isRewardBoss() + MonsterType* monsterType = getUserdata(L, 1); + if (monsterType) { + pushBoolean(L, monsterType->info.isRewardBoss); + } else { + lua_pushnil(L); + } + return 1; +} + int LuaScriptInterface::luaMonsterTypeIsChallengeable(lua_State* L) { // get: monsterType:isChallengeable() set: monsterType:isChallengeable(bool) diff --git a/src/luascript.h b/src/luascript.h index 37117dad..33820be5 100644 --- a/src/luascript.h +++ b/src/luascript.h @@ -1423,6 +1423,7 @@ class LuaScriptInterface static int luaMonsterTypeCreate(lua_State* L); static int luaMonsterTypeIsAttackable(lua_State* L); + static int luaMonsterTypeIsRewardBoss(lua_State* L); static int luaMonsterTypeIsChallengeable(lua_State* L); static int luaMonsterTypeIsConvinceable(lua_State* L); static int luaMonsterTypeIsSummonable(lua_State* L);