示例#1
0
        public override void Read(ref Packet p)
        {
            Slot  = p.ReadInt();
            Lv    = p.ReadInt();
            Grade = (eGrade)p.ReadInt();
            Parts = (eParts)p.ReadInt();
            Code  = p.ReadInt();

            Equip = p.ReadBool();


            if (null == BaseOpt)
            {
                BaseOpt = new List <rdOption>();
            }
            BaseOpt.Read(ref p);

            if (null == AddOpts)
            {
                AddOpts = new List <rdOption>();
            }
            AddOpts.Read(ref p);

            //Ancient = p.ReadBool();
            Beyond = (eBeyond)p.ReadInt();
        }
示例#2
0
        //public bool Ancient { get; set; }

        public override void Write(ref Packet p)
        {
            p.WriteInt(Slot);
            p.WriteInt(Lv);
            p.WriteInt((int)Grade);
            p.WriteInt((int)Parts);
            p.WriteInt(Code);

            p.WriteBool(Equip);

            if (null == BaseOpt)
            {
                BaseOpt = new List <rdOption>();
            }
            BaseOpt.Write(ref p);

            if (null == AddOpts)
            {
                AddOpts = new List <rdOption>();
            }
            AddOpts.Write(ref p);

            //p.WriteBool(Ancient);
            p.WriteInt((int)Beyond);
        }