Exemplo n.º 1
0
 /// <summary>
 /// 角色列表
 /// </summary>
 private void OnEnumCharacterList(ClientSession session, PacketBase packet)
 {
     gs2ss.EnumCharacter msg = PacketPools.Get(gs2ss.msg.ENUM_CHAR) as gs2ss.EnumCharacter;
     msg.client_uid  = session.client_uid;
     msg.account_idx = session.account_idx;
     msg.game_db_id  = session.db_id.game_id;
     ForServerNetManager.Instance.Send(session.ss_uid, msg);
 }
Exemplo n.º 2
0
        /// <summary>
        /// 角色列表
        /// </summary>
        private void OnEnumCharacterList(PacketBase packet)
        {
            gs2ss.EnumCharacter msg        = packet as gs2ss.EnumCharacter;
            ClientUID           client_uid = msg.client_uid;

            SQLCharHandle.QueryCharacterList(msg.account_idx, new DBID(msg.game_db_id), (data) =>
            {
                ss2c.EnumCharacter rep_msg = PacketPools.Get(ss2c.msg.ENUM_CHAR) as ss2c.EnumCharacter;
                foreach (var char_data in data)
                {
                    rep_msg.list.Add(char_data);
                }
                ServerNetManager.Instance.SendProxy(client_uid, rep_msg);
            }
                                             );
        }