Compare commits

..

No commits in common. "e3d74db312b1c3a0f754a2b30a529cb7ddb9fa10" and "de0255f6e0e58def8b6134b4fca6956cf40f0371" have entirely different histories.

23 changed files with 370 additions and 1438 deletions

View File

@ -1,5 +0,0 @@
<Project>
<PropertyGroup>
<LangVersion>8.0</LangVersion>
</PropertyGroup>
</Project>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
</startup>
</configuration>

View File

@ -17,16 +17,6 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
@ -53,16 +43,6 @@
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
<xs:annotation>
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCompression" type="xs:boolean">
<xs:annotation>
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
@ -93,16 +73,6 @@
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" />
<Import Project="..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -9,13 +9,12 @@
<OutputType>Exe</OutputType>
<RootNamespace>PoE_MxFilterGen</RootNamespace>
<AssemblyName>mxfiltergen</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<LangVersion>8.0</LangVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@ -70,166 +69,26 @@
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Costura, Version=5.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.5.7.0\lib\netstandard1.0\Costura.dll</HintPath>
<Reference Include="Costura, Version=3.2.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.2.1\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<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.AppContext, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.AppContext.4.3.0\lib\net463\System.AppContext.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.Console, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Console.4.3.0\lib\net46\System.Console.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.DiagnosticSource, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.4.3.0\lib\net46\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.Tracing, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Globalization.Calendars, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Globalization.Calendars.4.3.0\lib\net46\System.Globalization.Calendars.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.4.3.0\lib\net462\System.IO.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.4.3.0\lib\net46\System.IO.Compression.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.IO.Compression.ZipFile, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Compression.ZipFile.4.3.0\lib\net46\System.IO.Compression.ZipFile.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.4.3.0\lib\net46\System.IO.FileSystem.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.IO.FileSystem.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.FileSystem.Primitives.4.3.0\lib\net46\System.IO.FileSystem.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Linq, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.4.3.0\lib\net463\System.Linq.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Linq.Expressions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Linq.Expressions.4.3.0\lib\net463\System.Linq.Expressions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Http, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Http.4.3.0\lib\net46\System.Net.Http.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Net.Sockets, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Net.Sockets.4.3.0\lib\net46\System.Net.Sockets.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Reflection, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.Extensions, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.Extensions.4.3.0\lib\net462\System.Runtime.Extensions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.4.3.0\lib\net463\System.Runtime.InteropServices.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<Reference Include="System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.RegularExpressions.4.3.0\lib\net463\System.Text.RegularExpressions.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
<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" />
<Reference Include="System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Xml.ReaderWriter.4.3.0\lib\net46\System.Xml.ReaderWriter.dll</HintPath>
<Private>True</Private>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="currency_classes.cs" />
<Compile Include="generator\accessory.cs" />
<Compile Include="generator\armour.cs" />
<Compile Include="generator\base.cs" />
<Compile Include="generator\card.cs" />
<Compile Include="generator\fossil.cs" />
<Compile Include="generator\tier.cs" />
<Compile Include="generator\weapon.cs" />
<Compile Include="generator_classes.cs" />
<Compile Include="json\settings.cs" />
<Compile Include="main.cs" />
<Compile Include="msg.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="structures.cs" />
<Compile Include="web.cs" />
</ItemGroup>
<ItemGroup>
@ -252,18 +111,13 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Folder Include="content\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Fody.3.3.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.3\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.6.6.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.6.0\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.props'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets'))" />
<Error Condition="!Exists('..\packages\Fody.3.3.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.3.3\build\Fody.targets'))" />
<Error Condition="!Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props'))" />
</Target>
<Import Project="..\packages\Fody.6.6.0\build\Fody.targets" Condition="Exists('..\packages\Fody.6.6.0\build\Fody.targets')" />
<Import Project="..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets" Condition="Exists('..\packages\Costura.Fody.5.7.0\build\Costura.Fody.targets')" />
</Project>

View File

@ -1,96 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
public class CurrencyDetail
{
public int id { get; set; }
public string icon { get; set; }
public string name { get; set; }
public string tradeId { get; set; }
}
public class LanguageCurrency
{
public string name { get; set; }
public Translations translations { get; set; }
}
public class LineCurrency
{
public string currencyTypeName { get; set; }
public Pay pay { get; set; }
public Receive receive { get; set; }
public double chaosEquivalent { get; set; }
public LowConfidencePaySparkLine lowConfidencePaySparkLine { get; set; }
public LowConfidenceReceiveSparkLine lowConfidenceReceiveSparkLine { get; set; }
public string detailsId { get; set; }
}
public class LowConfidencePaySparkLine
{
public List<object> data { get; set; }
public double totalChange { get; set; }
}
public class LowConfidenceReceiveSparkLine
{
public List<double?> data { get; set; }
public double totalChange { get; set; }
}
public class Pay
{
public int id { get; set; }
public int league_id { get; set; }
public int pay_currency_id { get; set; }
public int get_currency_id { get; set; }
public DateTime sample_time_utc { get; set; }
public int count { get; set; }
public double value { get; set; }
public int data_point_count { get; set; }
public bool includes_secondary { get; set; }
public int listing_count { get; set; }
}
public class PaySparkLine
{
public List<object> data { get; set; }
public double totalChange { get; set; }
}
public class Receive
{
public int id { get; set; }
public int league_id { get; set; }
public int pay_currency_id { get; set; }
public int get_currency_id { get; set; }
public DateTime sample_time_utc { get; set; }
public int count { get; set; }
public double value { get; set; }
public int data_point_count { get; set; }
public bool includes_secondary { get; set; }
public int listing_count { get; set; }
}
public class ReceiveSparkLine
{
public List<double> data { get; set; }
public double totalChange { get; set; }
}
public class RootCurrency
{
public List<LineCurrency> lines { get; set; }
public List<CurrencyDetail> currencyDetails { get; set; }
public LanguageCurrency language { get; set; }
}
public class TranslationsCurrency
{
}
}

