(9.0.0) Server Update
This commit is contained in:
parent
4e48bb9449
commit
0a2d3da084
|
@ -0,0 +1,5 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
</startup>
|
||||
</configuration>
|
||||
|
|
|
@ -17,6 +17,16 @@
|
|||
<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>
|
||||
|
@ -43,6 +53,16 @@
|
|||
<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>
|
||||
|
@ -73,6 +93,16 @@
|
|||
<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>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" />
|
||||
<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>
|
||||
|
@ -9,12 +9,13 @@
|
|||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>PoE_MxFilterGen</RootNamespace>
|
||||
<AssemblyName>mxfiltergen</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.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>
|
||||
|
@ -69,22 +70,160 @@
|
|||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=3.2.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.3.2.1\lib\net40\Costura.dll</HintPath>
|
||||
<Reference 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="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Reference 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="generator\accessory.cs" />
|
||||
<Compile Include="generator\armour.cs" />
|
||||
<Compile Include="generator\card.cs" />
|
||||
<Compile Include="generator\fossil.cs" />
|
||||
<Compile Include="generator\tier.cs" />
|
||||
<Compile Include="generator\tier_caster.cs" />
|
||||
<Compile Include="generator\weapon.cs" />
|
||||
<Compile Include="generator_classes.cs" />
|
||||
<Compile Include="json\settings.cs" />
|
||||
<Compile Include="main.cs" />
|
||||
<Compile Include="msg.cs" />
|
||||
|
@ -112,12 +251,14 @@
|
|||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Fody.3.3.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.3\build\Fody.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Ce projet fait référence à des packages NuGet qui sont manquants sur cet ordinateur. Utilisez l'option de restauration des packages NuGet pour les télécharger. Pour plus d'informations, consultez http://go.microsoft.com/fwlink/?LinkID=322105. Le fichier manquant est : {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Fody.3.3.3\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.3.3.3\build\Fody.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props'))" />
|
||||
<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>
|
|
@ -2,48 +2,42 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class accessory
|
||||
internal class accessory
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, int uniquev)
|
||||
{
|
||||
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)
|
||||
{
|
||||
double? chaosValue = line.chaosValue;
|
||||
double num = (double) uniquev;
|
||||
if (chaosValue.GetValueOrDefault() >= num & chaosValue.HasValue && !stringList.Contains(line.baseType))
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
Root j = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8));
|
||||
|
||||
foreach (var ln in j.lines)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= uniquev)
|
||||
{
|
||||
if (!itemBase.Contains(ln.baseType))
|
||||
{
|
||||
itemBase.Add(ln.baseType);
|
||||
iB = iB + string.Format(@" ""{0}""", ln.baseType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8);
|
||||
stringList.Add(line.baseType);
|
||||
accessory.iB += string.Format(" \"{0}\"", (object) 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 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_chase.mp3\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,53 +1,54 @@
|
|||
using Newtonsoft.Json;
|
||||
// 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.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class armour
|
||||
internal class armour
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, int uniquev)
|
||||
{
|
||||
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.armour.json", Encoding.UTF8)).lines)
|
||||
{
|
||||
int? links = line.links;
|
||||
int num1 = 5;
|
||||
if (links.GetValueOrDefault() <= num1 & links.HasValue)
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
Root j = JsonConvert.DeserializeObject<Root>(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.links <= 5)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= uniquev)
|
||||
{
|
||||
if (!itemBase.Contains(ln.baseType))
|
||||
{
|
||||
itemBase.Add(ln.baseType);
|
||||
iB = iB + string.Format(@" ""{0}""", ln.baseType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8);
|
||||
double? chaosValue = line.chaosValue;
|
||||
double num2 = (double) uniquev;
|
||||
if (chaosValue.GetValueOrDefault() >= num2 & chaosValue.HasValue && !stringList.Contains(line.baseType))
|
||||
{
|
||||
stringList.Add(line.baseType);
|
||||
armour.iB += string.Format(" \"{0}\"", (object) 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 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_chase.mp3\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,48 +1,47 @@
|
|||
using Newtonsoft.Json;
|
||||
// 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.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class card
|
||||
internal class card
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, int cardv)
|
||||
{
|
||||
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)
|
||||
{
|
||||
double? chaosValue = line.chaosValue;
|
||||
double num = (double) cardv;
|
||||
if (chaosValue.GetValueOrDefault() >= num & chaosValue.HasValue && !stringList.Contains(line.name))
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
|
||||
Root j = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.card.json", Encoding.UTF8));
|
||||
|
||||
foreach (var ln in j.lines)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= cardv)
|
||||
{
|
||||
if (!itemBase.Contains(ln.name))
|
||||
{
|
||||
itemBase.Add(ln.name);
|
||||
iB = iB + string.Format(@" ""{0}""", ln.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" Class ""Divination Card""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 0 105 178" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 0 105 178" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_highvalue.mp3""", Encoding.UTF8);
|
||||
stringList.Add(line.name);
|
||||
card.iB += string.Format(" \"{0}\"", (object) 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,48 +1,47 @@
|
|||
using Newtonsoft.Json;
|
||||
// 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.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class fossil
|
||||
internal class fossil
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, int fossilv)
|
||||
{
|
||||
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)
|
||||
{
|
||||
double? chaosValue = line.chaosValue;
|
||||
double num = (double) fossilv;
|
||||
if (chaosValue.GetValueOrDefault() >= num & chaosValue.HasValue && !stringList.Contains(line.name))
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
|
||||
Root j = JsonConvert.DeserializeObject<Root>(File.ReadAllText("data/ninja.fossil.json", Encoding.UTF8));
|
||||
|
||||
foreach (var ln in j.lines)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= fossilv)
|
||||
{
|
||||
if (!itemBase.Contains(ln.name))
|
||||
{
|
||||
itemBase.Add(ln.name);
|
||||
iB = iB + string.Format(@" ""{0}""", ln.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" Class ""Stackable Currency""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_fossil.mp3""", Encoding.UTF8);
|
||||
stringList.Add(line.name);
|
||||
fossil.iB += string.Format(" \"{0}\"", (object) 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,118 +1,115 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
// 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 System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class tier
|
||||
internal class tier
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section)
|
||||
{
|
||||
private static string iB;
|
||||
public static void Gen(string section)
|
||||
{
|
||||
var js = File.ReadAllText($@"config/Tiers.txt");
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" HasExplicitMod ""Veiled""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " FracturedItem True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
string str = File.ReadAllText("config/Tiers.txt");
|
||||
if (tier.iB == null)
|
||||
tier.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 " + str + 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 40" + 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 " + str + 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 40" + 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 " + str + 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 40" + 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 " + str + 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 " + str + 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 " + str + 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 40" + 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 " + str + 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 40" + 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 " + str + 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 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,118 +1,115 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: PoE_MxFilterGen.generator.tier_caster
|
||||
// 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 System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class tier_caster
|
||||
internal class tier_caster
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section)
|
||||
{
|
||||
private static string iB;
|
||||
public static void Gen(string section)
|
||||
{
|
||||
var js = File.ReadAllText($@"config/Tiers_Caster.txt");
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" HasExplicitMod ""Veiled""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " FracturedItem True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
string str = File.ReadAllText("config/Tiers_Caster.txt");
|
||||
if (tier_caster.iB == null)
|
||||
tier_caster.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 " + str + 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 40" + 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 " + str + 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 40" + 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 " + str + 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 40" + 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 " + str + 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 " + str + 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 " + str + 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 40" + 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 " + str + 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 40" + 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 " + str + 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 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_tier.mp3\"" + Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,53 +1,54 @@
|
|||
using Newtonsoft.Json;
|
||||
// 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.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen.generator
|
||||
{
|
||||
class weapon
|
||||
internal class weapon
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, int uniquev)
|
||||
{
|
||||
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.weapon.json", Encoding.UTF8)).lines)
|
||||
{
|
||||
int? links = line.links;
|
||||
int num1 = 5;
|
||||
if (links.GetValueOrDefault() <= num1 & links.HasValue)
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
Root j = JsonConvert.DeserializeObject<Root>(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.links <= 5)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= uniquev)
|
||||
{
|
||||
if (!itemBase.Contains(ln.baseType))
|
||||
{
|
||||
itemBase.Add(ln.baseType);
|
||||
iB = iB + string.Format(@" ""{0}""", ln.baseType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = $"gen/" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_chase.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect White", Encoding.UTF8);
|
||||
double? chaosValue = line.chaosValue;
|
||||
double num2 = (double) uniquev;
|
||||
if (chaosValue.GetValueOrDefault() >= num2 & chaosValue.HasValue && !stringList.Contains(line.baseType))
|
||||
{
|
||||
stringList.Add(line.baseType);
|
||||
weapon.iB += string.Format(" \"{0}\"", (object) 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 45" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " CustomAlertSound \"mx_chase.mp3\"" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " MinimapIcon 0 White Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(path, " PlayEffect White", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,34 +1,158 @@
|
|||
using Newtonsoft.Json;
|
||||
using PoE_MxFilterGen.generator;
|
||||
using PoE_MxFilterGen.json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace PoE_MxFilterGen
|
||||
{
|
||||
class main
|
||||
internal class main
|
||||
{
|
||||
private static DateTime dt = DateTime.Now;
|
||||
|
||||
public static string version = "8.4.0";
|
||||
public static string fDate = string.Format("{0}-{1}-{2}", dt.Day, dt.Month, dt.Year);
|
||||
|
||||
public static string version = "9.0.0";
|
||||
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://git.mikx.xyz/mikx";
|
||||
|
||||
public static string giturl = "https://git.mxnet.xyz/mikx";
|
||||
public static string section = "";
|
||||
public static string league = "";
|
||||
public static string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
|
||||
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 deb = false;
|
||||
public static string[] filters = new string[4]
|
||||
{
|
||||
"Normal",
|
||||
"Strict",
|
||||
"Strict_NSNLC",
|
||||
"Strict_Caster"
|
||||
};
|
||||
|
||||
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://poe.mikx.xyz/mxfilter/data/settings_template.json", "config/mxfiltergen_settings.json");
|
||||
}
|
||||
msg.Splash();
|
||||
main.CleanDirData();
|
||||
main.league = JsonConvert.DeserializeObject<main.REMVAR>(File.ReadAllText("config/mxfiltergen_var.json")).league;
|
||||
main.api = "https://poe.ninja/api/data/";
|
||||
msg.CMW("League: " + main.league, true, 1);
|
||||
msg.CMW(string.Format("Min. Unique Value - {0}c", (object)settings.GetUniqueValue()), true, 1);
|
||||
msg.CMW(string.Format("Min. Fossil Value - {0}c", (object)settings.GetFossilValue()), true, 1);
|
||||
msg.CMW(string.Format("Min. Card Value - {0}c", (object)settings.GetCardValue()), true, 1);
|
||||
msg.CMW("Checking for required dirs...", true, 1);
|
||||
if (!Directory.Exists("data"))
|
||||
Directory.CreateDirectory("data");
|
||||
if (!Directory.Exists("gen"))
|
||||
Directory.CreateDirectory("gen");
|
||||
if (!Directory.Exists("structure"))
|
||||
Directory.CreateDirectory("structure");
|
||||
msg.CMW("Cleaning the base dirs...", true, 1);
|
||||
main.CleanDirData();
|
||||
msg.CMW("Cleaning the last filter from path...", true, 1);
|
||||
foreach (string filter in main.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");
|
||||
foreach (string filter in main.filters)
|
||||
{
|
||||
string str = "MxFilter";
|
||||
main.RootStructure rootStructure = JsonConvert.DeserializeObject<main.RootStructure>(File.ReadAllText("structure/" + filter + ".json"));
|
||||
msg.CMW(string.Format("Generating the {0} filter using {1} source(s)...", (object)filter, (object)rootStructure.structures.Count), true, 1);
|
||||
main.ftotal = rootStructure.structures.Count;
|
||||
foreach (main.STRUCTURE structure in rootStructure.structures)
|
||||
{
|
||||
if (structure.gen)
|
||||
{
|
||||
++main.fprog;
|
||||
msg.drawProgress(main.fprog, main.ftotal);
|
||||
settings.WriteSection(structure.section);
|
||||
string section = structure.section;
|
||||
int fossilValue = settings.GetFossilValue();
|
||||
int cardValue = settings.GetCardValue();
|
||||
int uniqueValue = settings.GetUniqueValue();
|
||||
switch (structure.section)
|
||||
{
|
||||
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);
|
||||
break;
|
||||
case "Tiers - Caster (DATA)":
|
||||
tier_caster.Gen(section);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
++main.fprog;
|
||||
msg.drawProgress(main.fprog, main.ftotal);
|
||||
}
|
||||
}
|
||||
msg.CMW("Creating the final filter...", true, 1);
|
||||
foreach (main.STRUCTURE structure in rootStructure.structures)
|
||||
{
|
||||
if (structure.gen)
|
||||
{
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("gen/" + structure.section + ".filter")));
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", string.Format("# Section: {0}", (object)structure.section) + Environment.NewLine);
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", File.ReadAllText(string.Format("structure/" + filter + "/" + structure.section + ".filter")));
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
File.AppendAllText("out/" + str + "_" + filter + ".filter", Environment.NewLine ?? "");
|
||||
}
|
||||
}
|
||||
main.ftotal = 0;
|
||||
main.fprog = 0;
|
||||
main.CleanDir();
|
||||
}
|
||||
}
|
||||
|
||||
public static void CleanDirData()
|
||||
{
|
||||
DirectoryInfo directoryInfo1 = new DirectoryInfo("data");
|
||||
DirectoryInfo directoryInfo2 = new DirectoryInfo("gen");
|
||||
foreach (FileSystemInfo file in directoryInfo1.GetFiles())
|
||||
file.Delete();
|
||||
foreach (FileSystemInfo file in directoryInfo2.GetFiles())
|
||||
file.Delete();
|
||||
}
|
||||
|
||||
public static void CleanDir()
|
||||
{
|
||||
foreach (FileSystemInfo file in new DirectoryInfo("gen").GetFiles())
|
||||
file.Delete();
|
||||
}
|
||||
|
||||
private static void AutoUpdater_ApplicationExitEvent() => Environment.Exit(-1);
|
||||
|
||||
public class REMVAR
|
||||
{
|
||||
|
@ -43,229 +167,19 @@ namespace PoE_MxFilterGen
|
|||
public class STRUCTURE
|
||||
{
|
||||
public string section { get; set; }
|
||||
|
||||
public bool gen { get; set; }
|
||||
|
||||
public bool @static { get; set; }
|
||||
|
||||
public bool remote { get; set; }
|
||||
|
||||
public string url { get; set; }
|
||||
}
|
||||
|
||||
public class RootStructure
|
||||
{
|
||||
public List<STRUCTURE> structures { get; set; }
|
||||
}
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// Check for the settings json
|
||||
if (!File.Exists("settings.json"))
|
||||
{
|
||||
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
|
||||
web.DownloadFile("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_temp_settings.json", "settings.json");
|
||||
}
|
||||
|
||||
msg.Splash();
|
||||
|
||||
// Get current league from MxD
|
||||
var ls = web.ReadString("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_var.json");
|
||||
REMVAR lj = JsonConvert.DeserializeObject<REMVAR>(ls);
|
||||
league = lj.league;
|
||||
|
||||
api = $"https://poe.ninja/api/data/";
|
||||
|
||||
msg.CMW($"League: {league}", true, 1);
|
||||
msg.CMW($"Min. Unique Value - {json.settings.GetUniqueValue()}c", true, 1);
|
||||
msg.CMW($"Min. Fossil Value - {json.settings.GetFossilValue()}c", true, 1);
|
||||
msg.CMW($"Min. Card Value - {json.settings.GetCardValue()}c", true, 1);
|
||||
|
||||
// Check if all the required dir exists
|
||||
msg.CMW($"Checking for required dirs...", true, 1);
|
||||
if (!Directory.Exists(@"data\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"data\");
|
||||
}
|
||||
if (!Directory.Exists(@"gen\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"gen\");
|
||||
}
|
||||
if (!Directory.Exists(@"structure\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"structure\");
|
||||
}
|
||||
|
||||
// Clean all generated data
|
||||
msg.CMW($"Cleaning the base dirs...", true, 1);
|
||||
CleanDirData();
|
||||
|
||||
// Clean the latest generated filter from settings path
|
||||
msg.CMW($"Cleaning the last filter from path...", true, 1);
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Normal.filter");
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict.filter");
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict_NSNLC.filter");
|
||||
|
||||
// Get latest poe.ninja api
|
||||
msg.CMW($"Downloading the latest API data from poe.ninja...", true, 1);
|
||||
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueArmour&language=en", "data/ninja.armour.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueWeapon&language=en", "data/ninja.weapon.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueAccessory&language=en", "data/ninja.accessory.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=DivinationCard&language=en", "data/ninja.card.json");
|
||||
web.SaveString(api + $"currencyoverview?league={league}&type=Currency&language=en", "data/ninja.currency.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=Fossil&language=en", "data/ninja.fossil.json");
|
||||
|
||||
// Generate Filter Array
|
||||
string[] filters;
|
||||
filters = new string[] { "Normal", "Strict", "Strict_NSNLC" };
|
||||
|
||||
foreach (string f in filters)
|
||||
{
|
||||
// Setup basic variable
|
||||
string filter_name = "MxFilter";
|
||||
|
||||
// Get the structure list
|
||||
var js = web.ReadString($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}.json");
|
||||
RootStructure j = JsonConvert.DeserializeObject<RootStructure>(js);
|
||||
|
||||
// Read the structure one by one to process gen
|
||||
// Generator (dlls) are downloaded from the web and executed in a separate AppDomain before the AD is unloaded to execute a new generator.
|
||||
// As we CAN'T unload an assembly, using AppDomains is the only way we can load/unload multiple assembly in a row.
|
||||
msg.CMW($@"Generating the {f} filter using {j.structures.Count} source(s)...", true, 1);
|
||||
ftotal = j.structures.Count;
|
||||
foreach (var sec in j.structures)
|
||||
{
|
||||
if (sec.gen == true)
|
||||
{
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW(string.Format("REMOTE_GEN {0}", sec.section), true, 1);
|
||||
web.DownloadFile($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}/{sec.section}.dll", $@"structure\{sec.section}.dll");
|
||||
json.settings.WriteSection(sec.section);
|
||||
|
||||
var bytes = GenerateAssemblyAndGetRawBytes(sec.section);
|
||||
|
||||
var appDomain = AppDomain.CreateDomain(sec.section, null, new AppDomainSetup
|
||||
{
|
||||
ShadowCopyFiles = "true",
|
||||
LoaderOptimization = LoaderOptimization.MultiDomainHost
|
||||
});
|
||||
|
||||
var assmblyLoaderType = typeof(AssmeblyLoader);
|
||||
var assemblyLoader = (IAssemblyLoader)appDomain.CreateInstanceFromAndUnwrap(assmblyLoaderType.Assembly.Location, assmblyLoaderType.FullName);
|
||||
assemblyLoader.Load(bytes);
|
||||
|
||||
AppDomain.Unload(appDomain);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW($@"REMOTE_GET {sec.section}", true, 1);
|
||||
web.SaveString($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}/{sec.section}.filter", $"structure/{sec.section}.filter");
|
||||
}
|
||||
}
|
||||
|
||||
// Create the final filter.
|
||||
msg.CMW($@"Creating the final filter...", true, 1);
|
||||
foreach (var sec in j.structures)
|
||||
{
|
||||
if (sec.gen == true)
|
||||
{
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("gen\\{0}.filter", sec.section)));
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", string.Format("# Section: {0}", sec.section) + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("structure\\{0}.filter", sec.section)));
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
ftotal = 0;
|
||||
fprog = 0;
|
||||
CleanDir();
|
||||
}
|
||||
|
||||
// Download the sounds from the remote list
|
||||
msg.CMW($@"Downloading the latest sound...", true, 1);
|
||||
var sl = web.ReadString("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_sound.json");
|
||||
REMSND slj = JsonConvert.DeserializeObject<REMSND>(sl);
|
||||
stotal = slj.sound.Count;
|
||||
foreach (string s in slj.sound)
|
||||
{
|
||||
sprog = sprog + 1;
|
||||
msg.drawProgress(sprog, stotal);
|
||||
if (File.Exists($@"{path}\My Games\Path of Exile\{s}")) { File.Delete($@"{path}\My Games\Path of Exile\{s}"); }
|
||||
web.DownloadFile($"https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/mp3/{s}", $@"{path}\My Games\Path of Exile\{s}");
|
||||
}
|
||||
|
||||
// Clean all generated data
|
||||
CleanDirData();
|
||||
}
|
||||
|
||||
private static byte[] GenerateAssemblyAndGetRawBytes(string dll)
|
||||
{
|
||||
string lp = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
|
||||
var path = $@"{lp}\structure\{dll}.dll";
|
||||
return File.ReadAllBytes(path);
|
||||
}
|
||||
|
||||
public static void CleanDirData()
|
||||
{
|
||||
DirectoryInfo dataDir = new DirectoryInfo(@"data\");
|
||||
DirectoryInfo genDir = new DirectoryInfo(@"gen\");
|
||||
DirectoryInfo strucDir = new DirectoryInfo(@"structure\");
|
||||
foreach (FileInfo file in dataDir.GetFiles())
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
foreach (FileInfo file in genDir.GetFiles())
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
foreach (FileInfo file in strucDir.GetFiles())
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public static void CleanDir()
|
||||
{
|
||||
DirectoryInfo genDir = new DirectoryInfo(@"gen\");
|
||||
DirectoryInfo strucDir = new DirectoryInfo(@"structure\");
|
||||
foreach (FileInfo file in genDir.GetFiles())
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
foreach (FileInfo file in strucDir.GetFiles())
|
||||
{
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private static void AutoUpdater_ApplicationExitEvent()
|
||||
{
|
||||
System.Environment.Exit(-1);
|
||||
public List<main.STRUCTURE> structures { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
public interface IAssemblyLoader
|
||||
{
|
||||
void Load(byte[] bytes);
|
||||
}
|
||||
|
||||
public class AssmeblyLoader : MarshalByRefObject, IAssemblyLoader
|
||||
{
|
||||
public void Load(byte[] bytes)
|
||||
{
|
||||
string section = main.section;
|
||||
var assembly = AppDomain.CurrentDomain.Load(bytes);
|
||||
Type type = AppDomain.CurrentDomain.GetAssemblies().SelectMany(t => t.GetTypes()).Where(t => String.Equals(t.Name, "Generator", StringComparison.Ordinal)).First();
|
||||
object o = Activator.CreateInstance(type);
|
||||
MethodInfo mi = o.GetType().GetMethod("Gen");
|
||||
Object[] ob = new object[] { json.settings.GetSection(), "tobedeleted", main.league, json.settings.GetUniqueValue(), json.settings.GetFossilValue(), json.settings.GetCardValue() };
|
||||
mi.Invoke(o, ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,197 +1,203 @@
|
|||
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 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);
|
||||
|
||||
File.AppendAllText("mxfiltergen.logs", String.Format("[{0}] {1}", date, msg) + Environment.NewLine);
|
||||
|
||||
//color switch
|
||||
ConsoleColor cc = ConsoleColor.White;
|
||||
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 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(""));
|
||||
Console.ForegroundColor = consoleColor;
|
||||
Console.WriteLine(string.Format(""));
|
||||
}
|
||||
|
||||
Console.ForegroundColor = ConsoleColor.White;
|
||||
}
|
||||
|
||||
public static void drawProgress(int progress, int total)
|
||||
{
|
||||
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);
|
||||
string beg = String.Format("[{0}] [", date);
|
||||
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(beg);
|
||||
Console.CursorLeft = total+beg.Length;
|
||||
{
|
||||
Console.Write(str4);
|
||||
Console.CursorLeft = total + str4.Length;
|
||||
Console.Write("]");
|
||||
}
|
||||
Console.CursorLeft = (progress + beg.Length)-1;
|
||||
Console.Write($"#");
|
||||
Console.CursorLeft = beg.Length + total + 2;
|
||||
Console.Write($"{progress}/{total}");
|
||||
if (progress == total)
|
||||
{
|
||||
Console.WriteLine();
|
||||
}
|
||||
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()
|
||||
|
@ -199,11 +205,11 @@ namespace PoE_MxFilterGen
|
|||
Console.ForegroundColor = ConsoleColor.Cyan;
|
||||
Console.WriteLine("");
|
||||
Console.WriteLine("#### MxFilterGen");
|
||||
Console.WriteLine(string.Format("#### VERSION: {0}",main.version));
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
|
@ -50,3 +50,15 @@ I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCo
|
|||
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
|
||||
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
|
||||
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.AssemblyReference.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.SuggestedBindingRedirects.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\System.Diagnostics.DiagnosticSource.xml
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.Fody.CopyLocal.cache
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
|
||||
D:\Dev\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,52 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="3.2.1" targetFramework="net452" />
|
||||
<package id="Fody" version="3.3.3" targetFramework="net452" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
|
||||
<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>
|
|
@ -1,27 +1,21 @@
|
|||
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;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
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)
|
||||
{
|
||||
|
@ -36,16 +30,14 @@ namespace PoE_MxFilterGen
|
|||
|
||||
public static string ReadString(string url)
|
||||
{
|
||||
WebClient wb = new WebClient();
|
||||
wb.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
var str = "";
|
||||
WebClient webClient = new WebClient();
|
||||
webClient.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
|
||||
string str = "";
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
str = wb.DownloadString(uri);
|
||||
Uri address = new Uri(url);
|
||||
str = webClient.DownloadString(address);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
@ -61,15 +53,13 @@ namespace PoE_MxFilterGen
|
|||
|
||||
public static void DownloadFile(string url, string path)
|
||||
{
|
||||
WebClient wb = new WebClient();
|
||||
wb.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
WebClient webClient = new WebClient();
|
||||
webClient.Encoding = Encoding.UTF8;
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
wb.DownloadFile(uri,path);
|
||||
Uri address = new Uri(url);
|
||||
webClient.DownloadFile(address, path);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue