21 Commits

Author SHA1 Message Date
BuildTools
e3d74db312 10.5.1 2022-09-09 00:34:27 -04:00
Michel Chagnon
0a2d3da084 (9.0.0) Server Update 2021-11-14 04:33:25 -05:00
mikx
4e48bb9449 (8.4.0) Dedicated Update 2021-10-31 02:26:25 -04:00
mikx
de0255f6e0 Fixed a debug mistake + Removed auto update 2020-07-13 21:26:21 -04:00
mikx
ee66400e2c Fixed a variable type 2020-07-12 20:34:39 -04:00
mikx
d744553931 Migration to git.mikx.xyz + Auto Updater 2020-07-11 19:50:23 -04:00
mikx
c4a3b747e6 Removerd unused stuff 2020-07-09 23:46:39 -04:00
mikx
07d6e15fdc Merge branch 'master' of http://git.mikx.xyz/mikx/PoE-MxFilterGen
Merge because reasons...
2020-07-09 23:43:51 -04:00
mikx
eb1bd70abb Major Tweaks + SSF Removed + New Strict Level 2020-07-09 23:43:11 -04:00
ba45b06a53 Deleted "CHANGELOG". No longer used. 2020-07-01 18:41:29 -04:00
mikx
0aa483cb1b 8.0.0 fixes 2020-07-01 12:49:41 -04:00
mikx
b729413646 New API + Settings Tweaks + URL Changes 2020-07-01 12:25:13 -04:00
mikx
8751fd185a Currency + Fossil Gen 2020-01-18 20:54:29 -05:00
mikx
e44913ecb8 url fix 2019-04-03 18:41:20 -04:00
mikx
a4e5dc0476 6.2.0 - url updates 2019-04-01 06:33:26 -04:00
mikx
aa76d9f9b0 6.1.0 - Strict Setting (true/false) 2019-03-30 19:57:50 -04:00
mikx
b069e48fab 6.0.1 commit 2019-03-30 01:14:55 -04:00
mikx
672b2133f6 5.2.1 - Progress + Debug Fix 2018-12-29 00:39:35 -05:00
mikx
55fe83c714 5.0.0 - Custom Sounds 2018-12-22 23:04:30 -05:00
mikx
5fb7a3436a 4.3.0 (removed strict) 2018-09-16 23:46:58 -04:00
mikx
ba5b6c3f15 2.0.0 - structure release 2018-01-02 06:48:45 -05:00
55 changed files with 1867 additions and 79465 deletions

Binary file not shown.

View File

@@ -1,6 +0,0 @@
[October 26, 2017][1.0.4]
F Fixed 3 crashes due to "not nullable variables".
F Will now verify if \data and \gen exists and create them if they don't.

5
Directory.Build.props Normal file
View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<Costura />
</Weavers>

View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of 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="IncludeAssemblies" type="xs:string">
<xs:annotation>
<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>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:all>
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
<xs:annotation>
<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>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DisableCleanup" type="xs:boolean">
<xs:annotation>
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
<xs:annotation>
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ExcludeAssemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of 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="IncludeAssemblies" type="xs:string">
<xs:annotation>
<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>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
<xs:annotation>
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PreloadOrder" type="xs:string">
<xs:annotation>
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

View File

@@ -1,5 +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="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -8,9 +9,28 @@
<OutputType>Exe</OutputType>
<RootNamespace>PoE_MxFilterGen</RootNamespace>
<AssemblyName>mxfiltergen</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
<LangVersion>8.0</LangVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -31,34 +51,219 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Chaos_Orb.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<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>
<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>
<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="json\accessories.cs" />
<Compile Include="json\armours.cs" />
<Compile Include="json\cards.cs" />
<Compile Include="json\maps.cs" />
<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="json\weapons.cs" />
<Compile Include="main.cs" />
<Compile Include="msg.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="structures.cs" />
<Compile Include="web.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
<None Include="Properties\app.manifest" />
</ItemGroup>
<ItemGroup>
<Content Include="Chaos_Orb.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 et x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Folder Include="content\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.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'))" />
</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

