protected override void ReadLine(BinaryReader reader)
 {
     OpenSystemTable.RowData rowData = new OpenSystemTable.RowData();
     base.Read <int>(reader, ref rowData.TaskID, CVSReader.intParse);
     this.columnno = 0;
     base.Read <int>(reader, ref rowData.PlayerLevel, CVSReader.intParse);
     this.columnno = 1;
     base.Read <int>(reader, ref rowData.SystemID, CVSReader.intParse);
     this.columnno = 2;
     base.Read <int>(reader, ref rowData.NewbieGuideID, CVSReader.intParse);
     this.columnno = 3;
     base.Read <string>(reader, ref rowData.SystemDescription, CVSReader.stringParse);
     this.columnno = 4;
     base.Read <string>(reader, ref rowData.Icon, CVSReader.stringParse);
     this.columnno = 5;
     base.Read <int>(reader, ref rowData.Priority, CVSReader.intParse);
     this.columnno = 6;
     base.ReadArray <int>(reader, ref rowData.TitanItems, CVSReader.intParse);
     this.columnno = 7;
     base.ReadArray <uint>(reader, ref rowData.NoRedPointLevel, CVSReader.uintParse);
     this.columnno = 8;
     base.ReadSeqList <uint>(reader, ref rowData.Reward, CVSReader.uintParse);
     this.columnno = 9;
     base.Read <int>(reader, ref rowData.FatherID, CVSReader.intParse);
     this.columnno = 10;
     base.Read <uint>(reader, ref rowData.OpenDay, CVSReader.uintParse);
     this.columnno = 11;
     base.Read(reader, ref rowData.IsOpen);
     this.columnno = 12;
     this.AddRowSystemID(rowData.SystemID, rowData, 0, this.Table.Count - 1);
     this.columnno = -1;
 }
        private OpenSystemTable.RowData BinarySearchSystemID(int key, int min, int max)
        {
            OpenSystemTable.RowData rowData = this.Table[min];
            if (rowData.SystemID == key)
            {
                return(rowData);
            }
            OpenSystemTable.RowData rowData2 = this.Table[max];
            if (rowData2.SystemID == key)
            {
                return(rowData2);
            }
            if (max - min <= 1)
            {
                return(null);
            }
            int num = min + (max - min) / 2;

            OpenSystemTable.RowData rowData3 = this.Table[num];
            if (rowData3.SystemID.CompareTo(key) > 0)
            {
                return(this.BinarySearchSystemID(key, min, num));
            }
            if (rowData3.SystemID.CompareTo(key) < 0)
            {
                return(this.BinarySearchSystemID(key, num, max));
            }
            return(rowData3);
        }
 protected override bool OnLine(string[] Fields)
 {
     OpenSystemTable.RowData rowData = new OpenSystemTable.RowData();
     if (!base.Parse(Fields[this.ColMap[0]], ref rowData.TaskID))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[1]], ref rowData.PlayerLevel))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[2]], ref rowData.SystemID))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[3]], ref rowData.NewbieGuideID))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[4]], ref rowData.SystemDescription))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[5]], ref rowData.Icon))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[6]], ref rowData.Priority))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[7]], ref rowData.TitanItems))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[8]], ref rowData.NoRedPointLevel))
     {
         return(false);
     }
     if (!base.Parse <uint>(Fields[this.ColMap[9]], ref rowData.Reward, CVSReader.uintParse, "2U"))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[10]], ref rowData.FatherID))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[11]], ref rowData.OpenDay))
     {
         return(false);
     }
     if (!base.Parse(Fields[this.ColMap[12]], ref rowData.IsOpen))
     {
         return(false);
     }
     this.AddRowSystemID(rowData.SystemID, rowData, 0, this.Table.Count - 1);
     return(true);
 }
        private void AddRowSystemID(int key, OpenSystemTable.RowData row, int min, int max)
        {
            if (this.Table.Count == 0)
            {
                this.Table.Add(row);
                return;
            }
            OpenSystemTable.RowData rowData = this.Table[min];
            if (rowData.SystemID.CompareTo(key) > 0)
            {
                this.Table.Insert(min, row);
                return;
            }
            if (rowData.SystemID == key)
            {
                XSingleton <XDebug> .singleton.AddErrorLog2("Table: OpenSystemTable duplicate id:{0}  lineno: {1}", new object[]
                {
                    key,
                    this.lineno
                });

                return;
            }
            OpenSystemTable.RowData rowData2 = this.Table[max];
            if (rowData2.SystemID.CompareTo(key) < 0)
            {
                this.Table.Insert(max + 1, row);
                return;
            }
            if (rowData2.SystemID == key)
            {
                XSingleton <XDebug> .singleton.AddErrorLog2("Table: OpenSystemTable duplicate id:{0}  lineno: {1}", new object[]
                {
                    key,
                    this.lineno
                });

                return;
            }
            if (max - min <= 1)
            {
                this.Table.Insert(min + 1, row);
                return;
            }
            int num = min + (max - min) / 2;

            OpenSystemTable.RowData rowData3 = this.Table[num];
            if (rowData3.SystemID.CompareTo(key) > 0)
            {
                this.AddRowSystemID(key, row, min, num);
                return;
            }
            if (rowData3.SystemID.CompareTo(key) < 0)
            {
                this.AddRowSystemID(key, row, num, max);
                return;
            }
            XSingleton <XDebug> .singleton.AddErrorLog2("Table: OpenSystemTable duplicate id:{0}  lineno: {1}", new object[]
            {
                key,
                this.lineno
            });
        }