[Quest API] Add GetDefaultRaceSize() to Perl/Lua (#2993)

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

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

# Notes
- Allows operators to get the default race size of a race if they want to use it in a script.
This commit is contained in:
Alex King
2023-02-26 21:35:03 -05:00
committed by GitHub
parent d2c3c14ae0
commit ff4ccfa98f
3 changed files with 13 additions and 0 deletions
+6
View File
@@ -2823,6 +2823,11 @@ Lua_HateList Lua_Mob::GetHateListBots(uint32 distance) {
return ret;
}
float Lua_Mob::GetDefaultRaceSize() {
Lua_Safe_Call_Real();
return self->GetDefaultRaceSize();
}
luabind::scope lua_register_mob() {
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
.def(luabind::constructor<>())
@@ -3022,6 +3027,7 @@ luabind::scope lua_register_mob() {
.def("GetDEX", &Lua_Mob::GetDEX)
.def("GetDR", &Lua_Mob::GetDR)
.def("GetDamageAmount", (uint32(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetDamageAmount)
.def("GetDefaultRaceSize", &Lua_Mob::GetDefaultRaceSize)
.def("GetDeity", &Lua_Mob::GetDeity)
.def("GetDisplayAC", &Lua_Mob::GetDisplayAC)
.def("GetDrakkinDetails", &Lua_Mob::GetDrakkinDetails)