Add ScaleNPC() to Perl and Lua. (#1238)

This commit is contained in:
Alex
2021-02-09 00:08:07 -05:00
committed by GitHub
parent f2b67ae969
commit 8f89f38f5c
7 changed files with 45 additions and 1 deletions
+8 -1
View File
@@ -558,6 +558,12 @@ void Lua_NPC::RecalculateSkills()
self->RecalculateSkills();
}
void Lua_NPC::ScaleNPC(uint8 npc_level)
{
Lua_Safe_Call_Void();
self->ScaleNPC(npc_level);
}
luabind::scope lua_register_npc() {
return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
.def(luabind::constructor<>())
@@ -670,7 +676,8 @@ luabind::scope lua_register_npc() {
.def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop)
.def("GetRawAC", (int(Lua_NPC::*)(void))&Lua_NPC::GetRawAC)
.def("GetAvoidanceRating", &Lua_NPC::GetAvoidanceRating)
.def("RecalculateSkills", (void(Lua_NPC::*)(void))&Lua_NPC::RecalculateSkills);
.def("RecalculateSkills", (void(Lua_NPC::*)(void))&Lua_NPC::RecalculateSkills)
.def("ScaleNPC", (void(Lua_NPC::*)(uint8))&Lua_NPC::ScaleNPC);
}
#endif