mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 20:48:26 +00:00
[Quest API] Add Pet Owner Methods to Perl/Lua (#4115)
* [Quest API] Add Pet Owner Methods to Perl/Lua - Add `$mob->IsPetOwnerBot()`. - Add `$mob->IsPetOwnerClient()`. - Add `$mob->IsPetOwnerNPC()`. - Add `mob:IsPetOwnerBot()`. - Add `mob:IsPetOwnerClient()`. - Add `mob:IsPetOwnerNPC()`. - Allows operators to use these short hands instead of doing a `GetOwner() && GetOwner()->IsClient()`. * Update npc.cpp
This commit is contained in:
@@ -3249,6 +3249,24 @@ bool Lua_Mob::IsTargetLockPet()
|
||||
return self->IsTargetLockPet();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsPetOwnerBot()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsPetOwnerBot();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsPetOwnerClient()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsPetOwnerClient();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsPetOwnerNPC()
|
||||
{
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsPetOwnerNPC();
|
||||
}
|
||||
|
||||
luabind::scope lua_register_mob() {
|
||||
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
|
||||
.def(luabind::constructor<>())
|
||||
@@ -3648,6 +3666,9 @@ luabind::scope lua_register_mob() {
|
||||
.def("IsMoving", &Lua_Mob::IsMoving)
|
||||
.def("IsPausedTimer", &Lua_Mob::IsPausedTimer)
|
||||
.def("IsPet", (bool(Lua_Mob::*)(void))&Lua_Mob::IsPet)
|
||||
.def("IsPetOwnerBot", &Lua_Mob::IsPetOwnerBot)
|
||||
.def("IsPetOwnerClient", &Lua_Mob::IsPetOwnerClient)
|
||||
.def("IsPetOwnerNPC", &Lua_Mob::IsPetOwnerNPC)
|
||||
.def("IsRoamer", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRoamer)
|
||||
.def("IsRooted", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRooted)
|
||||
.def("IsRunning", (bool(Lua_Mob::*)(void))&Lua_Mob::IsRunning)
|
||||
|
||||
Reference in New Issue
Block a user