Пример #1
0
 public UpdateField(string name, long pos, long total, UpdateFieldType type, UpdatafieldFlags flags)
 {
     Name  = name;
     Pos   = pos;
     Total = total;
     Type  = type;
     Flags = flags;
 }
Пример #2
0
 public UpdateField(string name, long pos, long total, UpdateFieldType type, UpdatafieldFlags flags)
 {
     Name = name;
     Pos = pos;
     Total = total;
     Type = type;
     Flags = flags;
 }
Пример #3
0
        private static int FillList()
        {
            int i = 0;

            string old_s = String.Empty;
            string s     = String.Empty;

            gr.BaseStream.Position = start_ofs;

            do
            {
                uint p1 = gr.ReadUInt32();

                if (p1 < 0x9999)
                {
                    p1 = gr.ReadUInt32();
                }
                uint p2 = gr.ReadUInt32();
                uint p3 = gr.ReadUInt32();
                uint p4 = gr.ReadUInt32();
                uint p5 = gr.ReadUInt32();

                str_ofs = p1 - str_ofs_delta;

                long oldpos = gr.BaseStream.Position;
                gr.BaseStream.Position = str_ofs;

                s = gr.ReadStringNull();
                gr.BaseStream.Position = oldpos;

                StringBuilder sb = new StringBuilder();
                sb.Append("Size: ");
                sb.Append(p3);
                sb.Append(", Type: ");
                UpdateFieldType type = (UpdateFieldType)p4;
                sb.Append(type);
                sb.Append(", Flags: ");
                UpdatafieldFlags flags = (UpdatafieldFlags)p5;
                sb.Append(flags);

                UpdateField uf = new UpdateField(s, p2, p3, sb.ToString());
                list.Add(uf);

                if (!old_s.Equals("CORPSE_FIELD_PAD") && s.Equals("CORPSE_FIELD_PAD"))
                {
                    break;
                }

                old_s = s;

                i++;
            } while (true);

            return(i);
        }