[Quest API] Add IsUnderwaterOnly() to Perl/Lua (#2995)

# Perl
- Add `$npc->IsUnderwaterOnly()`.

# Lua
- Add `npc:IsUnderwaterOnly()`.

# Notes
- Allows operators to chec k if an NPC is underwater only.
This commit is contained in:
Alex King
2023-02-28 21:13:43 -05:00
committed by GitHub
parent 69c6a7b89a
commit 9a5bf53e11
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -767,6 +767,11 @@ void Lua_NPC::ScaleNPC(uint8 npc_level, bool override_special_abilities)
self->ScaleNPC(npc_level, true, override_special_abilities);
}
bool Lua_NPC::IsUnderwaterOnly() {
Lua_Safe_Call_Bool();
return self->IsUnderwaterOnly();
}
bool Lua_NPC::HasSpecialAbilities() {
Lua_Safe_Call_Bool();
return self->HasSpecialAbilities();
@@ -865,6 +870,7 @@ luabind::scope lua_register_npc() {
.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("IsUnderwaterOnly", (bool(Lua_NPC::*)(void))&Lua_NPC::IsUnderwaterOnly)
.def("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop)
.def("MerchantOpenShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantOpenShop)
.def("ModifyNPCStat", (void(Lua_NPC::*)(std::string,std::string))&Lua_NPC::ModifyNPCStat)