[Quest API] Add Owner methods to Perl/Lua. (#2542)

* [Quest API] Add Owner methods to Perl/Lua.

# Perl
- Add `$mob->GetOwner()` to Perl.

# Lua
- Add `mob:GetOwnerID()` to Lua.

# Notes
- `GetOwner()` exists in Lua, but not Perl.
- `GetOwnerID()` exists in Perl, but not Lua.

* Update lua_mob.cpp
This commit is contained in:
Kinglykrab
2022-11-14 18:03:26 -05:00
committed by GitHub
parent e72ec4ae56
commit 8f1b87c5e4
3 changed files with 14 additions and 1 deletions
+6
View File
@@ -2498,6 +2498,11 @@ void Lua_Mob::CloneAppearance(Lua_Mob other, bool clone_name) {
self->CloneAppearance(other, clone_name);
}
uint16 Lua_Mob::GetOwnerID() {
Lua_Safe_Call_Int();
return self->GetOwnerID();
}
luabind::scope lua_register_mob() {
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
.def(luabind::constructor<>())
@@ -2733,6 +2738,7 @@ luabind::scope lua_register_mob() {
.def("GetNimbusEffect3", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect3)
.def("GetOrigBodyType", &Lua_Mob::GetOrigBodyType)
.def("GetOwner", &Lua_Mob::GetOwner)
.def("GetOwnerID", &Lua_Mob::GetOwnerID)
.def("GetPR", &Lua_Mob::GetPR)
.def("GetPet", &Lua_Mob::GetPet)
.def("GetPetOrder", (int(Lua_Mob::*)(void))&Lua_Mob::GetPetOrder)