Exemplo n.º 1
0
 public Extension(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Id);
     }
     if (data.Length > 1)
     {
         int.TryParse(data[1].Trim(), out NeedLv);
     }
     if (data.Length > 2)
     {
         int.TryParse(data[2].Trim(), out ExtensionLv);
     }
     UpgradeCost = new MoneyCls(data[3].Split(','));
     if (data.Length > 4)
     {
         int.TryParse(data[4].Trim(), out ClerkAddtion);
     }
     if (data.Length > 5)
     {
         int.TryParse(data[5].Trim(), out CustomerAddtion);
     }
     if (data.Length > 6)
     {
         int.TryParse(data[6].Trim(), out Income);
     }
 }
Exemplo n.º 2
0
 public BuildingLevel(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Id);
     }
     if (data.Length > 1)
     {
         int.TryParse(data[1].Trim(), out Popularity);
     }
     UpgradeCost = new MoneyCls(data[2].Split(','));
     if (data.Length > 3)
     {
         int.TryParse(data[3].Trim(), out CustomerAddtion);
     }
     if (data.Length > 4)
     {
         int.TryParse(data[4].Trim(), out ClerkNums);
     }
     if (data.Length > 5)
     {
         int.TryParse(data[5].Trim(), out PropagandaCost);
     }
     RandomNumber = new RandomNumberCls(data[6].Split(','));
     if (data.Length > 7)
     {
         int.TryParse(data[7].Trim(), out NeedStrength);
     }
     DismantleCost = new MoneyCls(data[8].Split(','));
     if (data.Length > 9)
     {
         int.TryParse(data[9].Trim(), out Income);
     }
 }
Exemplo n.º 3
0
 public Building(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Id);
     }
     Icon = data.Length <= 1 + 1 ? "" : data[1];
     Name = data.Length <= 2 + 1 ? "" : data[2];
     if (data.Length > 3)
     {
         int.TryParse(data[3].Trim(), out Type);
     }
     BuildingCost = new MoneyCls(data[4].Split(','));
     DestoryCost  = new MoneyCls(data[5].Split(','));
     if (data.Length > 6)
     {
         int.TryParse(data[6].Trim(), out Income);
     }
 }
Exemplo n.º 4
0
 public Room(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Key);
     }
     Name  = data.Length <= 1 + 1 ? "" : data[1];
     Icon  = data.Length <= 2 + 1 ? "" : data[2];
     Model = data.Length <= 3 + 1 ? "" : data[3];
     Cost  = new MoneyCls(data[4].Split(','));
     if (data.Length > 5)
     {
         int.TryParse(data[5].Trim(), out Status);
     }
     {
         Furniture = new List <FurnitureCls>();
         var sps = data[6].Split(';');
         for (int i = 0; i < sps.Length; i++)
         {
             Furniture.Add(new FurnitureCls(sps[i].Split(',')));
         }
     }
 }
Exemplo n.º 5
0
 public Avatar(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Id);
     }
     Name = data.Length <= 1 + 1 ? "" : data[1];
     Icon = data.Length <= 2 + 1 ? "" : data[2];
     if (data.Length > 3)
     {
         int.TryParse(data[3].Trim(), out Sex);
     }
     if (data.Length > 4)
     {
         int.TryParse(data[4].Trim(), out Parts);
     }
     AvatarName = data.Length <= 5 + 1 ? "" : data[5];
     if (data.Length > 6)
     {
         int.TryParse(data[6].Trim(), out Level);
     }
     Cost = new MoneyCls(data[7].Split(','));
     Sell = new MoneyCls(data[8].Split(','));
     if (data.Length > 9)
     {
         int.TryParse(data[9].Trim(), out Status);
     }
     {
         Attribute = new List <AttributeCls>();
         var sps = data[10].Split(';');
         for (int i = 0; i < sps.Length; i++)
         {
             Attribute.Add(new AttributeCls(sps[i].Split(',')));
         }
     }
 }
