[Quest API] Add GetUltimateOwner() to Perl/Lua. (#2516)

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

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

# Notes
- Allows operators to get ultimate owner of something like a pet's pet or a pet's swarm pet.
This commit is contained in:
Kinglykrab
2022-11-05 08:35:14 -04:00
committed by GitHub
parent 8d1dd52db3
commit a3928ec504
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -2473,6 +2473,11 @@ void Lua_Mob::SetBuffDuration(int spell_id, int duration) {
self->SetBuffDuration(spell_id, duration);
}
Lua_Mob Lua_Mob::GetUltimateOwner() {
Lua_Safe_Call_Class(Lua_Mob);
return Lua_Mob(self->GetUltimateOwner());
}
luabind::scope lua_register_mob() {
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
.def(luabind::constructor<>())
@@ -2729,6 +2734,7 @@ luabind::scope lua_register_mob() {
.def("GetSpellHPBonuses", &Lua_Mob::GetSpellHPBonuses)
.def("GetTarget", &Lua_Mob::GetTarget)
.def("GetTexture", &Lua_Mob::GetTexture)
.def("GetUltimateOwner", &Lua_Mob::GetUltimateOwner)
.def("GetWIS", &Lua_Mob::GetWIS)
.def("GetWalkspeed", &Lua_Mob::GetWalkspeed)
.def("GetWaypointH", &Lua_Mob::GetWaypointH)