user_mgr
简介
玩家管理模块
组件接口
LoginD.gs
处理玩家登录登出逻辑
LoginQueueD.gs
登录队列,同时登录人数过多时排队
| 函数原型 | 函数作用 | 
|---|---|
| void enqueue(object login_ob, ...) | 某个连接开始排队,不等待 | 
| void priority_enqueue(object login_ob, LoginContext context, ...) | 投递优先登录处理请求 | 
| void smart_enqueue(LoginRequestBase login_request) | 投递自定义的处理请求 | 
| array dequeue(int seq) | 离开排队队列 | 
| int get_login_queue_size() | 获取还未处理完的登录请求队列长度 | 
| bool wait_until_queue_empty(int timeout = 60) | 等待队列处理完 | 
| void set_debug_login_pending_time(float t) | 设置调试登录延迟时间 | 
SystemD.gs
系统模块
auth.gs
认证模块
ldap.gs
提供ldap的相关接口
| 函数原型 | 函数作用 | 
|---|---|
| bool is_valid_account(string account) | 账号是否合法 | 
| bool exist_account(string account) | 是否为域账号 | 
Login.gs
登录对象,处理登录过程,支持排队逻辑
| 函数原型 | 函数作用 | 
|---|---|
| bool load_chars_in() | 载入账号对应的角色列表 | 
| array get_char_list() | 返回所有角色列表 | 
| string get_first_char() | 获取第一个角色 | 
| void set_login_seq(int seq) | 设置登录序号 | 
| void notify_login_queue_state(int handled_seq) | 通知当前登录队列状态(在登录队列中的位置) | 
User.gs
用户回话对象
| 函数原型 | 函数作用 | 
|---|---|
| object Session.unbind_connection() | 取消连接绑定 | 
| void Session.close_connection() | 关闭Session连接后自我处理 | 
| void on_login_ok() | 登陆完成执行函数 | 
| void drop_me() | 删除自己 | 
| void logout(function callback = nil) | 登出,真正析构用户对象 | 
| void user_log_online_duration(bool flag_clean = true) | 记录在 线时长日志 |