View File

@ -1,43 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace PoE_MxFilterGen.generator
{
internal class accessory
{
private static string iB;
public static void Gen(string section, int uniquev)
{
List<string> stringList = new List<string>();
foreach (Line line in JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8)).lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
int num = Convert.ToInt32(uniquev);
if (chaosValue >= num)
{
stringList.Add(line.baseType);
accessory.iB += string.Format(@" ""{0}""", line.baseType);
}
}
if (accessory.iB == null)
accessory.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + accessory.iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_unique.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
}
}
}

View File

@ -1,50 +0,0 @@
// Decompiled with JetBrains decompiler
// Type: PoE_MxFilterGen.generator.armour
// Assembly: mxfiltergen, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9686B206-07DB-4C70-B4F4-1F6EF4D87358
// Assembly location: C:\Users\blood\OneDrive\Desktop\mxfiltergen.exe
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace PoE_MxFilterGen.generator
{
internal class armour
{
private static string iB;
public static void Gen(string section, int uniquev)
{
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8));
List<string> stringList = new List<string>();
foreach (Line line in ln.lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
int? links = line.links;
if (chaosValue >= uniquev && !stringList.Contains(line.baseType) && links == null)
{
stringList.Add(line.baseType);
armour.iB += string.Format(@" ""{0}""", line.baseType);
}
}
if (armour.iB == null)
armour.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + armour.iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_unique.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
}
}
}

View File

@ -1,30 +0,0 @@
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.generator
{
internal class @base
{
private static string iB;
public static void GenAccessory(string section, int basev)
{
List<string> stringList = new List<string>();
foreach (Line line in JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8)).lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
int num = Convert.ToInt32(basev);
if (chaosValue >= num)
{
stringList.Add(line.baseType);
@base.iB += string.Format(@" ""{0}""", line.baseType);
}
}
}
}
}

View File

@ -1,47 +0,0 @@
// Decompiled with JetBrains decompiler
// Type: PoE_MxFilterGen.generator.card
// Assembly: mxfiltergen, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9686B206-07DB-4C70-B4F4-1F6EF4D87358
// Assembly location: C:\Users\blood\OneDrive\Desktop\mxfiltergen.exe
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace PoE_MxFilterGen.generator
{
internal class card
{
private static string iB;
public static void Gen(string section, int cardv)
{
List<string> stringList = new List<string>();
foreach (Line line in JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.card.json", Encoding.UTF8)).lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
int num = Convert.ToInt32(cardv);
if (chaosValue >= num)
{
stringList.Add(line.name);
card.iB += string.Format(@" ""{0}""", line.name);
}
}
if (card.iB == null)
card.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object) section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Divination Card\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + card.iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 0 105 178" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 105 178" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_highvalue.mp3\"", Encoding.UTF8);
}
}
}

View File

@ -1,47 +0,0 @@
// Decompiled with JetBrains decompiler
// Type: PoE_MxFilterGen.generator.fossil
// Assembly: mxfiltergen, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9686B206-07DB-4C70-B4F4-1F6EF4D87358
// Assembly location: C:\Users\blood\OneDrive\Desktop\mxfiltergen.exe
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace PoE_MxFilterGen.generator
{
internal class fossil
{
private static string iB;
public static void Gen(string section, int fossilv)
{
List<string> stringList = new List<string>();
foreach (Line line in JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.fossil.json", Encoding.UTF8)).lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
int num = Convert.ToInt32(fossilv);
if (chaosValue >= num)
{
stringList.Add(line.name);
fossil.iB += string.Format(@" ""{0}""", line.name);
}
}
if (fossil.iB == null)
fossil.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object) section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Class \"Stackable Currency\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType" + fossil.iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_fossil.mp3\"", Encoding.UTF8);
}
}
}

View File

@ -1,180 +0,0 @@
// Decompiled with JetBrains decompiler
// Type: PoE_MxFilterGen.generator.tier
// Assembly: mxfiltergen, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9686B206-07DB-4C70-B4F4-1F6EF4D87358
// Assembly location: C:\Users\blood\OneDrive\Desktop\mxfiltergen.exe
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace PoE_MxFilterGen.generator
{
internal class tier
{
private static string iB;
private static string bAxe;
private static string bBow;
private static string bClaw;
private static string bDagger;
private static string bFishing;
private static string bMace;
private static string bSceptre;
private static string bStaff;
private static string bSword;
private static string bWand;
private static string bBody;
private static string bBoots;
private static string bGloves;
private static string bHelmet;
private static string bShield;
private static string bQuiver;
public static void Gen(string section, int tierValue, bool tier1HAxe, bool tier2HAxe, bool tierBow, bool tierClaw, bool tierDagger, bool tier1HMace, bool tier2HMace, bool tierSceptre, bool tierStaff, bool tier1HSword, bool tier2HSword, bool tierWand, bool tierBody, bool tierBoots, bool tierGloves, bool tierHelmet, bool tierShield, bool tierQuiver)
{
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.base.json", Encoding.UTF8));
ForEachLine(ln, "One Handed Axe", tier1HAxe, section, tierValue);
ForEachLine(ln, "Two Handed Axe", tier2HAxe, section, tierValue);
ForEachLine(ln, "Bow", tierBow, section, tierValue);
ForEachLine(ln, "Claw", tierClaw, section, tierValue);
ForEachLine(ln, "Dagger", tierDagger, section, tierValue);
ForEachLine(ln, "One Handed Mace", tier1HMace, section, tierValue);
ForEachLine(ln, "Two Handed Mace", tier2HMace, section, tierValue);
ForEachLine(ln, "Sceptre", tierSceptre, section, tierValue);
ForEachLine(ln, "Staff", tierStaff, section, tierValue);
ForEachLine(ln, "One Handed Sword", tier1HSword, section, tierValue);
ForEachLine(ln, "Two Handed Sword", tier2HSword, section, tierValue);
ForEachLine(ln, "Wand", tierWand, section, tierValue);
ForEachLine(ln, "Body Armour", tierBody, section, tierValue);
ForEachLine(ln, "Boots", tierBoots, section, tierValue);
ForEachLine(ln, "Gloves", tierGloves, section, tierValue);
ForEachLine(ln, "Helmet", tierHelmet, section, tierValue);
ForEachLine(ln, "Shield", tierShield, section, tierValue);
ForEachLine(ln, "Quiver", tierQuiver, section, tierValue);
}
public static void ForEachLine(dynamic lnb, string type, bool tierBool, string section, int tierValue)
{
int c = 0;
if (tierBool)
{
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.base.json", Encoding.UTF8));
foreach (var line in ln.lines)
{
if (line.itemType == type && tierBool && line.levelRequired <= 86 && line.variant == null && line.chaosValue >= tierValue)
{
c++;
iB += string.Format(@" ""{0}""", line.baseType);
}
}
}
if (tierBool && c != 0)
{
GenerateFile(section, iB, type);
}
iB = "";
c = 0;
}
public static void GenerateFile(string section, string iB, string type)
{
if (iB == null)
iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, $"# Section: {section} ({type})" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " HasExplicitMod \"Veiled\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " FracturedItem True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Identified True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Corrupted True" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
}
}
}

