Esempio n. 1
0
 public void Read(ByteArray by)
 {
     mail_idx    = by.ReadLong();
     mail_type   = (eMailType)by.ReadByte();
     sender_idx  = by.ReadLong();
     sender_name = by.ReadString();
     send_time   = by.ReadLong();
     expire_time = by.ReadInt();
     flags       = by.ReadUInt();
     subject     = by.ReadString();
 }
Esempio n. 2
0
        public void Read(ByteArray by)
        {
            subject = by.ReadString();
            content = by.ReadString();
            ushort count = by.ReadUShort();

            for (int i = 0; i < count; ++i)
            {
                ItemID obj = new ItemID();
                obj.Read(by);
                this.Add(obj);
            }
        }
Esempio n. 3
0
 public void Read(ByteArray by)
 {
     mail_idx      = by.ReadLong();
     mail_type     = (eMailType)by.ReadByte();
     spid          = by.ReadUShort();
     receiver_idx  = by.ReadLong();
     sender_idx    = by.ReadLong();
     sender_name   = by.ReadString();
     send_time     = by.ReadLong();
     expire_time   = by.ReadInt();
     delivery_time = by.ReadInt();
     flags         = by.ReadUInt();
     subject       = by.ReadString();
     bin_mail_content.Read(by);
 }
Esempio n. 4
0
 public void Read(ByteArray by)
 {
     char_idx         = by.ReadLong();
     account_index    = by.ReadLong();
     spid             = by.ReadUShort();
     char_name        = by.ReadString();
     char_type        = by.ReadByte();
     ws_id            = by.ReadUShort();
     ss_id            = by.ReadUShort();
     fs_id            = by.ReadUShort();
     pos_x            = by.ReadInt();
     pos_y            = by.ReadInt();
     scene_type_idx   = by.ReadUInt();
     scene_obj_idx    = by.ReadLong();
     flags            = by.ReadUInt();
     model_idx        = by.ReadUInt();
     job              = by.ReadByte();
     level            = by.ReadUShort();
     exp              = by.ReadUInt();
     energy           = by.ReadUInt();
     gold             = by.ReadUInt();
     coin             = by.ReadUInt();
     hp               = by.ReadUInt();
     hp_max           = by.ReadUInt();
     hurt             = by.ReadUInt();
     range            = by.ReadUInt();
     run_speed        = by.ReadUInt();
     vip_grade        = by.ReadUInt();
     vip_flags        = by.ReadUInt();
     time_last_login  = by.ReadLong();
     time_last_logout = by.ReadLong();
 }
Esempio n. 5
0
        public ushort level;        // 角色等级

        public void Read(ByteArray by)
        {
            char_idx  = by.ReadLong();
            char_name = by.ReadString();
            char_type = by.ReadByte();
            level     = by.ReadUShort();
        }
 public void Read(ByteArray by)
 {
     char_idx  = by.ReadLong();
     char_name = by.ReadString();
     char_type = by.ReadByte();
     spid      = by.ReadUShort();
     ws_id     = by.ReadUShort();
     ss_id     = by.ReadUShort();
     fs_id     = by.ReadUShort();
 }
Esempio n. 7
0
        public string           char_name; //根据名称
        public void Read(ByteArray by)
        {
            type = (eRelationAddType)(by.ReadByte());
            switch (type)
            {
            case eRelationAddType.Idx: char_idx = by.ReadLong(); break;

            case eRelationAddType.Name: char_name = by.ReadString(); break;
            }
        }
        public string       char_name; //按名字

        public void Read(ByteArray by)
        {
            type = (eIdxNameType)by.ReadByte();
            if (type == eIdxNameType.CHARID)
            {
                char_idx = by.ReadLong();
            }
            else
            {
                char_name = by.ReadString();
            }
        }
Esempio n. 9
0
            public void Read(ByteArray by)
            {
                type = (eUnitModType)by.ReadUShort();
                switch (type)
                {
                case eUnitModType.UMT_char_name:
                    value_str = by.ReadString();
                    break;

                default:
                    value_i = by.ReadLong();
                    break;
                }
            }
Esempio n. 10
0
 public void Read(ByteArray by)
 {
     char_idx  = by.ReadLong();
     spid      = by.ReadUShort();
     char_name = by.ReadString();
     char_type = by.ReadByte();
     ws_id     = by.ReadUShort();
     flags     = by.ReadUInt();
     model_idx = by.ReadUInt();
     job       = by.ReadByte();
     level     = by.ReadUShort();
     exp       = by.ReadUInt();
     gold      = by.ReadUInt();
     coin      = by.ReadUInt();
     vip_grade = by.ReadUInt();
 }
