diff --git a/.gitignore b/.gitignore index 3e759b7..34fe2f3 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ x64/ x86/ bld/ [Bb]in/ +[Bb]uilds/ [Oo]bj/ [Ll]og/ diff --git a/CHANCING (Belt)/CHANCING (Belt).csproj b/CHANCING (Belt)/CHANCING (Belt).csproj new file mode 100644 index 0000000..4142e80 --- /dev/null +++ b/CHANCING (Belt)/CHANCING (Belt).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {30965CCD-46DF-47A3-BDBC-6FC0B0900B4E} + Library + Properties + CHANCING__Belt_ + CHANCING %28Belt%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Belt)/Generator.cs b/CHANCING (Belt)/Generator.cs new file mode 100644 index 0000000..b055d02 --- /dev/null +++ b/CHANCING (Belt)/Generator.cs @@ -0,0 +1,100 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Belt") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Belt)/Properties/AssemblyInfo.cs b/CHANCING (Belt)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b69d639 --- /dev/null +++ b/CHANCING (Belt)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Belt)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Belt)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("30965ccd-46df-47a3-bdbc-6fc0b0900b4e")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Belt)/packages.config b/CHANCING (Belt)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Belt)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CHANCING (Body)/CHANCING (Body).csproj b/CHANCING (Body)/CHANCING (Body).csproj new file mode 100644 index 0000000..13c4e3a --- /dev/null +++ b/CHANCING (Body)/CHANCING (Body).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {B4433CCE-879E-4061-9E18-518D473A39DC} + Library + Properties + chancing_body + CHANCING %28Body%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Body)/Generator.cs b/CHANCING (Body)/Generator.cs new file mode 100644 index 0000000..1b1fbe9 --- /dev/null +++ b/CHANCING (Body)/Generator.cs @@ -0,0 +1,101 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Body Armour") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Body)/Properties/AssemblyInfo.cs b/CHANCING (Body)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4596ef1 --- /dev/null +++ b/CHANCING (Body)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Body)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Body)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("b4433cce-879e-4061-9e18-518d473a39dc")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Body)/packages.config b/CHANCING (Body)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Body)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CHANCING (Boots)/CHANCING (Boots).csproj b/CHANCING (Boots)/CHANCING (Boots).csproj new file mode 100644 index 0000000..f56201c --- /dev/null +++ b/CHANCING (Boots)/CHANCING (Boots).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {BB8A89F2-5FD2-476C-8484-B01B60D70576} + Library + Properties + chancing_boot + CHANCING %28Boots%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Boots)/Generator.cs b/CHANCING (Boots)/Generator.cs new file mode 100644 index 0000000..1cdcc62 --- /dev/null +++ b/CHANCING (Boots)/Generator.cs @@ -0,0 +1,101 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Boots") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Boots)/Properties/AssemblyInfo.cs b/CHANCING (Boots)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..051bc4b --- /dev/null +++ b/CHANCING (Boots)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Boots)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Boots)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("bb8a89f2-5fd2-476c-8484-b01b60d70576")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Boots)/packages.config b/CHANCING (Boots)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Boots)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CHANCING (Gloves)/CHANCING (Gloves).csproj b/CHANCING (Gloves)/CHANCING (Gloves).csproj new file mode 100644 index 0000000..62eb619 --- /dev/null +++ b/CHANCING (Gloves)/CHANCING (Gloves).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {08A15B18-3572-4A15-8FEB-16933C1E34C2} + Library + Properties + CHANCING__Gloves_ + CHANCING %28Gloves%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Gloves)/Generator.cs b/CHANCING (Gloves)/Generator.cs new file mode 100644 index 0000000..0e3188c --- /dev/null +++ b/CHANCING (Gloves)/Generator.cs @@ -0,0 +1,101 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Gloves") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Gloves)/Properties/AssemblyInfo.cs b/CHANCING (Gloves)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d89597d --- /dev/null +++ b/CHANCING (Gloves)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Gloves)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Gloves)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("08a15b18-3572-4a15-8feb-16933c1e34c2")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Gloves)/packages.config b/CHANCING (Gloves)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Gloves)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CHANCING (Helmet)/CHANCING (Helmet).csproj b/CHANCING (Helmet)/CHANCING (Helmet).csproj new file mode 100644 index 0000000..c24a1c9 --- /dev/null +++ b/CHANCING (Helmet)/CHANCING (Helmet).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {F66DADB1-0E93-406F-AA8C-5FD93733455A} + Library + Properties + CHANCING__Helmet_ + CHANCING %28Helmet%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Helmet)/Generator.cs b/CHANCING (Helmet)/Generator.cs new file mode 100644 index 0000000..d192523 --- /dev/null +++ b/CHANCING (Helmet)/Generator.cs @@ -0,0 +1,101 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Helmet") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Helmet)/Properties/AssemblyInfo.cs b/CHANCING (Helmet)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a6df870 --- /dev/null +++ b/CHANCING (Helmet)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Helmet)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Helmet)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("f66dadb1-0e93-406f-aa8c-5fd93733455a")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Helmet)/packages.config b/CHANCING (Helmet)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Helmet)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CHANCING (Quiver)/CHANCING (Quiver).csproj b/CHANCING (Quiver)/CHANCING (Quiver).csproj new file mode 100644 index 0000000..de1f5be --- /dev/null +++ b/CHANCING (Quiver)/CHANCING (Quiver).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {EEAB1016-0C68-441C-9BED-58C00163BC3B} + Library + Properties + CHANCING__Quiver_ + CHANCING %28Quiver%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Quiver)/Generator.cs b/CHANCING (Quiver)/Generator.cs new file mode 100644 index 0000000..8116ade --- /dev/null +++ b/CHANCING (Quiver)/Generator.cs @@ -0,0 +1,101 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Quiver") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Quiver)/Properties/AssemblyInfo.cs b/CHANCING (Quiver)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..747faea --- /dev/null +++ b/CHANCING (Quiver)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Quiver)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Quiver)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("eeab1016-0c68-441c-9bed-58c00163bc3b")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Quiver)/packages.config b/CHANCING (Quiver)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Quiver)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/CHANCING (Shield)/CHANCING (Shield).csproj b/CHANCING (Shield)/CHANCING (Shield).csproj new file mode 100644 index 0000000..35f5dd0 --- /dev/null +++ b/CHANCING (Shield)/CHANCING (Shield).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {9530B929-416B-43FE-A1BA-FEEBFFB97575} + Library + Properties + CHANCING__Shield_ + CHANCING %28Shield%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CHANCING (Shield)/Generator.cs b/CHANCING (Shield)/Generator.cs new file mode 100644 index 0000000..4044a7c --- /dev/null +++ b/CHANCING (Shield)/Generator.cs @@ -0,0 +1,101 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class ChanceSparklineBody + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ChanceExplicitModifierBody + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class ChanceLineBody + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public ChanceSparklineBody sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class Theme + { + public string border { get; set; } + public string background { get; set; } + public string text { get; set; } + public int text_size { get; set; } + } + + public class ChanceRootBody + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + Theme jt = JsonConvert.DeserializeObject(File.ReadAllText("structure/Chancing.json", Encoding.UTF8)); + + List itemBase = new List(); + ChanceRootBody j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4 && ln.itemType == "Shield") + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= chanceMinValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Normal" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8); + } + } +} diff --git a/CHANCING (Shield)/Properties/AssemblyInfo.cs b/CHANCING (Shield)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d3d2127 --- /dev/null +++ b/CHANCING (Shield)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("CHANCING (Shield)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CHANCING (Shield)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("9530b929-416b-43fe-a1ba-feebffb97575")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CHANCING (Shield)/packages.config b/CHANCING (Shield)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/CHANCING (Shield)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/DIVINATION CARD (GEN)/DIVINATION CARD (GEN).csproj b/DIVINATION CARD (GEN)/DIVINATION CARD (GEN).csproj new file mode 100644 index 0000000..b04ca87 --- /dev/null +++ b/DIVINATION CARD (GEN)/DIVINATION CARD (GEN).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2} + Library + Properties + divination_card + DIVINATION CARD %28GEN%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DIVINATION CARD (GEN)/Generator.cs b/DIVINATION CARD (GEN)/Generator.cs new file mode 100644 index 0000000..e77b5b2 --- /dev/null +++ b/DIVINATION CARD (GEN)/Generator.cs @@ -0,0 +1,92 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class SparklineCard + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ExplicitModifierCard + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class LineCard + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public string artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public SparklineCard sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class RootCard + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + List itemBase = new List(); + RootCard j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.card.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= 5) + { + if (!itemBase.Contains(ln.name)) + { + itemBase.Add(ln.name); + iB = iB + string.Format(@" ""{0}""", ln.name); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" Class ""Divination Card""" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 0 105 178" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 0 105 178" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_highvalue.mp3""", Encoding.UTF8); + } + } +} diff --git a/DIVINATION CARD (GEN)/Properties/AssemblyInfo.cs b/DIVINATION CARD (GEN)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6fe2b23 --- /dev/null +++ b/DIVINATION CARD (GEN)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("DIVINATION CARD (GEN)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DIVINATION CARD (GEN)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("2da1eb7b-8508-42c6-828b-87d5dcfa3cf2")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DIVINATION CARD (GEN)/packages.config b/DIVINATION CARD (GEN)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/DIVINATION CARD (GEN)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (GEN) (Accessories)/EXPENSIVE UNIQUE (GEN) (Accessories).csproj b/EXPENSIVE UNIQUE (GEN) (Accessories)/EXPENSIVE UNIQUE (GEN) (Accessories).csproj new file mode 100644 index 0000000..8bf642b --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Accessories)/EXPENSIVE UNIQUE (GEN) (Accessories).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {636E5A6B-CC9D-45CD-A554-024324E701B5} + Library + Properties + expensive_unique_accessory + EXPENSIVE UNIQUE %28GEN%29 %28Accessories%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (GEN) (Accessories)/Generator.cs b/EXPENSIVE UNIQUE (GEN) (Accessories)/Generator.cs new file mode 100644 index 0000000..eb6c917 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Accessories)/Generator.cs @@ -0,0 +1,94 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class SparklineAccessory + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ExplicitModifierAccessory + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class LineAccessory + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public SparklineAccessory sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class RootAccessory + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + List itemBase = new List(); + RootAccessory j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= minValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""", Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star", Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/EXPENSIVE UNIQUE (GEN) (Accessories)/Properties/AssemblyInfo.cs b/EXPENSIVE UNIQUE (GEN) (Accessories)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2e2642f --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Accessories)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("EXPENSIVE UNIQUE (GEN) (Accessories)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("EXPENSIVE UNIQUE (GEN) (Accessories)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("636e5a6b-cc9d-45cd-a554-024324e701b5")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/EXPENSIVE UNIQUE (GEN) (Accessories)/packages.config b/EXPENSIVE UNIQUE (GEN) (Accessories)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Accessories)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (GEN) (Armours)/EXPENSIVE UNIQUE (GEN) (Armours).csproj b/EXPENSIVE UNIQUE (GEN) (Armours)/EXPENSIVE UNIQUE (GEN) (Armours).csproj new file mode 100644 index 0000000..408c82a --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Armours)/EXPENSIVE UNIQUE (GEN) (Armours).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {5A818D39-CAFF-49B0-A3BB-EAB5A063B329} + Library + Properties + expensive_unique_armor + EXPENSIVE UNIQUE %28GEN%29 %28Armours%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (GEN) (Armours)/Generator.cs b/EXPENSIVE UNIQUE (GEN) (Armours)/Generator.cs new file mode 100644 index 0000000..608a573 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Armours)/Generator.cs @@ -0,0 +1,94 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class SparklineArmour + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ExplicitModifierArmour + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class LineArmour + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public SparklineArmour sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class RootArmour + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + List itemBase = new List(); + RootArmour j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= minValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""", Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star", Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/EXPENSIVE UNIQUE (GEN) (Armours)/Properties/AssemblyInfo.cs b/EXPENSIVE UNIQUE (GEN) (Armours)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..63e76a3 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Armours)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("EXPENSIVE UNIQUE (GEN) (Armours)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("EXPENSIVE UNIQUE (GEN) (Armours)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("5a818d39-caff-49b0-a3bb-eab5a063b329")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/EXPENSIVE UNIQUE (GEN) (Armours)/packages.config b/EXPENSIVE UNIQUE (GEN) (Armours)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Armours)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (GEN) (Weapons)/EXPENSIVE UNIQUE (GEN) (Weapons).csproj b/EXPENSIVE UNIQUE (GEN) (Weapons)/EXPENSIVE UNIQUE (GEN) (Weapons).csproj new file mode 100644 index 0000000..f7ea889 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Weapons)/EXPENSIVE UNIQUE (GEN) (Weapons).csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {53EA625F-4C5F-4584-A96F-78BE5E54657A} + Library + Properties + expensive_unique_weapon + EXPENSIVE UNIQUE %28GEN%29 %28Weapons%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + Auto + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (GEN) (Weapons)/Generator.cs b/EXPENSIVE UNIQUE (GEN) (Weapons)/Generator.cs new file mode 100644 index 0000000..21a7e85 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Weapons)/Generator.cs @@ -0,0 +1,94 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class Sparkline + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class ExplicitModifier + { + public string text { get; set; } + public bool optional { get; set; } + } + + public class LineWeapon + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public object variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public Sparkline sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class RootWeapon + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + List itemBase = new List(); + RootWeapon j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.weapon.json", Encoding.UTF8)); + + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence && ln.links <= 4) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= minValue) + { + if (!itemBase.Contains(ln.baseType)) + { + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""", Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star", Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/EXPENSIVE UNIQUE (GEN) (Weapons)/Properties/AssemblyInfo.cs b/EXPENSIVE UNIQUE (GEN) (Weapons)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..5f104f9 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Weapons)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("EXPENSIVE UNIQUE (GEN) (Weapons)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("EXPENSIVE UNIQUE (GEN) (Weapons)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("53ea625f-4c5f-4584-a96f-78be5e54657a")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/EXPENSIVE UNIQUE (GEN) (Weapons)/packages.config b/EXPENSIVE UNIQUE (GEN) (Weapons)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/EXPENSIVE UNIQUE (GEN) (Weapons)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (Maps)/EXPENSIVE UNIQUE (GEN) (Maps).csproj b/EXPENSIVE UNIQUE (Maps)/EXPENSIVE UNIQUE (GEN) (Maps).csproj new file mode 100644 index 0000000..4529463 --- /dev/null +++ b/EXPENSIVE UNIQUE (Maps)/EXPENSIVE UNIQUE (GEN) (Maps).csproj @@ -0,0 +1,53 @@ + + + + + Debug + AnyCPU + {964745AD-FE02-49C3-8E9E-4773D4F526A0} + Library + Properties + expensive_unique_map + EXPENSIVE UNIQUE %28GEN%29 %28Maps%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\Builds\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/EXPENSIVE UNIQUE (Maps)/Generator.cs b/EXPENSIVE UNIQUE (Maps)/Generator.cs new file mode 100644 index 0000000..957e659 --- /dev/null +++ b/EXPENSIVE UNIQUE (Maps)/Generator.cs @@ -0,0 +1,91 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PoE_MxFilterGen +{ + public class SparklineMap + { + public List data { get; set; } + public double? totalChange { get; set; } + } + + public class LineMap + { + public int id { get; set; } + public string name { get; set; } + public string icon { get; set; } + public int mapTier { get; set; } + public int levelRequired { get; set; } + public string baseType { get; set; } + public int stackSize { get; set; } + public string variant { get; set; } + public object prophecyText { get; set; } + public object artFilename { get; set; } + public int links { get; set; } + public int itemClass { get; set; } + public SparklineMap sparkline { get; set; } + public List implicitModifiers { get; set; } + public List explicitModifiers { get; set; } + public string flavourText { get; set; } + public string itemType { get; set; } + public double chaosValue { get; set; } + public double exaltedValue { get; set; } + public int count { get; set; } + } + + public class RootMap + { + public List lines { get; set; } + } + + class Generator + { + private static string iB; + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + List itemBase = new List(); + RootMap j = JsonConvert.DeserializeObject(File.ReadAllText("data/ninja.map.json", Encoding.UTF8)); + + // Loop every items in the poe.ninja api dump + foreach (var ln in j.lines) + { + // Check if the item count is at least equal to the desired confidence level + if (ln.count >= confidence) + { + // Check if the item value is equal or superior to the minimum value + if (ln.chaosValue >= minValue) + { + // Check if we already processed this Base + if (!itemBase.Contains(ln.baseType)) + { + // Add the Base to the processed Base list so we don't write it a second time in our string + itemBase.Add(ln.baseType); + iB = iB + string.Format(@" ""{0}""", ln.baseType); + } + } + } + } + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""", Encoding.UTF8); + File.AppendAllText(fn, " MinimapIcon 0 White Star", Encoding.UTF8); + File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8); + } + } +} diff --git a/EXPENSIVE UNIQUE (Maps)/Properties/AssemblyInfo.cs b/EXPENSIVE UNIQUE (Maps)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ef5c1bd --- /dev/null +++ b/EXPENSIVE UNIQUE (Maps)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("PoE-MxFilter-Generator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PoE-MxFilter-Generator")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("964745ad-fe02-49c3-8e9e-4773d4f526a0")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/EXPENSIVE UNIQUE (Maps)/packages.config b/EXPENSIVE UNIQUE (Maps)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/EXPENSIVE UNIQUE (Maps)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE index 261eeb9..24ba8c6 100644 --- a/LICENSE +++ b/LICENSE @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" + boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright [yyyy] [name of copyright owner] + Copyright 2018 PoE Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/PoE-MxFilter-Generator.sln b/PoE-MxFilter-Generator.sln new file mode 100644 index 0000000..a4bb84b --- /dev/null +++ b/PoE-MxFilter-Generator.sln @@ -0,0 +1,97 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27428.2015 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EXPENSIVE UNIQUE (GEN) (Maps)", "EXPENSIVE UNIQUE (Maps)\EXPENSIVE UNIQUE (GEN) (Maps).csproj", "{964745AD-FE02-49C3-8E9E-4773D4F526A0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DIVINATION CARD (GEN)", "DIVINATION CARD (GEN)\DIVINATION CARD (GEN).csproj", "{2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EXPENSIVE UNIQUE (GEN) (Weapons)", "EXPENSIVE UNIQUE (GEN) (Weapons)\EXPENSIVE UNIQUE (GEN) (Weapons).csproj", "{53EA625F-4C5F-4584-A96F-78BE5E54657A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EXPENSIVE UNIQUE (GEN) (Armours)", "EXPENSIVE UNIQUE (GEN) (Armours)\EXPENSIVE UNIQUE (GEN) (Armours).csproj", "{5A818D39-CAFF-49B0-A3BB-EAB5A063B329}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EXPENSIVE UNIQUE (GEN) (Accessories)", "EXPENSIVE UNIQUE (GEN) (Accessories)\EXPENSIVE UNIQUE (GEN) (Accessories).csproj", "{636E5A6B-CC9D-45CD-A554-024324E701B5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Body)", "CHANCING (Body)\CHANCING (Body).csproj", "{B4433CCE-879E-4061-9E18-518D473A39DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Boots)", "CHANCING (Boots)\CHANCING (Boots).csproj", "{BB8A89F2-5FD2-476C-8484-B01B60D70576}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Gloves)", "CHANCING (Gloves)\CHANCING (Gloves).csproj", "{08A15B18-3572-4A15-8FEB-16933C1E34C2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Helmet)", "CHANCING (Helmet)\CHANCING (Helmet).csproj", "{F66DADB1-0E93-406F-AA8C-5FD93733455A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Quiver)", "CHANCING (Quiver)\CHANCING (Quiver).csproj", "{EEAB1016-0C68-441C-9BED-58C00163BC3B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Shield)", "CHANCING (Shield)\CHANCING (Shield).csproj", "{9530B929-416B-43FE-A1BA-FEEBFFB97575}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CHANCING (Belt)", "CHANCING (Belt)\CHANCING (Belt).csproj", "{30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tiers (DATA)", "Tiers (DATA)\Tiers (DATA).csproj", "{428B5A68-922A-4651-88FC-A6C194C10BD8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {964745AD-FE02-49C3-8E9E-4773D4F526A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {964745AD-FE02-49C3-8E9E-4773D4F526A0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {964745AD-FE02-49C3-8E9E-4773D4F526A0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {964745AD-FE02-49C3-8E9E-4773D4F526A0}.Release|Any CPU.Build.0 = Release|Any CPU + {2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2}.Release|Any CPU.Build.0 = Release|Any CPU + {53EA625F-4C5F-4584-A96F-78BE5E54657A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {53EA625F-4C5F-4584-A96F-78BE5E54657A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53EA625F-4C5F-4584-A96F-78BE5E54657A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {53EA625F-4C5F-4584-A96F-78BE5E54657A}.Release|Any CPU.Build.0 = Release|Any CPU + {5A818D39-CAFF-49B0-A3BB-EAB5A063B329}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A818D39-CAFF-49B0-A3BB-EAB5A063B329}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A818D39-CAFF-49B0-A3BB-EAB5A063B329}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A818D39-CAFF-49B0-A3BB-EAB5A063B329}.Release|Any CPU.Build.0 = Release|Any CPU + {636E5A6B-CC9D-45CD-A554-024324E701B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {636E5A6B-CC9D-45CD-A554-024324E701B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {636E5A6B-CC9D-45CD-A554-024324E701B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {636E5A6B-CC9D-45CD-A554-024324E701B5}.Release|Any CPU.Build.0 = Release|Any CPU + {B4433CCE-879E-4061-9E18-518D473A39DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B4433CCE-879E-4061-9E18-518D473A39DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B4433CCE-879E-4061-9E18-518D473A39DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B4433CCE-879E-4061-9E18-518D473A39DC}.Release|Any CPU.Build.0 = Release|Any CPU + {BB8A89F2-5FD2-476C-8484-B01B60D70576}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BB8A89F2-5FD2-476C-8484-B01B60D70576}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BB8A89F2-5FD2-476C-8484-B01B60D70576}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BB8A89F2-5FD2-476C-8484-B01B60D70576}.Release|Any CPU.Build.0 = Release|Any CPU + {08A15B18-3572-4A15-8FEB-16933C1E34C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {08A15B18-3572-4A15-8FEB-16933C1E34C2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {08A15B18-3572-4A15-8FEB-16933C1E34C2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {08A15B18-3572-4A15-8FEB-16933C1E34C2}.Release|Any CPU.Build.0 = Release|Any CPU + {F66DADB1-0E93-406F-AA8C-5FD93733455A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F66DADB1-0E93-406F-AA8C-5FD93733455A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F66DADB1-0E93-406F-AA8C-5FD93733455A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F66DADB1-0E93-406F-AA8C-5FD93733455A}.Release|Any CPU.Build.0 = Release|Any CPU + {EEAB1016-0C68-441C-9BED-58C00163BC3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEAB1016-0C68-441C-9BED-58C00163BC3B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEAB1016-0C68-441C-9BED-58C00163BC3B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEAB1016-0C68-441C-9BED-58C00163BC3B}.Release|Any CPU.Build.0 = Release|Any CPU + {9530B929-416B-43FE-A1BA-FEEBFFB97575}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9530B929-416B-43FE-A1BA-FEEBFFB97575}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9530B929-416B-43FE-A1BA-FEEBFFB97575}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9530B929-416B-43FE-A1BA-FEEBFFB97575}.Release|Any CPU.Build.0 = Release|Any CPU + {30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}.Release|Any CPU.Build.0 = Release|Any CPU + {428B5A68-922A-4651-88FC-A6C194C10BD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {428B5A68-922A-4651-88FC-A6C194C10BD8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {428B5A68-922A-4651-88FC-A6C194C10BD8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {428B5A68-922A-4651-88FC-A6C194C10BD8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8571981F-2105-4AD9-B8D6-DCA5475C464F} + EndGlobalSection +EndGlobal diff --git a/Tiers (DATA)/Generator.cs b/Tiers (DATA)/Generator.cs new file mode 100644 index 0000000..496bb43 --- /dev/null +++ b/Tiers (DATA)/Generator.cs @@ -0,0 +1,95 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tiers__DATA_ +{ + class Generator + { + private static string iB; + + public class SETTINGS + { + public string git { get; set; } + public string api { get; set; } + public string league { get; set; } + public int confidence { get; set; } + public int minimumValue { get; set; } + public int chancingMinValue { get; set; } + public bool verbose { get; set; } + public bool strict { get; set; } + public string section { get; set; } + } + + public class DATA + { + public string tiers { get; set; } + } + + public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence) + { + string giturl = settings.GetGIT(); + var js = Web.ReadString($@"{giturl}/PoE-MxFilter-Structure/master/Tiers.txt"); + + if (iB == null) { iB = @""""""; } + string fn = @"gen\" + section + ".filter"; + File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + + File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8); + File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8); + } + } +} diff --git a/Tiers (DATA)/Properties/AssemblyInfo.cs b/Tiers (DATA)/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..15eaef6 --- /dev/null +++ b/Tiers (DATA)/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("Tiers (DATA)")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tiers (DATA)")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("428b5a68-922a-4651-88fc-a6c194c10bd8")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Tiers (DATA)/Settings.cs b/Tiers (DATA)/Settings.cs new file mode 100644 index 0000000..6f3d914 --- /dev/null +++ b/Tiers (DATA)/Settings.cs @@ -0,0 +1,80 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tiers__DATA_ +{ + public class SETTINGS + { + public string git { get; set; } + public string api { get; set; } + public string league { get; set; } + public int confidence { get; set; } + public int minimumValue { get; set; } + public int chancingMinValue { get; set; } + public bool verbose { get; set; } + public bool strict { get; set; } + public string section { get; set; } + } + + class settings + { + public static string GetGIT() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.git; + } + + public static string GetAPI() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.api; + } + + public static string GetLeague() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.league; + } + + public static int GetConfidence() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.confidence; + } + + public static int GetMinimumValue() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.minimumValue; + } + + public static int GetChancingMinValue() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.chancingMinValue; + } + + public static bool GetVerbose() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.verbose; + } + + public static string GetSection() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.section; + } + + public static bool GetStrict() + { + SETTINGS j = JsonConvert.DeserializeObject(File.ReadAllText("settings.json")); + return j.strict; + } + } + } diff --git a/Tiers (DATA)/Tiers (DATA).csproj b/Tiers (DATA)/Tiers (DATA).csproj new file mode 100644 index 0000000..8d36dca --- /dev/null +++ b/Tiers (DATA)/Tiers (DATA).csproj @@ -0,0 +1,55 @@ + + + + + Debug + AnyCPU + {428B5A68-922A-4651-88FC-A6C194C10BD8} + Library + Properties + Tiers__DATA_ + Tiers %28DATA%29 + v4.6.1 + 512 + + + true + full + false + ..\Builds\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Tiers (DATA)/Web.cs b/Tiers (DATA)/Web.cs new file mode 100644 index 0000000..3b879b9 --- /dev/null +++ b/Tiers (DATA)/Web.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace Tiers__DATA_ +{ + class Web + { + public static void SaveString(string url, string path) + { + WebClient wb = new WebClient(); + wb.Encoding = Encoding.UTF8; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls + | SecurityProtocolType.Tls11 + | SecurityProtocolType.Tls12; + try + { + Uri uri = new Uri(url); + var str = wb.DownloadString(uri); + File.AppendAllText(path, str, Encoding.UTF8); + } + catch (WebException ex) + { + + } + catch (Exception ex) + { + + } + } + + public static string ReadString(string url) + { + WebClient wb = new WebClient(); + wb.Encoding = Encoding.UTF8; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls + | SecurityProtocolType.Tls11 + | SecurityProtocolType.Tls12; + var str = ""; + try + { + Uri uri = new Uri(url); + str = wb.DownloadString(uri); + } + catch (WebException ex) + { + + } + catch (Exception ex) + { + + } + return str; + } + + public static void DownloadFile(string url, string path) + { + WebClient wb = new WebClient(); + wb.Encoding = Encoding.UTF8; + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls + | SecurityProtocolType.Tls11 + | SecurityProtocolType.Tls12; + var str = ""; + try + { + Uri uri = new Uri(url); + wb.DownloadFile(uri, path); + } + catch (WebException ex) + { + + } + catch (Exception ex) + { + + } + } + } +} diff --git a/Tiers (DATA)/packages.config b/Tiers (DATA)/packages.config new file mode 100644 index 0000000..5762754 --- /dev/null +++ b/Tiers (DATA)/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file