@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PoE-MxFilterGen")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("Path of Exile Filter Generator")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("MxMedia")]
[assembly: AssemblyProduct("PoE-MxFilterGen")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyCopyright("Copyright © MxMedia 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9de53609-c5dd-497a-b2b6-4f1e3528d652")]
[assembly: Guid("9de53609-c5dd-497a-b2b6-4f1e3528d663")]
// Version information for an assembly consists of the following four values:
//
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("8.4.0.0")]
[assembly: AssemblyFileVersion("8.4.0.0")]

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- Options du manifeste de contrôle de compte d'utilisateur
Si vous souhaitez modifier le niveau du contrôle de compte d'utilisateur Windows, remplacez le
nœud requestedExecutionLevel par l'une des propositions suivantes.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
La spécification de l'élément requestedExecutionLevel désactive la virtualisation de fichiers et du Registre.
Supprimez cet élément si votre application a besoin de la virtualisation pour des
raisons de compatibilité descendante.
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- Liste des versions de Windows pour lesquelles cette application a été testée,
et sur lesquelles elle doit fonctionner. Décommentez éléments appropriés,
et Windows va automatiquement sélectionner l'environnement le plus compatible. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- Indique que l'application prend en charge DPI et qu'elle n'est pas automatiquement mise à l'échelle par Windows à un niveau de
DPI plus élevé. Les applications Windows Presentation Foundation (WPF) prennent automatiquement en charge DPI et n'ont pas besoin
d'opter pour ce choix. Les applications Windows Forms qui ciblent .NET Framework 4.6 et qui optent pour ce paramètre, doivent
également affecter la valeur 'true' au paramètre 'EnableWindowsFormsHighDpiAutoResizing' dans leur fichier app.config. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
-->
<!-- Activer les thèmes pour les contrôles et boîtes de dialogue communes de Windows (Windows XP et version ultérieure) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@@ -0,0 +1,96 @@
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

@@ -0,0 +1,43 @@
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

@@ -0,0 +1,50 @@
// 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

@@ -0,0 +1,30 @@
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

@@ -0,0 +1,47 @@
// 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

@@ -0,0 +1,47 @@
// 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

@@ -0,0 +1,180 @@
// 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

@@ -0,0 +1,50 @@
// 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

@@ -0,0 +1,76 @@
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