Esempio n. 11
0
        public uint vip_grade;      // vip等级

        public void Read(ByteArray by)
        {
            int start_pos = by.Head;

            char_idx  = by.ReadLong();
            spid      = by.ReadUShort();
            char_name = by.ReadString();
            char_type = by.ReadByte();
            ws_id     = by.ReadUShort();
            flags     = (eRelationFlag)by.ReadByte();
            model_idx = by.ReadUInt();
            job       = by.ReadByte();
            level     = by.ReadUShort();
            exp       = by.ReadUInt();
            gold      = by.ReadUInt();
            coin      = by.ReadUInt();
            vip_grade = by.ReadUInt();
            by.SetHead(start_pos + 200);//每个关系预留200字节,方便后期版本兼容
        }
Esempio n. 12
0
 public void Read(ByteArray by)
 {
     char_idx  = by.ReadLong();
     char_name = by.ReadString();
     char_type = by.ReadByte();
     flags     = by.ReadUInt();
     model_idx = by.ReadUInt();
     job       = by.ReadByte();
     level     = by.ReadUShort();
     exp       = by.ReadUInt();
     energy    = by.ReadUInt();
     gold      = by.ReadUInt();
     coin      = by.ReadUInt();
     hp        = by.ReadUInt();
     hp_max    = by.ReadUInt();
     hurt      = by.ReadUInt();
     range     = by.ReadUInt();
     run_speed = by.ReadUInt();
     vip_grade = by.ReadUInt();
     vip_flags = by.ReadUInt();
 }
Esempio n. 13
0
        public string             content; //内容

        public void Read(ByteArray by)
        {
            receiver.Read(by);
            subject = by.ReadString();
            content = by.ReadString();
        }
        public string char_name;    //名字

        public void Read(ByteArray by)
        {
            char_idx  = by.ReadLong();
            char_name = by.ReadString();
        }
Esempio n. 15
0
 public void Read(ByteArray by)
 {
     data = by.ReadString();
 }
Esempio n. 16
0
 public string name;//军团名称
 public void Read(ByteArray by)
 {
     name = by.ReadString();
 }
Esempio n. 17
0
        /// <summary>
        /// 显示查询结果
        /// </summary>
        private void ShowQueryResult(QueryInfo query_info, ByteArray by)
        {
            if (by.Available == 0)
            {
                m_query_info = null;
                MessageBox.Show("查询数据为空", "信息", MessageBoxButtons.OK);
                return;
            }
            m_query_info = query_info;

            int total_length_one_row = 0;

            foreach (var bin_header in m_list_bin_header)
            {
                switch (bin_header.type)
                {
                case "int":
                case "uint":
                    total_length_one_row += bin_header.length;
                    break;

                case "float": total_length_one_row += 4; break;

                case "double": total_length_one_row += 8; break;

                case "string": /**undo*/; break;

                default: continue;
                }
            }

            ///解析
            m_list_bin_contentes.Clear();
            while (by.Available > 0)
            {
                if ((query_info.fixed_length > 0 && by.Available < query_info.fixed_length) || (by.Available < total_length_one_row))
                {
                    MessageBox.Show("数据异常,长度不够", "警告", MessageBoxButtons.OK);
                    break;
                }

                int start_pos = by.Head;

                List <BinContent> list = new List <BinContent>();
                foreach (var bin_header in m_list_bin_header)
                {
                    string value  = "";
                    byte[] by_val = new byte[8];
                    switch (bin_header.type)
                    {
                    case "int": by.Read(ref by_val, bin_header.length); value = BitConverter.ToInt64(by_val, 0).ToString(); break;

                    case "uint": by.Read(ref by_val, bin_header.length); value = BitConverter.ToUInt64(by_val, 0).ToString(); break;

                    case "float": value = by.ReadFloat().ToString(); break;

                    case "double": value = by.ReadDouble().ToString(); break;

                    case "string": value = by.ReadString(); break;

                    default: continue;
                    }
                    list.Add(new BinContent(bin_header.type, value));
                }
                m_list_bin_contentes.Add(list);

                if (query_info.fixed_length > 0)
                {
                    by.SetHead(start_pos + query_info.fixed_length);
                }
            }

            ///显示数据
            m_find_result.Rows.Clear();
            for (int row = 0; row < m_list_bin_contentes.Count; ++row)
            {
                int index = this.m_find_result.Rows.Add();
                List <BinContent> list = m_list_bin_contentes[row];
                for (int col = 0; col < list.Count; col++)
                {
                    m_find_result.Rows[index].Cells[col].Value = list[col].value;
                }
            }
        }
Esempio n. 18
0
 public void Read(ByteArray by)
 {
     char_name = by.ReadString();
     item_id.Read(by);
 }
Esempio n. 19
0
 public void Read(ByteArray by)
 {
     content = by.ReadString();
 }
Esempio n. 20
0
            public eRelationFlag flag; //关系方式

            public void Read(ByteArray by)
            {
                char_name = by.ReadString();
                message   = by.ReadString();
                flag      = (eRelationFlag)by.ReadByte();
            }