Exemplo n.º 6
0
 public Item(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Id);
     }
     Name = data.Length <= 1 + 1 ? "" : data[1];
     Icon = data.Length <= 2 + 1 ? "" : data[2];
     if (data.Length > 3)
     {
         int.TryParse(data[3].Trim(), out Kind);
     }
     if (data.Length > 4)
     {
         int.TryParse(data[4].Trim(), out Type);
     }
     if (data.Length > 5)
     {
         int.TryParse(data[5].Trim(), out Sex);
     }
     {
         Parts = new List <int>();
         var strd = data[6];
         if (!string.IsNullOrEmpty(strd))
         {
             var sps = strd.Split(',');
             for (int i = 0; i < sps.Length; i++)
             {
                 var v = 0;
                 if (sps.Length > i)
                 {
                     int.TryParse(sps[i].Trim(), out v);
                 }
                 Parts.Add(v);
             }
         }
     }
     Avatar = data.Length <= 7 + 1 ? "" : data[7];
     if (data.Length > 8)
     {
         int.TryParse(data[8].Trim(), out Level);
     }
     if (data.Length > 9)
     {
         int.TryParse(data[9].Trim(), out Count);
     }
     Cost = new MoneyCls(data[10].Split(','));
     Sell = new MoneyCls(data[11].Split(','));
     {
         UseEffet = new List <UseEffetCls>();
         var sps = data[12].Split(';');
         for (int i = 0; i < sps.Length; i++)
         {
             UseEffet.Add(new UseEffetCls(sps[i].Split(',')));
         }
     }
     if (data.Length > 13)
     {
         int.TryParse(data[13].Trim(), out Status);
     }
     if (data.Length > 14)
     {
         int.TryParse(data[14].Trim(), out Superposition);
     }
     {
         Attribute = new List <AttributeCls>();
         var sps = data[15].Split(';');
         for (int i = 0; i < sps.Length; i++)
         {
             Attribute.Add(new AttributeCls(sps[i].Split(',')));
         }
     }
     Desc = data.Length <= 16 + 1 ? "" : data[16];
 }
Exemplo n.º 7
0
 public DepartmentInfo(string[] data)
 {
     if (data.Length > 0)
     {
         int.TryParse(data[0].Trim(), out Id);
     }
     Name = data.Length <= 1 + 1 ? "" : data[1];
     if (data.Length > 2)
     {
         int.TryParse(data[2].Trim(), out level);
     }
     if (data.Length > 3)
     {
         int.TryParse(data[3].Trim(), out CompanyLv);
     }
     if (data.Length > 4)
     {
         int.TryParse(data[4].Trim(), out DirectorCounts);
     }
     CostGold = new MoneyCls(data[5].Split(','));
     if (data.Length > 6)
     {
         int.TryParse(data[6].Trim(), out StaffLimit);
     }
     if (data.Length > 7)
     {
         int.TryParse(data[7].Trim(), out TalentLvLimit);
     }
     if (data.Length > 8)
     {
         int.TryParse(data[8].Trim(), out RealestateLimit);
     }
     if (data.Length > 9)
     {
         int.TryParse(data[9].Trim(), out StoreLimit);
     }
     if (data.Length > 10)
     {
         int.TryParse(data[10].Trim(), out ExtensionLimit);
     }
     if (data.Length > 11)
     {
         float.TryParse(data[11].Trim(), out StoreAddtion);
     }
     if (data.Length > 12)
     {
         int.TryParse(data[12].Trim(), out PropagandaCounts);
     }
     if (data.Length > 13)
     {
         int.TryParse(data[13].Trim(), out StrategicCounts);
     }
     if (data.Length > 14)
     {
         int.TryParse(data[14].Trim(), out PurchaseCounts);
     }
     if (data.Length > 15)
     {
         int.TryParse(data[15].Trim(), out loanLvLimit);
     }
     if (data.Length > 16)
     {
         int.TryParse(data[16].Trim(), out MakerCoinCounts);
     }
     if (data.Length > 17)
     {
         int.TryParse(data[17].Trim(), out Income);
     }
     Icon = data.Length <= 18 + 1 ? "" : data[18];
 }