Sound Tweaks

This commit is contained in:
mikx 2018-12-22 23:04:55 -05:00
parent defe5a81f7
commit 0b3694a424
57 changed files with 2741 additions and 2 deletions

1
.gitignore vendored
View File

@ -21,6 +21,7 @@ x64/
x86/
bld/
[Bb]in/
[Bb]uilds/
[Oo]bj/
[Ll]og/

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CHANCING__Belt_</RootNamespace>
<AssemblyName>CHANCING %28Belt%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B4433CCE-879E-4061-9E18-518D473A39DC}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>chancing_body</RootNamespace>
<AssemblyName>CHANCING %28Body%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{BB8A89F2-5FD2-476C-8484-B01B60D70576}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>chancing_boot</RootNamespace>
<AssemblyName>CHANCING %28Boots%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{08A15B18-3572-4A15-8FEB-16933C1E34C2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CHANCING__Gloves_</RootNamespace>
<AssemblyName>CHANCING %28Gloves%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F66DADB1-0E93-406F-AA8C-5FD93733455A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CHANCING__Helmet_</RootNamespace>
<AssemblyName>CHANCING %28Helmet%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EEAB1016-0C68-441C-9BED-58C00163BC3B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CHANCING__Quiver_</RootNamespace>
<AssemblyName>CHANCING %28Quiver%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9530B929-416B-43FE-A1BA-FEEBFFB97575}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CHANCING__Shield_</RootNamespace>
<AssemblyName>CHANCING %28Shield%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ChanceExplicitModifierBody> 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<ChanceLineBody> 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<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
List<string> itemBase = new List<string>();
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{2DA1EB7B-8508-42C6-828B-87D5DCFA3CF2}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>divination_card</RootNamespace>
<AssemblyName>DIVINATION CARD %28GEN%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ExplicitModifierCard> 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<LineCard> 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<string> itemBase = new List<string>();
RootCard j = JsonConvert.DeserializeObject<RootCard>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{636E5A6B-CC9D-45CD-A554-024324E701B5}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>expensive_unique_accessory</RootNamespace>
<AssemblyName>EXPENSIVE UNIQUE %28GEN%29 %28Accessories%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ExplicitModifierAccessory> 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<LineAccessory> 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<string> itemBase = new List<string>();
RootAccessory j = JsonConvert.DeserializeObject<RootAccessory>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5A818D39-CAFF-49B0-A3BB-EAB5A063B329}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>expensive_unique_armor</RootNamespace>
<AssemblyName>EXPENSIVE UNIQUE %28GEN%29 %28Armours%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ExplicitModifierArmour> 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<LineArmour> 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<string> itemBase = new List<string>();
RootArmour j = JsonConvert.DeserializeObject<RootArmour>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{53EA625F-4C5F-4584-A96F-78BE5E54657A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>expensive_unique_weapon</RootNamespace>
<AssemblyName>EXPENSIVE UNIQUE %28GEN%29 %28Weapons%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<ExplicitModifier> 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<LineWeapon> 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<string> itemBase = new List<string>();
RootWeapon j = JsonConvert.DeserializeObject<RootWeapon>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{964745AD-FE02-49C3-8E9E-4773D4F526A0}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>expensive_unique_map</RootNamespace>
<AssemblyName>EXPENSIVE UNIQUE %28GEN%29 %28Maps%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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<double?> 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<object> implicitModifiers { get; set; }
public List<object> 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<LineMap> 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<string> itemBase = new List<string>();
RootMap j = JsonConvert.DeserializeObject<RootMap>(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);
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>

View File

@ -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.

View File

@ -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

95
Tiers (DATA)/Generator.cs Normal file
View File

@ -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);
}
}
}

View File

@ -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")]

80
Tiers (DATA)/Settings.cs Normal file
View File

@ -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<SETTINGS>(File.ReadAllText("settings.json"));
return j.git;
}
public static string GetAPI()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.api;
}
public static string GetLeague()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.league;
}
public static int GetConfidence()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.confidence;
}
public static int GetMinimumValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.minimumValue;
}
public static int GetChancingMinValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.chancingMinValue;
}
public static bool GetVerbose()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.verbose;
}
public static string GetSection()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.section;
}
public static bool GetStrict()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.strict;
}
}
}

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{428B5A68-922A-4651-88FC-A6C194C10BD8}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Tiers__DATA_</RootNamespace>
<AssemblyName>Tiers %28DATA%29</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Builds\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Generator.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Web.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

83
Tiers (DATA)/Web.cs Normal file
View File

@ -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)
{
}
}
}
}

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
</packages>