View File

@ -1,50 +0,0 @@
// Decompiled with JetBrains decompiler
// Type: PoE_MxFilterGen.generator.weapon
// Assembly: mxfiltergen, Version=8.4.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 9686B206-07DB-4C70-B4F4-1F6EF4D87358
// Assembly location: C:\Users\blood\OneDrive\Desktop\mxfiltergen.exe
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace PoE_MxFilterGen.generator
{
internal class weapon
{
private static string iB;
public static void Gen(string section, int uniquev)
{
var ln = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.weapon.json", Encoding.UTF8));
List<string> stringList = new List<string>();
foreach (Line line in ln.lines)
{
int chaosValue = Convert.ToInt32(line.chaosValue);
int? links = line.links;
if (chaosValue >= uniquev && !stringList.Contains(line.baseType) && links == null)
{
stringList.Add(line.baseType);
weapon.iB += string.Format(@" ""{0}""", line.baseType);
}
}
if (weapon.iB == null)
weapon.iB = "\"\"";
string path = "gen/" + section + ".filter";
File.AppendAllText(path, string.Format("# Section: {0}", (object)section) + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, Environment.NewLine ?? "", Encoding.UTF8);
File.AppendAllText(path, "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " BaseType " + weapon.iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " CustomAlertSound \"mx_unique.mp3\"" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
}
}
}

View File

@ -1,76 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
public class Sparkline
{
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
public List<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class LowConfidenceSparkline
{
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 Line
{
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 LowConfidenceSparkline lowConfidenceSparkline { get; set; }
public List<object?> implicitModifiers { get; set; }
public List<ExplicitModifier> explicitModifiers { get; set; }
public string? flavourText { get; set; }
public bool? corrupted { get; set; }
public int? gemLevel { get; set; }
public int? gemQuality { get; set; }
public string? itemType { get; set; }
public double? chaosValue { get; set; }
public double? exaltedValue { get; set; }
public int? count { get; set; }
public string? detailsId { get; set; }
public object? tradeInfo { get; set; }
public object? mapRegion { get; set; }
public int? listingCount { get; set; }
}
public class Translations
{
}
public class Language
{
public string? name { get; set; }
public Translations translations { get; set; }
}
public class Root
{
public List<Line> lines { get; set; }
public Language language { get; set; }
}
}

View File

@ -10,25 +10,6 @@ namespace PoE_MxFilterGen.json
{
public class SETTINGS
{
public int tierValue { get; set; }
public bool tier1HAxe { get; set; }
public bool tier2HAxe { get; set; }
public bool tierBow { get; set; }
public bool tierClaw { get; set; }
public bool tierDagger { get; set; }
public bool tier1HMace { get; set; }
public bool tier2HMace { get; set; }
public bool tierSceptre { get; set; }
public bool tierStaff { get; set; }
public bool tier1HSword { get; set; }
public bool tier2HSword { get; set; }
public bool tierWand { get; set; }
public bool tierBody { get; set; }
public bool tierBoots { get; set; }
public bool tierGloves { get; set; }
public bool tierHelmet { get; set; }
public bool tierShield { get; set; }
public bool tierQuiver { get; set; }
public int uniqueValue { get; set; }
public int fossilValue { get; set; }
public int cardValue { get; set; }
@ -38,11 +19,6 @@ namespace PoE_MxFilterGen.json
class settings
{
public static int GetTierValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierValue;
}
public static int GetUniqueValue()
{
@ -68,145 +44,19 @@ namespace PoE_MxFilterGen.json
return j.section;
}
internal static bool GetTier1HAxe()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tier1HAxe;
}
internal static bool GetTier2HAxe()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tier2HAxe;
}
internal static bool GetTierBow()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierBow;
}
internal static bool GetTierClaw()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierClaw;
}
internal static bool GetTierDagger()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierDagger;
}
internal static bool GetTier1HMace()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tier1HMace;
}
internal static bool GetTier2HMace()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tier2HMace;
}
internal static bool GetTierSceptre()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierSceptre;
}
internal static bool GetTierStaff()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierStaff;
}
internal static bool GetTier1HSword()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tier1HSword;
}
internal static bool GetTier2HSword()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tier2HSword;
}
internal static bool GetTierWand()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierWand;
}
internal static bool GetTierBody()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierBody;
}
internal static bool GetTierBoots()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierBoots;
}
internal static bool GetTierGloves()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierGloves;
}
internal static bool GetTierHelmet()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierHelmet;
}
internal static bool GetTierShield()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierShield;
}
internal static bool GetTierQuiver()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.tierQuiver;
}
public static void WriteSection(string section)
{
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($@"settings.json"));
SETTINGS se = new SETTINGS
{
tierValue = js.tierValue,
tier1HAxe = js.tier1HAxe,
tier2HAxe = js.tier2HAxe,
tierBow = js.tierBow,
tierClaw = js.tierClaw,
tierDagger = js.tierDagger,
tier1HMace = js.tier1HMace,
tier2HMace = js.tier2HMace,
tierSceptre = js.tierSceptre,
tierStaff = js.tierStaff,
tier1HSword = js.tier1HSword,
tier2HSword = js.tier2HSword,
tierWand = js.tierWand,
tierBody = js.tierBody,
tierBoots = js.tierBoots,
tierGloves = js.tierGloves,
tierHelmet = js.tierHelmet,
tierShield = js.tierShield,
tierQuiver = js.tierQuiver,
uniqueValue = js.uniqueValue,
fossilValue = js.fossilValue,
cardValue = js.cardValue,
updateurl = js.updateurl,
section = section
};
var raw = JsonConvert.SerializeObject(se, Formatting.Indented);
File.WriteAllText($@"settings.json", raw);
}
}
}
}

