mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[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:
parent
69c6a7b89a
commit
9a5bf53e11
@ -767,6 +767,11 @@ void Lua_NPC::ScaleNPC(uint8 npc_level, bool override_special_abilities)
|
|||||||
self->ScaleNPC(npc_level, true, 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() {
|
bool Lua_NPC::HasSpecialAbilities() {
|
||||||
Lua_Safe_Call_Bool();
|
Lua_Safe_Call_Bool();
|
||||||
return self->HasSpecialAbilities();
|
return self->HasSpecialAbilities();
|
||||||
@ -865,6 +870,7 @@ luabind::scope lua_register_npc() {
|
|||||||
.def("IsRaidTarget", (bool(Lua_NPC::*)(void))&Lua_NPC::IsRaidTarget)
|
.def("IsRaidTarget", (bool(Lua_NPC::*)(void))&Lua_NPC::IsRaidTarget)
|
||||||
.def("IsRareSpawn", (bool(Lua_NPC::*)(void))&Lua_NPC::IsRareSpawn)
|
.def("IsRareSpawn", (bool(Lua_NPC::*)(void))&Lua_NPC::IsRareSpawn)
|
||||||
.def("IsTaunting", (bool(Lua_NPC::*)(void))&Lua_NPC::IsTaunting)
|
.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("MerchantCloseShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantCloseShop)
|
||||||
.def("MerchantOpenShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantOpenShop)
|
.def("MerchantOpenShop", (void(Lua_NPC::*)(void))&Lua_NPC::MerchantOpenShop)
|
||||||
.def("ModifyNPCStat", (void(Lua_NPC::*)(std::string,std::string))&Lua_NPC::ModifyNPCStat)
|
.def("ModifyNPCStat", (void(Lua_NPC::*)(std::string,std::string))&Lua_NPC::ModifyNPCStat)
|
||||||
|
|||||||
@ -174,6 +174,7 @@ public:
|
|||||||
void SetLDoNTrapDetected(bool is_detected);
|
void SetLDoNTrapDetected(bool is_detected);
|
||||||
void ScaleNPC(uint8 npc_level);
|
void ScaleNPC(uint8 npc_level);
|
||||||
void ScaleNPC(uint8 npc_level, bool override_special_abilities);
|
void ScaleNPC(uint8 npc_level, bool override_special_abilities);
|
||||||
|
bool IsUnderwaterOnly();
|
||||||
bool HasSpecialAbilities();
|
bool HasSpecialAbilities();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -765,6 +765,11 @@ void Perl_NPC_ScaleNPC(NPC* self, uint8 npc_level, bool override_special_abiliti
|
|||||||
return self->ScaleNPC(npc_level, override_special_abilities);
|
return self->ScaleNPC(npc_level, override_special_abilities);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Perl_NPC_IsUnderwaterOnly(NPC* self) // @categories Script Utility
|
||||||
|
{
|
||||||
|
return self->IsUnderwaterOnly();
|
||||||
|
}
|
||||||
|
|
||||||
bool Perl_NPC_HasSpecialAbilities(NPC* self) // @categories Script Utility
|
bool Perl_NPC_HasSpecialAbilities(NPC* self) // @categories Script Utility
|
||||||
{
|
{
|
||||||
return self->HasSpecialAbilities();
|
return self->HasSpecialAbilities();
|
||||||
@ -868,6 +873,7 @@ void perl_register_npc()
|
|||||||
package.add("IsRaidTarget", &Perl_NPC_IsRaidTarget);
|
package.add("IsRaidTarget", &Perl_NPC_IsRaidTarget);
|
||||||
package.add("IsRareSpawn", &Perl_NPC_IsRareSpawn);
|
package.add("IsRareSpawn", &Perl_NPC_IsRareSpawn);
|
||||||
package.add("IsTaunting", &Perl_NPC_IsTaunting);
|
package.add("IsTaunting", &Perl_NPC_IsTaunting);
|
||||||
|
package.add("IsUnderwaterOnly", (bool(*)(NPC*))&Perl_NPC_IsUnderwaterOnly);
|
||||||
package.add("MerchantCloseShop", &Perl_NPC_MerchantCloseShop);
|
package.add("MerchantCloseShop", &Perl_NPC_MerchantCloseShop);
|
||||||
package.add("MerchantOpenShop", &Perl_NPC_MerchantOpenShop);
|
package.add("MerchantOpenShop", &Perl_NPC_MerchantOpenShop);
|
||||||
package.add("ModifyNPCStat", &Perl_NPC_ModifyNPCStat);
|
package.add("ModifyNPCStat", &Perl_NPC_ModifyNPCStat);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user