[Quest API] Add GetHealScale() and GetSpellScale() to Perl and Lua. (#1515)

This commit is contained in:
Kinglykrab
2021-09-03 20:47:33 -04:00
committed by GitHub
parent e1df72d64d
commit 119018cf41
3 changed files with 53 additions and 1 deletions
+15 -1
View File
@@ -606,6 +606,18 @@ uint16 Lua_NPC::GetFirstSlotByItemID(uint32 item_id)
return self->GetFirstSlotByItemID(item_id);
}
float Lua_NPC::GetHealScale()
{
Lua_Safe_Call_Real();
return self->GetHealScale();
}
float Lua_NPC::GetSpellScale()
{
Lua_Safe_Call_Real();
return self->GetSpellScale();
}
luabind::scope lua_register_npc() {
return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
.def(luabind::constructor<>())
@@ -726,7 +738,9 @@ luabind::scope lua_register_npc() {
.def("HasItem", (bool(Lua_NPC::*)(uint32))&Lua_NPC::HasItem)
.def("CountItem", (uint16(Lua_NPC::*)(uint32))&Lua_NPC::CountItem)
.def("GetItemIDBySlot", (uint32(Lua_NPC::*)(uint16))&Lua_NPC::GetItemIDBySlot)
.def("GetFirstSlotByItemID", (uint16(Lua_NPC::*)(uint32))&Lua_NPC::GetFirstSlotByItemID);
.def("GetFirstSlotByItemID", (uint16(Lua_NPC::*)(uint32))&Lua_NPC::GetFirstSlotByItemID)
.def("GetHealScale", (float(Lua_NPC::*)(void))&Lua_NPC::GetHealScale)
.def("GetSpellScale", (float(Lua_NPC::*)(void))&Lua_NPC::GetSpellScale);
}
#endif