Add new zone methods to Perl/Lua.

This commit is contained in:
Alex
2020-06-21 01:15:29 -04:00
parent 64b56bd746
commit 1ae077ea8f
4 changed files with 123 additions and 0 deletions
+15
View File
@@ -1146,6 +1146,18 @@ Lua_EntityList lua_get_entity_list() {
return Lua_EntityList(&entity_list);
}
void lua_zone(const char* zone_name) {
quest_manager.Zone(zone_name);
}
void lua_zone_group(const char* zone_name) {
quest_manager.ZoneGroup(zone_name);
}
void lua_zone_raid(const char* zone_name) {
quest_manager.ZoneRaid(zone_name);
}
int lua_get_zone_id() {
if(!zone)
return 0;
@@ -1893,6 +1905,9 @@ luabind::scope lua_register_general() {
luabind::def("get_qglobals", (luabind::adl::object(*)(lua_State*,Lua_NPC))&lua_get_qglobals),
luabind::def("get_qglobals", (luabind::adl::object(*)(lua_State*))&lua_get_qglobals),
luabind::def("get_entity_list", &lua_get_entity_list),
luabind::def("zone", &lua_zone),
luabind::def("zone_group", &lua_zone_group),
luabind::def("zone_raid", &lua_zone_raid),
luabind::def("get_zone_id", &lua_get_zone_id),
luabind::def("get_zone_long_name", &lua_get_zone_long_name),
luabind::def("get_zone_short_name", &lua_get_zone_short_name),