Ejemplo n.º 1
0
 private void pathSelect_FormClosed(object sender, FormClosedEventArgs e)
 {
     this.config = JsonConvert.DeserializeObject<Config>(File.ReadAllText("config\\config.json"));
       this.getNames();
       this.BringToFront();
 }
Ejemplo n.º 2
0
 public void loadFiles()
 {
     this.config = JsonConvert.DeserializeObject<Config>(File.ReadAllText("config\\config.json"));
       if (this.config.mode != 2)
     this.config.mode = 1;
       this.inventRowIndex = this.config.inventStartRow - 1;
       this.inventColumnIndex = this.config.inventStartColumn - 1;
       this.oldAttDist = this.config.attackDist;
       this.Text = "tbp v" + this.version + " " + this.config.client;
       if (File.Exists("paths\\standard paths\\" + this.config.sPathName + ".json") && JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\standard paths\\" + this.config.sPathName + ".json")) != null)
       {
     this.sNodeList = JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\standard paths\\" + this.config.sPathName + ".json"));
     foreach (Entity entity in this.sNodeList)
     {
       if (entity.type == 2)
     this.roamNodesList.Add(entity);
     }
       }
       if (File.Exists("paths\\standard paths\\deadzones\\" + this.config.sPathName + " DeadZones.json") && JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\standard paths\\deadzones\\" + this.config.sPathName + " DeadZones.json")) != null)
     this.deadZonesList = JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\standard paths\\deadzones\\" + this.config.sPathName + " DeadZones.json"));
       if (File.Exists("paths\\standard paths\\safezones\\" + this.config.sPathName + " SafeZones.json") && JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\standard paths\\safezones\\" + this.config.sPathName + " SafeZones.json")) != null)
     this.safeZonesList = JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\standard paths\\safezones\\" + this.config.sPathName + " SafeZones.json"));
       if (File.Exists("paths\\res paths\\" + this.config.rPathName + ".json") && JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\res paths\\" + this.config.rPathName + ".json")) != null)
     this.rNodeList = JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\res paths\\" + this.config.rPathName + ".json"));
       if (File.Exists("paths\\vendor paths\\" + this.config.vPathName + ".json") && JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\vendor paths\\" + this.config.vPathName + ".json")) != null)
     this.vNodeList = JsonConvert.DeserializeObject<List<Entity>>(File.ReadAllText("paths\\vendor paths\\" + this.config.vPathName + ".json"));
       if (File.Exists("profiles\\" + this.config.profileName + ".json") && JsonConvert.DeserializeObject<List<Command>>(File.ReadAllText("profiles\\" + this.config.profileName + ".json")) != null)
     this.commandList = JsonConvert.DeserializeObject<List<Command>>(File.ReadAllText("profiles\\" + this.config.profileName + ".json"));
       if (File.Exists("config\\gatherWhiteList.json") && JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\gatherWhiteList.json")) != null)
     this.gatherWhiteList = JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\gatherWhiteList.json"));
       if (File.Exists("config\\mobExcludeList.json") && JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\mobExcludeList.json")) != null)
     this.mobFilterList = JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\mobExcludeList.json"));
       if (File.Exists("config\\pickupList.json") && JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\pickupList.json")) != null)
     this.pickupFilterList = JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\pickupList.json"));
       if (!File.Exists("config\\gatherBlackList.json") || JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\gatherBlackList.json")) == null)
     return;
       this.gatherBlackList = JsonConvert.DeserializeObject<List<string>>(File.ReadAllText("config\\gatherBlackList.json"));
 }