示例#1
0
        public static ObjectDef Read(NBufferReader reader)
        {
            ObjectDef ret;

            ret.ObjectType = reader.ReadUInt16();
            ret.Stats      = ObjectStats.Read(reader);
            return(ret);
        }
示例#2
0
        public static NewTickPacket Read(NBufferReader reader)
        {
            var ret = new NewTickPacket();

            ret.TickId   = reader.ReadUInt32();
            ret.TickTime = reader.ReadUInt32();

            ret.UpdateStats = new ObjectStats[reader.ReadUInt16()];
            for (var i = 0; i < ret.UpdateStats.Length; i++)
            {
                ret.UpdateStats[i] = ObjectStats.Read(reader);
            }

            return(ret);
        }