Added getcharnamebyid(char_id) to Perl/Lua.

This commit is contained in:
Alex
2020-04-05 21:11:21 -04:00
parent 3c71e2c91d
commit ae959be5ac
6 changed files with 49 additions and 0 deletions
+5
View File
@@ -870,6 +870,10 @@ bool lua_delete_data(std::string bucket_key) {
return DataBucket::DeleteData(bucket_key);
}
const char *lua_get_char_name_by_id(uint32 char_id) {
return database.GetCharNameByID(char_id);
}
const char *lua_get_guild_name_by_id(uint32 guild_id) {
return quest_manager.getguildnamebyid(guild_id);
}
@@ -1763,6 +1767,7 @@ luabind::scope lua_register_general() {
luabind::def("set_data", (void(*)(std::string, std::string))&lua_set_data),
luabind::def("set_data", (void(*)(std::string, std::string, std::string))&lua_set_data),
luabind::def("delete_data", (bool(*)(std::string))&lua_delete_data),
luabind::def("get_char_name_by_id", &lua_get_char_name_by_id),
luabind::def("get_guild_name_by_id", &lua_get_guild_name_by_id),
luabind::def("get_guild_id_by_char_id", &lua_get_guild_id_by_char_id),
luabind::def("get_group_id_by_char_id", &lua_get_group_id_by_char_id),