[Quest API] Add IsDestructibleObject() to Perl/Lua (#4153)

# Perl
- Add `$mob-.IsDestructibleObject()`.

# Lua
- Add `mob:IsDestructibleObject()`.

# Notes
- Allows operators to determine if a mob is a destructible object.
This commit is contained in:
Alex King
2024-03-03 11:43:54 -05:00
committed by GitHub
parent 4896688ac5
commit b2fc59878a
3 changed files with 14 additions and 0 deletions
+7
View File
@@ -3267,6 +3267,12 @@ bool Lua_Mob::IsPetOwnerNPC()
return self->IsPetOwnerNPC();
}
bool Lua_Mob::IsDestructibleObject()
{
Lua_Safe_Call_Bool();
return self->IsDestructibleObject();
}
luabind::scope lua_register_mob() {
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
.def(luabind::constructor<>())
@@ -3651,6 +3657,7 @@ luabind::scope lua_register_mob() {
.def("IsBlind", (bool(Lua_Mob::*)(void))&Lua_Mob::IsBlind)
.def("IsCasting", &Lua_Mob::IsCasting)
.def("IsCharmed", &Lua_Mob::IsCharmed)
.def("IsDestructibleObject", &Lua_Mob::IsDestructibleObject)
.def("IsEliteMaterialItem", (uint32(Lua_Mob::*)(uint8))&Lua_Mob::IsEliteMaterialItem)
.def("IsEngaged", (bool(Lua_Mob::*)(void))&Lua_Mob::IsEngaged)
.def("IsEnraged", (bool(Lua_Mob::*)(void))&Lua_Mob::IsEnraged)