[Quest API] Add GetMobTypeIdentifier() to Perl/Lua (#3512)

# Perl
- Add `$mob->GetMobTypeIdentifier()`.

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

# Notes
- Gets unique identifier independent of mob type.
This commit is contained in:
Alex King
2023-07-28 00:16:41 -04:00
committed by GitHub
parent 0dbcf83a11
commit 8c4cd34e01
3 changed files with 14 additions and 0 deletions
+7
View File
@@ -3133,6 +3133,12 @@ bool Lua_Mob::IsTemporaryPet()
return self->IsTempPet();
}
uint32 Lua_Mob::GetMobTypeIdentifier()
{
Lua_Safe_Call_Int();
return self->GetMobTypeIdentifier();
}
luabind::scope lua_register_mob() {
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
.def(luabind::constructor<>())
@@ -3429,6 +3435,7 @@ luabind::scope lua_register_mob() {
.def("GetMeleeDamageMod_SE", &Lua_Mob::GetMeleeDamageMod_SE)
.def("GetMeleeMinDamageMod_SE", &Lua_Mob::GetMeleeMinDamageMod_SE)
.def("GetMeleeMitigation", (int32(Lua_Mob::*)(void))&Lua_Mob::GetMeleeMitigation)
.def("GetMobTypeIdentifier", (uint32(Lua_Mob::*)(void))&Lua_Mob::GetMobTypeIdentifier)
.def("GetModSkillDmgTaken", (int(Lua_Mob::*)(int))&Lua_Mob::GetModSkillDmgTaken)
.def("GetModVulnerability", (int(Lua_Mob::*)(int))&Lua_Mob::GetModVulnerability)
.def("GetNPCTypeID", &Lua_Mob::GetNPCTypeID)