[Quest API] Add new zone name methods to Perl and Lua. (#1309)

- Add quest::GetZoneShortName(zone_id) to Perl.
- Add quest::GetZoneLongNameByID(zone_id) to Perl.
- Add eq.get_zone_id_by_name(zone_name) to Lua.
- Add eq.get_zone_short_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_name(zone_name) to Lua.
This commit is contained in:
Alex
2021-03-28 21:25:50 -04:00
committed by GitHub
parent ba64d6f494
commit 97c11a1199
4 changed files with 65 additions and 3 deletions
+22
View File
@@ -1608,6 +1608,10 @@ int lua_get_zone_id() {
return zone->GetZoneID();
}
int lua_get_zone_id_by_name(const char* zone_name) {
return ZoneID(zone_name);
}
const char *lua_get_zone_long_name() {
if(!zone)
return "";
@@ -1615,6 +1619,16 @@ const char *lua_get_zone_long_name() {
return zone->GetLongName();
}
const char *lua_get_zone_long_name_by_name(const char* zone_name) {
return ZoneLongName(
ZoneID(zone_name)
);
}
const char *lua_get_zone_long_name_by_id(uint32 zone_id) {
return ZoneLongName(zone_id);
}
const char *lua_get_zone_short_name() {
if(!zone)
return "";
@@ -1622,6 +1636,10 @@ const char *lua_get_zone_short_name() {
return zone->GetShortName();
}
const char *lua_get_zone_short_name_by_id(uint32 zone_id) {
return ZoneName(zone_id);
}
int lua_get_zone_instance_id() {
if(!zone)
return 0;
@@ -2806,8 +2824,12 @@ luabind::scope lua_register_general() {
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_id_by_name", &lua_get_zone_id_by_name),
luabind::def("get_zone_long_name", &lua_get_zone_long_name),
luabind::def("get_zone_long_name_by_name", &lua_get_zone_long_name_by_name),
luabind::def("get_zone_long_name_by_id", &lua_get_zone_long_name_by_id),
luabind::def("get_zone_short_name", &lua_get_zone_short_name),
luabind::def("get_zone_short_name_by_id", &lua_get_zone_short_name_by_id),
luabind::def("get_zone_instance_id", &lua_get_zone_instance_id),
luabind::def("get_zone_instance_version", &lua_get_zone_instance_version),
luabind::def("get_zone_weather", &lua_get_zone_weather),