View File

@ -1,260 +1,34 @@
using Newtonsoft.Json;
using PoE_MxFilterGen.generator;
using PoE_MxFilterGen.json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Linq;
using System.Reflection;
namespace PoE_MxFilterGen
{
internal class main
class main
{
private static DateTime dt = DateTime.Now;
public static string version = "10.5.1";
public static string fDate = string.Format("{0}-{1}-{2}", (object)main.dt.Day, (object)main.dt.Month, (object)main.dt.Year);
public static string version = "8.4.0";
public static string fDate = string.Format("{0}-{1}-{2}", dt.Day, dt.Month, dt.Year);
public static string api = "";
public static string giturl = "https://mxgit.ovh/mikx";
public static string giturl = "https://git.mikx.xyz/mikx";
public static string section = "";
public static string league = "";
public static string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
public static string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
public static int fprog = 0;
public static int ftotal = 0;
public static int sprog = 0;
public static int stotal = 0;
public static bool debug = false;
private static void Main(string[] args)
{
if (!File.Exists("config/mxfiltergen_settings.json"))
{
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
web.DownloadFile("https://mxpoe.ovh/mxfilter/data/settings_template.json", "config/mxfiltergen_settings.json");
}
msg.Splash();
main.CleanDirData();
main.league = JsonConvert.DeserializeObject<main.REMVAR>(File.ReadAllText("config/mxfiltergen_var.json")).league;
main.api = "https://poe.ninja/api/data/";
msg.CMW("League: " + main.league, true, 1);
msg.CMW(string.Format("Min. Unique Value - {0}c", (object)settings.GetUniqueValue()), true, 1);
msg.CMW(string.Format("Min. Fossil Value - {0}c", (object)settings.GetFossilValue()), true, 1);
msg.CMW(string.Format("Min. Card Value - {0}c", (object)settings.GetCardValue()), true, 1);
msg.CMW("Checking for required dirs...", true, 1);
if (!Directory.Exists("data"))
Directory.CreateDirectory("data");
if (!Directory.Exists("gen"))
Directory.CreateDirectory("gen");
if (!Directory.Exists("structure"))
Directory.CreateDirectory("structure");
msg.CMW("Cleaning the base dirs...", true, 1);
main.CleanDirData();
msg.CMW("Cleaning the last filter from path...", true, 1);
foreach (string filter in structures.Filters())
File.Delete("out/MxFilter_" + filter + ".filter");
msg.CMW("Downloading the latest API data from poe.ninja...", true, 1);
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=UniqueArmour&language=en", "data/ninja.armour.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=UniqueWeapon&language=en", "data/ninja.weapon.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=UniqueAccessory&language=en", "data/ninja.accessory.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=DivinationCard&language=en", "data/ninja.card.json");
web.SaveString(main.api + "currencyoverview?league=" + main.league + "&type=Currency&language=en", "data/ninja.currency.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=Fossil&language=en", "data/ninja.fossil.json");
web.SaveString(main.api + "itemoverview?league=" + main.league + "&type=BaseType&language=en", "data/ninja.base.json");
foreach (string filter in structures.Filters())
{
string str = "MxFilter";
int sc = structures.Structures().Length;
msg.CMW(string.Format("Generating the {0} filter using {1} source(s)...", filter, sc), true, 1);
main.ftotal = sc;
foreach (var structure in structures.Structures())
{
++main.fprog;
msg.drawProgress(main.fprog, main.ftotal);
settings.WriteSection(structure);
string section = structure;
int fossilValue = settings.GetFossilValue();
int cardValue = settings.GetCardValue();
int uniqueValue = settings.GetUniqueValue();
int tierValue = settings.GetTierValue();
bool tier1HAxe = settings.GetTier1HAxe();
bool tier2HAxe = settings.GetTier2HAxe();
bool tierBow = settings.GetTierBow();
bool tierClaw = settings.GetTierClaw();
bool tierDagger = settings.GetTierDagger();
bool tier1HMace = settings.GetTier1HMace();
bool tier2HMace = settings.GetTier2HMace();
bool tierSceptre = settings.GetTierSceptre();
bool tierStaff = settings.GetTierStaff();
bool tier1HSword = settings.GetTier1HSword();
bool tier2HSword = settings.GetTier2HSword();
bool tierWand = settings.GetTierWand();
bool tierBody = settings.GetTierBody();
bool tierBoots = settings.GetTierBoots();
bool tierGloves = settings.GetTierGloves();
bool tierHelmet = settings.GetTierHelmet();
bool tierShield = settings.GetTierShield();
bool tierQuiver = settings.GetTierQuiver();
switch (structure)
{
case "DIVINATION CARD (GEN)":
card.Gen(section, cardValue);
break;
case "EXPENSIVE UNIQUE (GEN) (Accessories)":
accessory.Gen(section, uniqueValue);
break;
case "EXPENSIVE UNIQUE (GEN) (Armours)":
armour.Gen(section, uniqueValue);
break;
case "EXPENSIVE UNIQUE (GEN) (Weapons)":
weapon.Gen(section, uniqueValue);
break;
case "FOSSIL (GEN)":
fossil.Gen(section, fossilValue);
break;
case "Tiers (DATA)":
tier.Gen(section, tierValue, tier1HAxe, tier2HAxe, tierBow, tierClaw, tierDagger, tier1HMace, tier2HMace, tierSceptre, tierStaff, tier1HSword, tier2HSword, tierWand, tierBody, tierBoots, tierGloves, tierHelmet, tierShield, tierQuiver);
break;
}
}
msg.CMW("Creating the final filter...", true, 1);
foreach (var structure in structures.Structures())
{
switch (structure)
{
case "DIVINATION CARD (GEN)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "EXPENSIVE UNIQUE (GEN) (Accessories)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "EXPENSIVE UNIQUE (GEN) (Armours)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "EXPENSIVE UNIQUE (GEN) (Weapons)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "FOSSIL (GEN)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "Tiers (DATA)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
case "Tiers - Caster (DATA)":
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
default:
File.AppendAllText("out/" + str + "_" + filter + ".filter", string.Format("# Section: {0}", (object)structure) + Environment.NewLine);
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("structure/" + filter + "/" + structure + ".filter")));
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
break;
}
}
main.ftotal = 0;
main.fprog = 0;
main.CleanDir();
CurrencyValueOut();
if(debug)
{
Console.ReadKey();
}
}
}
public static void CurrencyValueOut()
{
foreach (LineCurrency line in JsonConvert.DeserializeObject<RootCurrency>(File.ReadAllText("data/ninja.currency.json", Encoding.UTF8)).lines)
{
string currencyTypeName = line.currencyTypeName;
if (currencyTypeName == "Divine Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/divine.txt", fc);
}
if (currencyTypeName == "Exalted Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/exalted.txt", fc);
}
if (currencyTypeName == "Orb of Annulment")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/annulment.txt", fc);
}
if (currencyTypeName == "Orb of Alteration")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/alteration.txt", fc);
}
if (currencyTypeName == "Orb of Fusing")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/fusing.txt", fc);
}
if (currencyTypeName == "Chromatic Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/chromatic.txt", fc);
}
if (currencyTypeName == "Jeweller's Orb")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/jeweller.txt", fc);
}
if (currencyTypeName == "Orb of Alchemy")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/alchemy.txt", fc);
}
if (currencyTypeName == "Cartographer's Chisel")
{
string fc = line.chaosEquivalent.ToString();
File.WriteAllText("out/chisel.txt", fc);
}
}
}
public static void CleanDirData()
{
DirectoryInfo directoryInfo1 = new DirectoryInfo("data");
DirectoryInfo directoryInfo2 = new DirectoryInfo("gen");
foreach (FileSystemInfo file in directoryInfo1.GetFiles())
file.Delete();
foreach (FileSystemInfo file in directoryInfo2.GetFiles())
file.Delete();
}
public static void CleanDir()
{
foreach (FileSystemInfo file in new DirectoryInfo("gen").GetFiles())
file.Delete();
}
private static void AutoUpdater_ApplicationExitEvent() => Environment.Exit(-1);
public static bool deb = false;
public class REMVAR
{
@ -269,19 +43,229 @@ namespace PoE_MxFilterGen
public class STRUCTURE
{
public string section { get; set; }
public bool gen { get; set; }
public bool @static { get; set; }
public bool remote { get; set; }
public string url { get; set; }
}
public class RootStructure
{
public List<main.STRUCTURE> structures { get; set; }
public List<STRUCTURE> structures { get; set; }
}
static void Main(string[] args)
{
// Check for the settings json
if (!File.Exists("settings.json"))
{
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
web.DownloadFile("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_temp_settings.json", "settings.json");
}
msg.Splash();
// Get current league from MxD
var ls = web.ReadString("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_var.json");
REMVAR lj = JsonConvert.DeserializeObject<REMVAR>(ls);
league = lj.league;
api = $"https://poe.ninja/api/data/";
msg.CMW($"League: {league}", true, 1);
msg.CMW($"Min. Unique Value - {json.settings.GetUniqueValue()}c", true, 1);
msg.CMW($"Min. Fossil Value - {json.settings.GetFossilValue()}c", true, 1);
msg.CMW($"Min. Card Value - {json.settings.GetCardValue()}c", true, 1);
// Check if all the required dir exists
msg.CMW($"Checking for required dirs...", true, 1);
if (!Directory.Exists(@"data\"))
{
Directory.CreateDirectory(@"data\");
}
if (!Directory.Exists(@"gen\"))
{
Directory.CreateDirectory(@"gen\");
}
if (!Directory.Exists(@"structure\"))
{
Directory.CreateDirectory(@"structure\");
}
// Clean all generated data
msg.CMW($"Cleaning the base dirs...", true, 1);
CleanDirData();
// Clean the latest generated filter from settings path
msg.CMW($"Cleaning the last filter from path...", true, 1);
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Normal.filter");
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict.filter");
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict_NSNLC.filter");
// Get latest poe.ninja api
msg.CMW($"Downloading the latest API data from poe.ninja...", true, 1);
web.SaveString(api + $"itemoverview?league={league}&type=UniqueArmour&language=en", "data/ninja.armour.json");
web.SaveString(api + $"itemoverview?league={league}&type=UniqueWeapon&language=en", "data/ninja.weapon.json");
web.SaveString(api + $"itemoverview?league={league}&type=UniqueAccessory&language=en", "data/ninja.accessory.json");
web.SaveString(api + $"itemoverview?league={league}&type=DivinationCard&language=en", "data/ninja.card.json");
web.SaveString(api + $"currencyoverview?league={league}&type=Currency&language=en", "data/ninja.currency.json");
web.SaveString(api + $"itemoverview?league={league}&type=Fossil&language=en", "data/ninja.fossil.json");
// Generate Filter Array
string[] filters;
filters = new string[] { "Normal", "Strict", "Strict_NSNLC" };
foreach (string f in filters)
{
// Setup basic variable
string filter_name = "MxFilter";
// Get the structure list
var js = web.ReadString($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}.json");
RootStructure j = JsonConvert.DeserializeObject<RootStructure>(js);
// Read the structure one by one to process gen
// Generator (dlls) are downloaded from the web and executed in a separate AppDomain before the AD is unloaded to execute a new generator.
// As we CAN'T unload an assembly, using AppDomains is the only way we can load/unload multiple assembly in a row.
msg.CMW($@"Generating the {f} filter using {j.structures.Count} source(s)...", true, 1);
ftotal = j.structures.Count;
foreach (var sec in j.structures)
{
if (sec.gen == true)
{
fprog = fprog + 1;
msg.drawProgress(fprog, ftotal);
//msg.CMW(string.Format("REMOTE_GEN {0}", sec.section), true, 1);
web.DownloadFile($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}/{sec.section}.dll", $@"structure\{sec.section}.dll");
json.settings.WriteSection(sec.section);
var bytes = GenerateAssemblyAndGetRawBytes(sec.section);
var appDomain = AppDomain.CreateDomain(sec.section, null, new AppDomainSetup
{
ShadowCopyFiles = "true",
LoaderOptimization = LoaderOptimization.MultiDomainHost
});
var assmblyLoaderType = typeof(AssmeblyLoader);
var assemblyLoader = (IAssemblyLoader)appDomain.CreateInstanceFromAndUnwrap(assmblyLoaderType.Assembly.Location, assmblyLoaderType.FullName);
assemblyLoader.Load(bytes);
AppDomain.Unload(appDomain);
}
else
{
fprog = fprog + 1;
msg.drawProgress(fprog, ftotal);
//msg.CMW($@"REMOTE_GET {sec.section}", true, 1);
web.SaveString($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}/{sec.section}.filter", $"structure/{sec.section}.filter");
}
}
// Create the final filter.
msg.CMW($@"Creating the final filter...", true, 1);
foreach (var sec in j.structures)
{
if (sec.gen == true)
{
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("gen\\{0}.filter", sec.section)));
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
}
else
{
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", string.Format("# Section: {0}", sec.section) + Environment.NewLine);
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("structure\\{0}.filter", sec.section)));
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
}
}
ftotal = 0;
fprog = 0;
CleanDir();
}
// Download the sounds from the remote list
msg.CMW($@"Downloading the latest sound...", true, 1);
var sl = web.ReadString("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_sound.json");
REMSND slj = JsonConvert.DeserializeObject<REMSND>(sl);
stotal = slj.sound.Count;
foreach (string s in slj.sound)
{
sprog = sprog + 1;
msg.drawProgress(sprog, stotal);
if (File.Exists($@"{path}\My Games\Path of Exile\{s}")) { File.Delete($@"{path}\My Games\Path of Exile\{s}"); }
web.DownloadFile($"https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/mp3/{s}", $@"{path}\My Games\Path of Exile\{s}");
}
// Clean all generated data
CleanDirData();
}
private static byte[] GenerateAssemblyAndGetRawBytes(string dll)
{
string lp = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
var path = $@"{lp}\structure\{dll}.dll";
return File.ReadAllBytes(path);
}
public static void CleanDirData()
{
DirectoryInfo dataDir = new DirectoryInfo(@"data\");
DirectoryInfo genDir = new DirectoryInfo(@"gen\");
DirectoryInfo strucDir = new DirectoryInfo(@"structure\");
foreach (FileInfo file in dataDir.GetFiles())
{
file.Delete();
}
foreach (FileInfo file in genDir.GetFiles())
{
file.Delete();
}
foreach (FileInfo file in strucDir.GetFiles())
{
file.Delete();
}
}
public static void CleanDir()
{
DirectoryInfo genDir = new DirectoryInfo(@"gen\");
DirectoryInfo strucDir = new DirectoryInfo(@"structure\");
foreach (FileInfo file in genDir.GetFiles())
{
file.Delete();
}
foreach (FileInfo file in strucDir.GetFiles())
{
file.Delete();
}
}
private static void AutoUpdater_ApplicationExitEvent()
{
System.Environment.Exit(-1);
}
}
}
public interface IAssemblyLoader
{
void Load(byte[] bytes);
}
public class AssmeblyLoader : MarshalByRefObject, IAssemblyLoader
{
public void Load(byte[] bytes)
{
string section = main.section;
var assembly = AppDomain.CurrentDomain.Load(bytes);
Type type = AppDomain.CurrentDomain.GetAssemblies().SelectMany(t => t.GetTypes()).Where(t => String.Equals(t.Name, "Generator", StringComparison.Ordinal)).First();
object o = Activator.CreateInstance(type);
MethodInfo mi = o.GetType().GetMethod("Gen");
Object[] ob = new object[] { json.settings.GetSection(), "tobedeleted", main.league, json.settings.GetUniqueValue(), json.settings.GetFossilValue(), json.settings.GetCardValue() };
mi.Invoke(o, ob);
}
}
}

View File

@ -1,203 +1,197 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
internal class msg
class msg
{
public static void CM(string msg, bool time, int color)
{
DateTime now;
string str1;
int num;
string seconds = "";
string minutes = "";
string hours = "";
if (DateTime.Now.Second < 10)
{
now = DateTime.Now;
str1 = string.Format("0{0}", (object)now.Second);
seconds = String.Format("0{0}", DateTime.Now.Second);
}
else
{
num = DateTime.Now.Second;
str1 = num.ToString();
seconds = DateTime.Now.Second.ToString();
}
now = DateTime.Now;
string str2;
if (now.Minute < 10)
if (DateTime.Now.Minute < 10)
{
now = DateTime.Now;
str2 = string.Format("0{0}", (object)now.Minute);
minutes = String.Format("0{0}", DateTime.Now.Minute);
}
else
{
now = DateTime.Now;
num = now.Minute;
str2 = num.ToString();
minutes = DateTime.Now.Minute.ToString();
}
now = DateTime.Now;
string str3;
if (now.Hour < 10)
if (DateTime.Now.Hour < 10)
{
now = DateTime.Now;
str3 = string.Format("0{0}", (object)now.Hour);
hours = String.Format("0{0}", DateTime.Now.Hour);
}
else
{
now = DateTime.Now;
num = now.Hour;
str3 = num.ToString();
hours = DateTime.Now.Hour.ToString();
}
string str4 = string.Format("{0}:{1}:{2}", (object)str3, (object)str2, (object)str1);
ConsoleColor consoleColor = ConsoleColor.White;
string date = String.Format("{0}:{1}:{2}", hours, minutes, seconds);
//color switch
ConsoleColor cc = ConsoleColor.White;
switch (color)
{
case 0:
//nothing
break;
case 1:
consoleColor = ConsoleColor.Cyan;
cc = ConsoleColor.Cyan;
break;
case 2:
consoleColor = ConsoleColor.Green;
cc = ConsoleColor.Green;
break;
case 3:
consoleColor = ConsoleColor.Red;
cc = ConsoleColor.Red;
break;
}
if (time)
{
Console.ForegroundColor = consoleColor;
Console.WriteLine(string.Format("[{0}] {1}", (object)str4, (object)msg));
Console.ForegroundColor = cc;
Console.WriteLine(String.Format("[{0}] {1}", date, msg));
}
else
{
Console.ForegroundColor = consoleColor;
Console.WriteLine(string.Format("{0}", (object)msg));
Console.ForegroundColor = cc;
Console.WriteLine(String.Format("{0}", msg));
}
Console.ForegroundColor = ConsoleColor.White;
}
public static void CMW(string msg, bool time, int color)
{
DateTime now;
string str1;
int num;
string seconds = "";
string minutes = "";
string hours = "";
if (DateTime.Now.Second < 10)
{
now = DateTime.Now;
str1 = string.Format("0{0}", (object)now.Second);
seconds = String.Format("0{0}", DateTime.Now.Second);
}
else
{
num = DateTime.Now.Second;
str1 = num.ToString();
seconds = DateTime.Now.Second.ToString();
}
now = DateTime.Now;
string str2;
if (now.Minute < 10)
if (DateTime.Now.Minute < 10)
{
now = DateTime.Now;
str2 = string.Format("0{0}", (object)now.Minute);
minutes = String.Format("0{0}", DateTime.Now.Minute);
}
else
{
now = DateTime.Now;
num = now.Minute;
str2 = num.ToString();
minutes = DateTime.Now.Minute.ToString();
}
now = DateTime.Now;
string str3;
if (now.Hour < 10)
if (DateTime.Now.Hour < 10)
{
now = DateTime.Now;
str3 = string.Format("0{0}", (object)now.Hour);
hours = String.Format("0{0}", DateTime.Now.Hour);
}
else
{
now = DateTime.Now;
num = now.Hour;
str3 = num.ToString();
hours = DateTime.Now.Hour.ToString();
}
string str4 = string.Format("{0}:{1}:{2}", (object)str3, (object)str2, (object)str1);
File.AppendAllText("mxfiltergen.logs", string.Format("[{0}] {1}", (object)str4, (object)msg) + Environment.NewLine);
ConsoleColor consoleColor = ConsoleColor.White;
string date = String.Format("{0}:{1}:{2}", hours, minutes, seconds);
File.AppendAllText("mxfiltergen.logs", String.Format("[{0}] {1}", date, msg) + Environment.NewLine);
//color switch
ConsoleColor cc = ConsoleColor.White;
switch (color)
{
case 0:
//nothing
break;
case 1:
consoleColor = ConsoleColor.Cyan;
cc = ConsoleColor.Cyan;
break;
case 2:
consoleColor = ConsoleColor.Green;
cc = ConsoleColor.Green;
break;
case 3:
consoleColor = ConsoleColor.Red;
cc = ConsoleColor.Red;
break;
}
if (time)
{
Console.ForegroundColor = consoleColor;
Console.WriteLine(string.Format("[{0}] {1}", (object)str4, (object)msg));
Console.ForegroundColor = cc;
Console.WriteLine(String.Format("[{0}] {1}", date, msg));
}
else
{
Console.ForegroundColor = consoleColor;
Console.WriteLine(string.Format(""));
Console.ForegroundColor = cc;
Console.WriteLine(String.Format(""));
}
Console.ForegroundColor = ConsoleColor.White;
}
public static void drawProgress(int progress, int total)
{
DateTime now;
string str1;
int num;
string seconds = "";
string minutes = "";
string hours = "";
if (DateTime.Now.Second < 10)
{
now = DateTime.Now;
str1 = string.Format("0{0}", (object)now.Second);
seconds = String.Format("0{0}", DateTime.Now.Second);
}
else
{
num = DateTime.Now.Second;
str1 = num.ToString();
seconds = DateTime.Now.Second.ToString();
}
now = DateTime.Now;
string str2;
if (now.Minute < 10)
if (DateTime.Now.Minute < 10)
{
now = DateTime.Now;
str2 = string.Format("0{0}", (object)now.Minute);
minutes = String.Format("0{0}", DateTime.Now.Minute);
}
else
{
now = DateTime.Now;
num = now.Minute;
str2 = num.ToString();
minutes = DateTime.Now.Minute.ToString();
}
now = DateTime.Now;
string str3;
if (now.Hour < 10)
if (DateTime.Now.Hour < 10)
{
now = DateTime.Now;
str3 = string.Format("0{0}", (object)now.Hour);
hours = String.Format("0{0}", DateTime.Now.Hour);
}
else
{
now = DateTime.Now;
num = now.Hour;
str3 = num.ToString();
hours = DateTime.Now.Hour.ToString();
}
string str4 = string.Format("[{0}] [", (object)string.Format("{0}:{1}:{2}", (object)str3, (object)str2, (object)str1));
string date = String.Format("{0}:{1}:{2}", hours, minutes, seconds);
string beg = String.Format("[{0}] [", date);
Console.ForegroundColor = ConsoleColor.Cyan;
if (progress == 1)
{
Console.Write(str4);
Console.CursorLeft = total + str4.Length;
{
Console.Write(beg);
Console.CursorLeft = total+beg.Length;
Console.Write("]");
}
Console.CursorLeft = progress + str4.Length - 1;
Console.Write("#");
Console.CursorLeft = str4.Length + total + 2;
Console.Write(string.Format("{0}/{1}", (object)progress, (object)total));
if (progress != total)
return;
Console.WriteLine();
Console.CursorLeft = (progress + beg.Length)-1;
Console.Write($"#");
Console.CursorLeft = beg.Length + total + 2;
Console.Write($"{progress}/{total}");
if (progress == total)
{
Console.WriteLine();
}
}
public static void Splash()
@ -205,11 +199,11 @@ namespace PoE_MxFilterGen
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("");
Console.WriteLine("#### MxFilterGen");
Console.WriteLine(string.Format("#### VERSION: {0}", (object)main.version));
Console.WriteLine(string.Format("#### VERSION: {0}",main.version));
Console.WriteLine("#### DEV: mikx");
Console.WriteLine("#### POWERED BY: poe.ninja");
Console.WriteLine("");
Console.ForegroundColor = ConsoleColor.White;
}
}
}
}

View File

@ -50,15 +50,3 @@ I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCo
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.AssemblyReference.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.SuggestedBindingRedirects.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\System.Diagnostics.DiagnosticSource.xml
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.Fody.CopyLocal.cache
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb

View File

@ -1,52 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Costura.Fody" version="5.7.0" targetFramework="net472" developmentDependency="true" />
<package id="Fody" version="6.6.0" targetFramework="net472" developmentDependency="true" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net472" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net472" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
<package id="System.AppContext" version="4.3.0" targetFramework="net472" />
<package id="System.Collections" version="4.3.0" targetFramework="net472" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net472" />
<package id="System.Console" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net472" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net472" />
<package id="System.Globalization" version="4.3.0" targetFramework="net472" />
<package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net472" />
<package id="System.IO" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net472" />
<package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net472" />
<package id="System.IO.FileSystem" version="4.3.0" targetFramework="net472" />
<package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Linq" version="4.3.0" targetFramework="net472" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Net.Sockets" version="4.3.0" targetFramework="net472" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Handles" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net472" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" />
<package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net472" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net472" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net472" />
<package id="System.Threading" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net472" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net472" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net472" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net472" />
<package id="Costura.Fody" version="3.2.1" targetFramework="net452" />
<package id="Fody" version="3.3.3" targetFramework="net452" developmentDependency="true" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
</packages>

View File

@ -1,48 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
internal class structures
{
public static string[] Filters()
{
string[] Filters = new string[] {
"Normal",
"Strict"
};
return Filters;
}
public static string[] Structures()
{
string[] Structures = new string[] {
"LEAGUE",
"FOSSIL (GEN)",
"FOSSIL",
"MISC",
"ESSENCE",
"SKILL GEM",
"FLASK",
"MAPS",
"JEWEL",
"DIVINATION CARD",
"DIVINATION CARD (GEN)",
"EXPENSIVE UNIQUE (GEN) (Armours)",
"EXPENSIVE UNIQUE (GEN) (Weapons)",
"CURRENCY",
"INFLUENCED",
"ACCESSORIES",
"Tiers (DATA)",
"GEAR BY SOCKET",
"GEAR BY QUALITY",
"RECIPES",
"HIDE",
};
return Structures;
}
}
}

View File

@ -1,21 +1,27 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
internal class web
class web
{
public static void SaveString(string url, string path)
{
WebClient webClient = new WebClient();
webClient.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
try
{
Uri address = new Uri(url);
string contents = webClient.DownloadString(address);
System.IO.File.AppendAllText(path, contents, Encoding.UTF8);
Uri uri = new Uri(url);
var str = wb.DownloadString(uri);
File.AppendAllText(path, str, Encoding.UTF8);
}
catch (WebException ex)
{
@ -30,14 +36,16 @@ namespace PoE_MxFilterGen
public static string ReadString(string url)
{
WebClient webClient = new WebClient();
webClient.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
string str = "";
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
var str = "";
try
{
Uri address = new Uri(url);
str = webClient.DownloadString(address);
Uri uri = new Uri(url);
str = wb.DownloadString(uri);
}
catch (WebException ex)
{
@ -53,13 +61,15 @@ namespace PoE_MxFilterGen
public static void DownloadFile(string url, string path)
{
WebClient webClient = new WebClient();
webClient.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
try
{
Uri address = new Uri(url);
webClient.DownloadFile(address, path);
Uri uri = new Uri(url);
wb.DownloadFile(uri,path);
}
catch (WebException ex)
{