game_client.game_listclient
简介
基于client engine实现的对接目录服服务器的功能模块
组件接口
game_listclient.gs
基于client engine层实现的对接目录服务器的功能模块
本模块相关的必要配置:
a. 目录服务器配置(通过cfg.get_config("list_server")读取);
函数原型 | 函数作用 |
---|---|
bool setup(map para = ) | 本模块初始化 |
array list_account_servers(string account_id) | 列出账号在哪些服务器上 |
array list_recommend_servers() | 列出推荐服务器列表 |
array list_visible_servers(map filter_dict = ) | 列出可见服务器列表 |
array query_account(string account_id, string server_id) | 查询在指定服务器上指定账号的角色列表 |
array query_server(string server_id) | 查询指定服务器的信息 |
样例
public void pkg_sample()
{
import pkg.game_client.game_listclient;
map para = {};
if (! game_listclient.setup(para))
return;
dispatch_co(() {
let bool success, mixed result = game_listclient.list_recommend_servers();
if (! success)
// 操作未成功
return;
printf("result=%O\n", result);
})
}