[Quest API] Add Mob/Entity type check methods to Perl/Lua (#3493)

* [Quest API] Add Mob/Entity type check methods to Perl/Lua

# Perl
- Add `$mob->IsAura()`.
- Add `$mob->IsEncounter()`.
- Add `$mob->IsMerc()`.
- Add `$mob->IsOfClientBot()`.
- Add `$mob->IsOfClientBotMerc()`.
- Add `$mob->IsTemporaryPet()`.

# Lua
- Add `entity:IsAura()`.
- Add `entity:IsOfClientBot()`.
- Add `entity:IsOfClientBotMerc()`.
- Add `mob:IsTemporaryPet()`.

* Update lua_entity.cpp

* Update lua_mob.cpp
This commit is contained in:
Alex King
2023-07-12 22:20:07 -04:00
committed by GitHub
parent c81d05940a
commit 4854201b2a
5 changed files with 70 additions and 5 deletions
+7
View File
@@ -3127,6 +3127,12 @@ std::string Lua_Mob::GetRacePlural()
return self->GetRacePlural();
}
bool Lua_Mob::IsTemporaryPet()
{
Lua_Safe_Call_Bool();
return self->IsTempPet();
}
luabind::scope lua_register_mob() {
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
.def(luabind::constructor<>())
@@ -3518,6 +3524,7 @@ luabind::scope lua_register_mob() {
.def("IsStunned", (bool(Lua_Mob::*)(void))&Lua_Mob::IsStunned)
.def("IsTargetable", (bool(Lua_Mob::*)(void))&Lua_Mob::IsTargetable)
.def("IsTargeted", &Lua_Mob::IsTargeted)
.def("IsTemporaryPet", &Lua_Mob::IsTemporaryPet)
.def("IsTrackable", (bool(Lua_Mob::*)(void))&Lua_Mob::IsTrackable)
.def("IsWarriorClass", &Lua_Mob::IsWarriorClass)
.def("Kill", (void(Lua_Mob::*)(void))&Lua_Mob::Kill)