[Quest API] Add IsFindable() and IsTrackable() to Perl/Lua (#2996)

# Perl
- Add `$mob->IsFindable()`.
- Add `$mob->IsTrackable()`.

# Lua
- Add `mob:IsFindable()`.
- Add `mob:IsTrackable()`.

# Notes
- Allows operators to see if a mob is findable or trackable.
This commit is contained in:
Alex King
2023-02-28 21:26:11 -05:00
committed by GitHub
parent 9a5bf53e11
commit 5702f7bcd1
3 changed files with 27 additions and 0 deletions
+13
View File
@@ -2823,6 +2823,17 @@ Lua_HateList Lua_Mob::GetHateListBots(uint32 distance) {
return ret;
}
bool Lua_Mob::IsFindable() {
Lua_Safe_Call_Bool();
return self->IsFindable();
}
bool Lua_Mob::IsTrackable() {
Lua_Safe_Call_Bool();
return self->IsTrackable();
}
float Lua_Mob::GetDefaultRaceSize() {
Lua_Safe_Call_Real();
return self->GetDefaultRaceSize();
@@ -3170,6 +3181,7 @@ luabind::scope lua_register_mob() {
.def("IsEngaged", (bool(Lua_Mob::*)(void))&Lua_Mob::IsEngaged)
.def("IsEnraged", (bool(Lua_Mob::*)(void))&Lua_Mob::IsEnraged)
.def("IsFeared", (bool(Lua_Mob::*)(void))&Lua_Mob::IsFeared)
.def("IsFindable", (bool(Lua_Mob::*)(void))&Lua_Mob::IsFindable)
.def("IsHorse", &Lua_Mob::IsHorse)
.def("IsImmuneToSpell", (bool(Lua_Mob::*)(int,Lua_Mob))&Lua_Mob::IsImmuneToSpell)
.def("IsInvisible", (bool(Lua_Mob::*)(Lua_Mob))&Lua_Mob::IsInvisible)
@@ -3185,6 +3197,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("IsTrackable", (bool(Lua_Mob::*)(void))&Lua_Mob::IsTrackable)
.def("IsWarriorClass", &Lua_Mob::IsWarriorClass)
.def("Kill", (void(Lua_Mob::*)(void))&Lua_Mob::Kill)
.def("Mesmerize", (void(Lua_Mob::*)(void))&Lua_Mob::Mesmerize)