Exemple #1
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);
            }
                                             );
        }
Exemple #2
0
        /// <summary>
        /// 角色列表
        /// </summary>
        private void OnEnumCharacter(PacketBase packet)
        {
            ss2db.EnumCharacter msg = packet as ss2db.EnumCharacter;

            InterServerID server_uid = msg.server_uid;
            ClientUID     client_uid = msg.client_uid;

            SQLCharHandle.QueryCharacterList(msg.account_idx, (data) =>
            {
                db2ss.EnumCharacter rep_msg = PacketPools.Get(db2ss.msg.ENUM_CHAR) as db2ss.EnumCharacter;
                rep_msg.server_uid          = server_uid;
                rep_msg.client_uid          = client_uid;
                foreach (var char_data in data)
                {
                    rep_msg.list.Add(char_data);
                }
                rep_msg.result = eEnumCharResult.E_SUCCESS;
                this.Send(rep_msg);
            }
                                             );
        }