Skip to content

Commit

Permalink
- cache is now cleared after an update to avoid compatibility issues …
Browse files Browse the repository at this point in the history
…with old cache files

- fixed some typos in soulburn calculation
  • Loading branch information
Zarroc2762 committed Apr 18, 2020
1 parent 5df296f commit 9f5a0f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion E7 Gear Optimizer/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public Main()
Directory.CreateDirectory(Properties.Settings.Default.CacheDirectory);
}
//Read list of heroes from epicsevendb.com

string json = null;
string cacheFileName = Path.Combine(Properties.Settings.Default.CacheDirectory, "db.hero.json");
if (useCache && File.Exists(cacheFileName) && System.DateTime.Now.Subtract(File.GetLastWriteTime(cacheFileName)).TotalDays <= Properties.Settings.Default.CacheTimeToLive)
Expand Down Expand Up @@ -2134,6 +2134,7 @@ private void Main_FormClosing(object sender, FormClosingEventArgs e)
}
}
Properties.Settings.Default.Save();

}

private JObject createJson()
Expand Down Expand Up @@ -2409,6 +2410,7 @@ private void Main_Shown(object sender, EventArgs e)
config.AppSettings.Settings.Remove("Version");
config.AppSettings.Settings.Add("Version", Application.ProductVersion);
config.Save(ConfigurationSaveMode.Full);
B_ClearCache(null, null); //Clear Cache after update to avoid compatibility issues
}
}

Expand Down
2 changes: 1 addition & 1 deletion E7 Gear Optimizer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("2.8.3.0")]
[assembly: AssemblyFileVersion("2.8.4.0")]
4 changes: 2 additions & 2 deletions E7 Gear Optimizer/Skill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ public Skill(JObject jObject, int index, int enhanceLevel = 0)
HasSoulburn = jSkill["soul_requirement"]?.ToObject<int>() > 0;
if (HasSoulburn)
{
powSoul = (float)(jSkill["soul_pow"] ?? 0f);
atkSoul = (float)(jSkill["soul_att"] ?? 0f);
powSoul = (float)(jSkill["soul_pow"] ?? pow);
atkSoul = (float)(jSkill["soul_att_rate"] ?? atk);
}
}

Expand Down

0 comments on commit 9f5a0f4

Please # to comment.