@@ -1,91 +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.json
{
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 accessories
{
private static string iB;
public static void GenAccessories()
{
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 >= json.settings.GetConfidence())
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.baseType, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Accessories Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,91 +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.json
{
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 armours
{
private static string iB;
public static void GenArmours()
{
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 >= json.settings.GetConfidence() && ln.links <= 4)
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.baseType, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Armours Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,91 +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.json
{
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 cards
{
private static string iB;
public static void GenCards()
{
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 >= json.settings.GetConfidence())
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.name, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.name))
{
itemBase.Add(ln.name);
iB = iB + string.Format(@" ""{0}""", ln.name);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Cards Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", @" Class ""Divination Card""" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 20 65 110" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 224 224 224" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 57 97 145" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 5 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,85 +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.json
{
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 maps
{
private static string iB;
public static void GenMaps()
{
List<string> itemBase = new List<string>();
RootMap j = JsonConvert.DeserializeObject<RootMap>(File.ReadAllText("data/ninja.map.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 >= json.settings.GetConfidence())
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.baseType, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Maps Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -10,36 +10,203 @@ namespace PoE_MxFilterGen.json
{
public class SETTINGS
{
public string api { get; set; }
public string league { get; set; }
public int confidence { get; set; }
public int minimumValue { get; set; }
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; }
public string updateurl { get; set; }
public string section { get; set; }
}
class settings
{
public static string GetAPI()
public static int GetTierValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.api;
return j.tierValue;
}
public static string GetLeague()
public static int GetUniqueValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.league;
return j.uniqueValue;
}
public static int GetConfidence()
public static int GetFossilValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.confidence;
return j.fossilValue;
}
public static int GetMinimumValue()
public static int GetCardValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.minimumValue;
return j.cardValue;
}
public static string GetSection()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.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,
section = section
};
var raw = JsonConvert.SerializeObject(se, Formatting.Indented);
File.WriteAllText($@"settings.json", raw);
}
}
}

View File

@@ -1,91 +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.json
{
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 weapons
{
private static string iB;
public static void GenWeapons()
{
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 >= json.settings.GetConfidence() && ln.links <= 4)
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.",ln.baseType,ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Weapons Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,68 +1,287 @@
using System;
using Newtonsoft.Json;
using PoE_MxFilterGen.generator;
using PoE_MxFilterGen.json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
class main
internal 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 api = "";
public static string giturl = "https://mxgit.ovh/mikx";
public static string section = "";
public static string league = "";
public static string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
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;
public static string version = "1.0.4";
public static string release = "stable";
public static string fDate = string.Format("{0}-{1}-{2}",dt.Day,dt.Month,dt.Year);
static void Main(string[] args)
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();
msg.CMW(string.Format("API: {0}", json.settings.GetAPI()),true,1);
msg.CMW(string.Format("League: {0}", json.settings.GetLeague()), true, 1);
msg.CMW(string.Format("Confidence: {0}", json.settings.GetConfidence().ToString()), true, 1);
msg.CMW(string.Format("Minimum Value: {0}c", json.settings.GetMinimumValue().ToString()), true, 1);
// Check if data and gen exists
if (!Directory.Exists(@"data\"))
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())
{
Directory.CreateDirectory(@"data\");
}
if (!Directory.Exists(@"gen\"))
{
Directory.CreateDirectory(@"gen\");
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();
}
}
}
// Clean all generated data
DirectoryInfo dataDir = new DirectoryInfo(@"data\");
DirectoryInfo genDir = new DirectoryInfo(@"gen\");
foreach (FileInfo file in dataDir.GetFiles())
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 (FileInfo file in genDir.GetFiles())
{
foreach (FileSystemInfo file in directoryInfo2.GetFiles())
file.Delete();
}
}
// Get latest poe.ninja api
web.SaveString(json.settings.GetAPI() + "GetUniqueArmourOverview?league=" + json.settings.GetLeague(), "data/ninja.armour.json");
web.SaveString(json.settings.GetAPI() + "GetUniqueWeaponOverview?league=" + json.settings.GetLeague(), "data/ninja.weapon.json");
web.SaveString(json.settings.GetAPI() + "GetUniqueAccessoryOverview?league=" + json.settings.GetLeague(), "data/ninja.accessory.json");
web.SaveString(json.settings.GetAPI() + "GetUniqueMapOverview?league=" + json.settings.GetLeague(), "data/ninja.map.json");
web.SaveString(json.settings.GetAPI() + "GetDivinationCardsOverview?league=" + json.settings.GetLeague(), "data/ninja.card.json");
public static void CleanDir()
{
foreach (FileSystemInfo file in new DirectoryInfo("gen").GetFiles())
file.Delete();
}
msg.CMW("########## Generating Weapons ##########",true,1);
json.weapons.GenWeapons();
msg.CMW("########## Generating Armours ##########", true, 1);
json.armours.GenArmours();
msg.CMW("########## Generating Accessories ##########", true, 1);
json.accessories.GenAccessories();
msg.CMW("########## Generating Maps ##########", true, 1);
json.maps.GenMaps();
msg.CMW("########## Generating Cards ##########", true, 1);
json.cards.GenCards();
private static void AutoUpdater_ApplicationExitEvent() => Environment.Exit(-1);
public class REMVAR
{
public string league { get; set; }
}
public class REMSND
{
public List<string> sound { get; set; }
}
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; }
}
}
}
}

View File

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

View File

@@ -1 +1 @@
bfff0fcf98b7df58adeb8698423149e393b63067
710ffc5d9eff805a0b215f1fa96d491e0bdd21cf

View File

@@ -6,3 +6,59 @@ D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojResolveAssemblyReference.cache
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojResolveAssemblyReference.cache
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojAssemblyReference.cache
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojAssemblyReference.cache
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojAssemblyReference.cache
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
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,4 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
<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" />
</packages>

View File

@@ -0,0 +1,48 @@
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,24 +1,65 @@
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
{
class web
internal class web
{
public static void SaveString(string url, string path)
{
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
WebClient webClient = new WebClient();
webClient.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);
Uri address = new Uri(url);
string contents = webClient.DownloadString(address);
System.IO.File.AppendAllText(path, contents, Encoding.UTF8);
}
catch (WebException ex)
{
msg.CMW(ex.Message, true, 3);
msg.CMW("URL: " + url, true, 3);
}
catch (Exception ex)
{
msg.CMW(ex.Message, true, 3);
}
}
public static string ReadString(string url)
{
WebClient webClient = new WebClient();
webClient.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
string str = "";
try
{
Uri address = new Uri(url);
str = webClient.DownloadString(address);
}
catch (WebException ex)
{
msg.CMW(ex.Message, true, 3);
msg.CMW("URL: " + url, true, 3);
}
catch (Exception ex)
{
msg.CMW(ex.Message, true, 3);
}
return str;
}
public static void DownloadFile(string url, string path)
{
WebClient webClient = new WebClient();
webClient.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
try
{
Uri address = new Uri(url);
webClient.DownloadFile(address, path);
}
catch (WebException ex)
{

View File

@@ -1,20 +0,0 @@
The MIT License (MIT)
Copyright (c) 2007 James Newton-King
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,116 +0,0 @@
param($installPath, $toolsPath, $package, $project)
# open json.net splash page on package install
# don't open if json.net is installed as a dependency
try
{
$url = "http://www.newtonsoft.com/json/install?version=" + $package.Version
$dte2 = Get-Interface $dte ([EnvDTE80.DTE2])
if ($dte2.ActiveWindow.Caption -eq "Package Manager Console")
{
# user is installing from VS NuGet console
# get reference to the window, the console host and the input history
# show webpage if "install-package newtonsoft.json" was last input
$consoleWindow = $(Get-VSComponentModel).GetService([NuGetConsole.IPowerConsoleWindow])
$props = $consoleWindow.GetType().GetProperties([System.Reflection.BindingFlags]::Instance -bor `
[System.Reflection.BindingFlags]::NonPublic)
$prop = $props | ? { $_.Name -eq "ActiveHostInfo" } | select -first 1
if ($prop -eq $null) { return }
$hostInfo = $prop.GetValue($consoleWindow)
if ($hostInfo -eq $null) { return }
$history = $hostInfo.WpfConsole.InputHistory.History
$lastCommand = $history | select -last 1
if ($lastCommand)
{
$lastCommand = $lastCommand.Trim().ToLower()
if ($lastCommand.StartsWith("install-package") -and $lastCommand.Contains("newtonsoft.json"))
{
$dte2.ItemOperations.Navigate($url) | Out-Null
}
}
}
else
{
# user is installing from VS NuGet dialog
# get reference to the window, then smart output console provider
# show webpage if messages in buffered console contains "installing...newtonsoft.json" in last operation
$instanceField = [NuGet.Dialog.PackageManagerWindow].GetField("CurrentInstance", [System.Reflection.BindingFlags]::Static -bor `
[System.Reflection.BindingFlags]::NonPublic)
$consoleField = [NuGet.Dialog.PackageManagerWindow].GetField("_smartOutputConsoleProvider", [System.Reflection.BindingFlags]::Instance -bor `
[System.Reflection.BindingFlags]::NonPublic)
if ($instanceField -eq $null -or $consoleField -eq $null) { return }
$instance = $instanceField.GetValue($null)
if ($instance -eq $null) { return }
$consoleProvider = $consoleField.GetValue($instance)
if ($consoleProvider -eq $null) { return }
$console = $consoleProvider.CreateOutputConsole($false)
$messagesField = $console.GetType().GetField("_messages", [System.Reflection.BindingFlags]::Instance -bor `
[System.Reflection.BindingFlags]::NonPublic)
if ($messagesField -eq $null) { return }
$messages = $messagesField.GetValue($console)
if ($messages -eq $null) { return }
$operations = $messages -split "=============================="
$lastOperation = $operations | select -last 1
if ($lastOperation)
{
$lastOperation = $lastOperation.ToLower()
$lines = $lastOperation -split "`r`n"
$installMatch = $lines | ? { $_.StartsWith("------- installing...newtonsoft.json ") } | select -first 1
if ($installMatch)
{
$dte2.ItemOperations.Navigate($url) | Out-Null
}
}
}
}
catch
{
try
{
$pmPane = $dte2.ToolWindows.OutputWindow.OutputWindowPanes.Item("Package Manager")
$selection = $pmPane.TextDocument.Selection
$selection.StartOfDocument($false)
$selection.EndOfDocument($true)
if ($selection.Text.StartsWith("Attempting to gather dependencies information for package 'Newtonsoft.Json." + $package.Version + "'"))
{
# don't show on upgrade
if (!$selection.Text.Contains("Removed package"))
{
$dte2.ItemOperations.Navigate($url) | Out-Null
}
}
}
catch
{
# stop potential errors from bubbling up
# worst case the splash page won't open
}
}
# still yolo