[Quest API] Add IsRareSpawn() to Perl/Lua. (#2338)

- Add $npc->IsRareSpawn() to Perl.
- Add npc:IsRareSpawn() to Lua.
This commit is contained in:
Kinglykrab
2022-07-30 19:40:51 -04:00
committed by GitHub
parent 113846c48c
commit 576e7b0f91
4 changed files with 15 additions and 0 deletions
+7
View File
@@ -669,6 +669,12 @@ float Lua_NPC::GetNPCStat(const char* identifier)
return self->GetNPCStat(identifier);
}
bool Lua_NPC::IsRareSpawn()
{
Lua_Safe_Call_Bool();
return self->IsRareSpawn();
}
luabind::scope lua_register_npc() {
return luabind::class_<Lua_NPC, Lua_Mob>("NPC")
.def(luabind::constructor<>())
@@ -753,6 +759,7 @@ luabind::scope lua_register_npc() {
.def("IsGuarding", (bool(Lua_NPC::*)(void))&Lua_NPC::IsGuarding)
.def("IsOnHatelist", (bool(Lua_NPC::*)(Lua_Mob))&Lua_NPC::IsOnHatelist)
.def("IsRaidTarget", (bool(Lua_NPC::*)(void))&Lua_NPC::IsRaidTarget)
.def("IsRareSpawn", (bool(Lua_NPC::*)(void))&Lua_NPC::IsRareSpawn)
.def("IsTaunting", (bool(Lua_NPC::*)(void))&Lua_NPC::IsTaunting)
.def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop)
.def("MerchantOpenShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantOpenShop)