15 Commits

Author SHA1 Message Date
mikx
c4a3b747e6 Removerd unused stuff 2020-07-09 23:46:39 -04:00
mikx
07d6e15fdc Merge branch 'master' of http://git.mikx.xyz/mikx/PoE-MxFilterGen
Merge because reasons...
2020-07-09 23:43:51 -04:00
mikx
eb1bd70abb Major Tweaks + SSF Removed + New Strict Level 2020-07-09 23:43:11 -04:00
ba45b06a53 Deleted "CHANGELOG". No longer used. 2020-07-01 18:41:29 -04:00
mikx
0aa483cb1b 8.0.0 fixes 2020-07-01 12:49:41 -04:00
mikx
b729413646 New API + Settings Tweaks + URL Changes 2020-07-01 12:25:13 -04:00
mikx
8751fd185a Currency + Fossil Gen 2020-01-18 20:54:29 -05:00
mikx
e44913ecb8 url fix 2019-04-03 18:41:20 -04:00
mikx
a4e5dc0476 6.2.0 - url updates 2019-04-01 06:33:26 -04:00
mikx
aa76d9f9b0 6.1.0 - Strict Setting (true/false) 2019-03-30 19:57:50 -04:00
mikx
b069e48fab 6.0.1 commit 2019-03-30 01:14:55 -04:00
mikx
672b2133f6 5.2.1 - Progress + Debug Fix 2018-12-29 00:39:35 -05:00
mikx
55fe83c714 5.0.0 - Custom Sounds 2018-12-22 23:04:30 -05:00
mikx
5fb7a3436a 4.3.0 (removed strict) 2018-09-16 23:46:58 -04:00
mikx
ba5b6c3f15 2.0.0 - structure release 2018-01-02 06:48:45 -05:00
43 changed files with 601 additions and 79363 deletions

Binary file not shown.

View File

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

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

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

View File

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

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.3.2.1\build\Costura.Fody.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -8,9 +9,12 @@
<OutputType>Exe</OutputType>
<RootNamespace>PoE_MxFilterGen</RootNamespace>
<AssemblyName>mxfiltergen</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -31,9 +35,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>Chaos_Orb.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Costura, Version=3.2.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
<HintPath>..\packages\Costura.Fody.3.2.1\lib\net40\Costura.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
@@ -45,12 +55,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="json\accessories.cs" />
<Compile Include="json\armours.cs" />
<Compile Include="json\cards.cs" />
<Compile Include="json\maps.cs" />
<Compile Include="json\settings.cs" />
<Compile Include="json\weapons.cs" />
<Compile Include="main.cs" />
<Compile Include="msg.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -60,5 +65,16 @@
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Chaos_Orb.ico" />
</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'))" />
</Target>
</Project>

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyVersion("8.1.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,91 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.json
{
public class SparklineAccessory
{
public List<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class ExplicitModifierAccessory
{
public string text { get; set; }
public bool optional { get; set; }
}
public class LineAccessory
{
public int id { get; set; }
public string name { get; set; }
public string icon { get; set; }
public int mapTier { get; set; }
public int levelRequired { get; set; }
public string baseType { get; set; }
public int stackSize { get; set; }
public object variant { get; set; }
public object prophecyText { get; set; }
public object artFilename { get; set; }
public int links { get; set; }
public int itemClass { get; set; }
public SparklineAccessory sparkline { get; set; }
public List<object> implicitModifiers { get; set; }
public List<ExplicitModifierAccessory> explicitModifiers { get; set; }
public string flavourText { get; set; }
public string itemType { get; set; }
public double chaosValue { get; set; }
public double exaltedValue { get; set; }
public int count { get; set; }
}
public class RootAccessory
{
public List<LineAccessory> lines { get; set; }
}
class accessories
{
private static string iB;
public static void GenAccessories()
{
List<string> itemBase = new List<string>();
RootAccessory j = JsonConvert.DeserializeObject<RootAccessory>(File.ReadAllText("data/ninja.accessory.json", Encoding.UTF8));
foreach (var ln in j.lines)
{
// Check if the item count is at least equal to the desired confidence level
if (ln.count >= json.settings.GetConfidence())
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.baseType, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Accessories Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,91 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.json
{
public class SparklineArmour
{
public List<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class ExplicitModifierArmour
{
public string text { get; set; }
public bool optional { get; set; }
}
public class LineArmour
{
public int id { get; set; }
public string name { get; set; }
public string icon { get; set; }
public int mapTier { get; set; }
public int levelRequired { get; set; }
public string baseType { get; set; }
public int stackSize { get; set; }
public object variant { get; set; }
public object prophecyText { get; set; }
public object artFilename { get; set; }
public int links { get; set; }
public int itemClass { get; set; }
public SparklineArmour sparkline { get; set; }
public List<object> implicitModifiers { get; set; }
public List<ExplicitModifierArmour> explicitModifiers { get; set; }
public string flavourText { get; set; }
public string itemType { get; set; }
public double chaosValue { get; set; }
public double exaltedValue { get; set; }
public int count { get; set; }
}
public class RootArmour
{
public List<LineArmour> lines { get; set; }
}
class armours
{
private static string iB;
public static void GenArmours()
{
List<string> itemBase = new List<string>();
RootArmour j = JsonConvert.DeserializeObject<RootArmour>(File.ReadAllText("data/ninja.armour.json", Encoding.UTF8));
foreach (var ln in j.lines)
{
// Check if the item count is at least equal to the desired confidence level
if (ln.count >= json.settings.GetConfidence() && ln.links <= 4)
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.baseType, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Armours Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,91 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.json
{
public class SparklineCard
{
public List<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class ExplicitModifierCard
{
public string text { get; set; }
public bool optional { get; set; }
}
public class LineCard
{
public int id { get; set; }
public string name { get; set; }
public string icon { get; set; }
public int mapTier { get; set; }
public int levelRequired { get; set; }
public string baseType { get; set; }
public int stackSize { get; set; }
public object variant { get; set; }
public object prophecyText { get; set; }
public string artFilename { get; set; }
public int links { get; set; }
public int itemClass { get; set; }
public SparklineCard sparkline { get; set; }
public List<object> implicitModifiers { get; set; }
public List<ExplicitModifierCard> explicitModifiers { get; set; }
public string flavourText { get; set; }
public string itemType { get; set; }
public double chaosValue { get; set; }
public double exaltedValue { get; set; }
public int count { get; set; }
}
public class RootCard
{
public List<LineCard> lines { get; set; }
}
class cards
{
private static string iB;
public static void GenCards()
{
List<string> itemBase = new List<string>();
RootCard j = JsonConvert.DeserializeObject<RootCard>(File.ReadAllText("data/ninja.card.json", Encoding.UTF8));
foreach (var ln in j.lines)
{
// Check if the item count is at least equal to the desired confidence level
if (ln.count >= json.settings.GetConfidence())
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.name, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.name))
{
itemBase.Add(ln.name);
iB = iB + string.Format(@" ""{0}""", ln.name);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Cards Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", @" Class ""Divination Card""" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 20 65 110" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 224 224 224" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 57 97 145" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 5 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,85 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.json
{
public class SparklineMap
{
public List<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class LineMap
{
public int id { get; set; }
public string name { get; set; }
public string icon { get; set; }
public int mapTier { get; set; }
public int levelRequired { get; set; }
public string baseType { get; set; }
public int stackSize { get; set; }
public string variant { get; set; }
public object prophecyText { get; set; }
public object artFilename { get; set; }
public int links { get; set; }
public int itemClass { get; set; }
public SparklineMap sparkline { get; set; }
public List<object> implicitModifiers { get; set; }
public List<object> explicitModifiers { get; set; }
public string flavourText { get; set; }
public string itemType { get; set; }
public double chaosValue { get; set; }
public double exaltedValue { get; set; }
public int count { get; set; }
}
public class RootMap
{
public List<LineMap> lines { get; set; }
}
class maps
{
private static string iB;
public static void GenMaps()
{
List<string> itemBase = new List<string>();
RootMap j = JsonConvert.DeserializeObject<RootMap>(File.ReadAllText("data/ninja.map.json", Encoding.UTF8));
foreach (var ln in j.lines)
{
// Check if the item count is at least equal to the desired confidence level
if (ln.count >= json.settings.GetConfidence())
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.", ln.baseType, ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Maps Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -10,36 +10,55 @@ namespace PoE_MxFilterGen.json
{
public class SETTINGS
{
public string git { get; set; }
public string api { get; set; }
public string league { get; set; }
public int confidence { get; set; }
public int minimumValue { get; set; }
public int uniqueValue { get; set; }
public int fossilValue { get; set; }
public int cardValue { get; set; }
public bool verbose { get; set; }
public bool ssf { get; set; }
public string section { get; set; }
}
class settings
{
public static string GetAPI()
public static int GetUniqueValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.api;
return j.uniqueValue;
}
public static string GetLeague()
public static int GetFossilValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.league;
return j.fossilValue;
}
public static int GetConfidence()
public static int GetCardValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.confidence;
return j.cardValue;
}
public static int GetMinimumValue()
public static string GetSection()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.minimumValue;
return j.section;
}
public static void WriteSection(string section)
{
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($@"settings.json"));
SETTINGS se = new SETTINGS
{
uniqueValue = js.uniqueValue,
fossilValue = js.fossilValue,
cardValue = js.cardValue,
section = section
};
var raw = JsonConvert.SerializeObject(se, Formatting.Indented);
File.WriteAllText($@"settings.json", raw);
}
}
}

View File

@@ -1,91 +0,0 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.json
{
public class Sparkline
{
public List<double?> data { get; set; }
public double? totalChange { get; set; }
}
public class ExplicitModifier
{
public string text { get; set; }
public bool optional { get; set; }
}
public class LineWeapon
{
public int id { get; set; }
public string name { get; set; }
public string icon { get; set; }
public int mapTier { get; set; }
public int levelRequired { get; set; }
public string baseType { get; set; }
public int stackSize { get; set; }
public object variant { get; set; }
public object prophecyText { get; set; }
public object artFilename { get; set; }
public int links { get; set; }
public int itemClass { get; set; }
public Sparkline sparkline { get; set; }
public List<object> implicitModifiers { get; set; }
public List<ExplicitModifier> explicitModifiers { get; set; }
public string flavourText { get; set; }
public string itemType { get; set; }
public double chaosValue { get; set; }
public double exaltedValue { get; set; }
public int count { get; set; }
}
public class RootWeapon
{
public List<LineWeapon> lines { get; set; }
}
class weapons
{
private static string iB;
public static void GenWeapons()
{
List<string> itemBase = new List<string>();
RootWeapon j = JsonConvert.DeserializeObject<RootWeapon>(File.ReadAllText("data/ninja.weapon.json", Encoding.UTF8));
foreach (var ln in j.lines)
{
// Check if the item count is at least equal to the desired confidence level
if (ln.count >= json.settings.GetConfidence() && ln.links <= 4)
{
// Check if the item value is equal or superior to the minimum value
if (ln.chaosValue >= json.settings.GetMinimumValue())
{
msg.CMW(string.Format("[{0}][{1}c] Added to the list.",ln.baseType,ln.chaosValue), true, 1);
if (!itemBase.Contains(ln.baseType))
{
itemBase.Add(ln.baseType);
iB = iB + string.Format(@" ""{0}""", ln.baseType);
}
}
}
}
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## Weapons Gen" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "Show" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " Rarity = Unique" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetTextColor 222 95 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetBorderColor 180 96 0" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " SetFontSize 45" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", " PlayAlertSound 8 300" + Environment.NewLine, Encoding.UTF8);
File.AppendAllText(@"gen\" + main.fDate + "_gen.txt", "## END #######" + Environment.NewLine + Environment.NewLine, Encoding.UTF8);
}
}
}

View File

@@ -1,10 +1,16 @@
using System;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using static System.Net.Mime.MediaTypeNames;
namespace PoE_MxFilterGen
{
@@ -12,19 +18,83 @@ namespace PoE_MxFilterGen
{
private static DateTime dt = DateTime.Now;
public static string version = "1.0.4";
public static string release = "stable";
public static string fDate = string.Format("{0}-{1}-{2}",dt.Day,dt.Month,dt.Year);
public static string version = "8.2.0";
public static string fDate = string.Format("{0}-{1}-{2}", dt.Day, dt.Month, dt.Year);
public static string api = "";
public static string giturl = "https://raw.githubusercontent.com/mikxqc";
public static string section = "";
public static string league = "";
public static string path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
public static int fprog = 0;
public static int ftotal = 0;
public static int sprog = 0;
public static int stotal = 0;
public static bool deb = true;
public class REMVAR
{
public string league { get; set; }
}
public class REMSND
{
public List<string> sound { get; set; }
}
public class STRUCTURE
{
public string section { get; set; }
public bool gen { get; set; }
public bool @static { get; set; }
public bool remote { get; set; }
public string url { get; set; }
}
public class RootStructure
{
public List<STRUCTURE> structures { get; set; }
}
static void Main(string[] args)
{
msg.Splash();
msg.CMW(string.Format("API: {0}", json.settings.GetAPI()),true,1);
msg.CMW(string.Format("League: {0}", json.settings.GetLeague()), true, 1);
msg.CMW(string.Format("Confidence: {0}", json.settings.GetConfidence().ToString()), true, 1);
msg.CMW(string.Format("Minimum Value: {0}c", json.settings.GetMinimumValue().ToString()), true, 1);
// Check for the settings json
if (!File.Exists("settings.json"))
{
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
web.DownloadFile("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/json/mxfiltergen_temp_settings.json", "settings.json");
}
// Check if data and gen exists
msg.Splash();
//Update Logic
msg.CMW("Checking for update...",true,1);
string remote_version = web.ReadString(@"https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/txt/mxfiltergen_version.txt");
if (remote_version != version && deb == false)
{
web.DownloadFile("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/bin/mxfiltergen_updater.exe", "PoE-MxFilterGen-Updater.exe");
Process.Start("PoE-MxFilterGen-Updater.exe");
Process.GetCurrentProcess().Kill();
}
// Get current league from MxD
var ls = web.ReadString("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/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\");
@@ -33,10 +103,134 @@ namespace PoE_MxFilterGen
{
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/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/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/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://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/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://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/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();
@@ -45,24 +239,48 @@ namespace PoE_MxFilterGen
{
file.Delete();
}
foreach (FileInfo file in strucDir.GetFiles())
{
file.Delete();
}
}
// Get latest poe.ninja api
web.SaveString(json.settings.GetAPI() + "GetUniqueArmourOverview?league=" + json.settings.GetLeague(), "data/ninja.armour.json");
web.SaveString(json.settings.GetAPI() + "GetUniqueWeaponOverview?league=" + json.settings.GetLeague(), "data/ninja.weapon.json");
web.SaveString(json.settings.GetAPI() + "GetUniqueAccessoryOverview?league=" + json.settings.GetLeague(), "data/ninja.accessory.json");
web.SaveString(json.settings.GetAPI() + "GetUniqueMapOverview?league=" + json.settings.GetLeague(), "data/ninja.map.json");
web.SaveString(json.settings.GetAPI() + "GetDivinationCardsOverview?league=" + json.settings.GetLeague(), "data/ninja.card.json");
public static void CleanDir()
{
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();
}
}
msg.CMW("########## Generating Weapons ##########",true,1);
json.weapons.GenWeapons();
msg.CMW("########## Generating Armours ##########", true, 1);
json.armours.GenArmours();
msg.CMW("########## Generating Accessories ##########", true, 1);
json.accessories.GenAccessories();
msg.CMW("########## Generating Maps ##########", true, 1);
json.maps.GenMaps();
msg.CMW("########## Generating Cards ##########", true, 1);
json.cards.GenCards();
private static void AutoUpdater_ApplicationExitEvent()
{
System.Environment.Exit(-1);
}
}
public interface IAssemblyLoader
{
void Load(byte[] bytes);
}
public class AssmeblyLoader : MarshalByRefObject, IAssemblyLoader
{
public void Load(byte[] bytes)
{
string section = main.section;
var assembly = AppDomain.CurrentDomain.Load(bytes);
Type type = AppDomain.CurrentDomain.GetAssemblies().SelectMany(t => t.GetTypes()).Where(t => String.Equals(t.Name, "Generator", StringComparison.Ordinal)).First();
object o = Activator.CreateInstance(type);
MethodInfo mi = o.GetType().GetMethod("Gen");
Object[] ob = new object[] { json.settings.GetSection(), "tobedeleted", main.league, json.settings.GetUniqueValue(), json.settings.GetFossilValue(), json.settings.GetCardValue() };
mi.Invoke(o, ob);
}
}
}

View File

@@ -78,7 +78,37 @@ namespace PoE_MxFilterGen
public static void CMW(string msg, bool time, int color)
{
string date = String.Format("{0}:{1}:{2}", DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
string seconds = "";
string minutes = "";
string hours = "";
if (DateTime.Now.Second < 10)
{
seconds = String.Format("0{0}", DateTime.Now.Second);
}
else
{
seconds = DateTime.Now.Second.ToString();
}
if (DateTime.Now.Minute < 10)
{
minutes = String.Format("0{0}", DateTime.Now.Minute);
}
else
{
minutes = DateTime.Now.Minute.ToString();
}
if (DateTime.Now.Hour < 10)
{
hours = String.Format("0{0}", DateTime.Now.Hour);
}
else
{
hours = DateTime.Now.Hour.ToString();
}
string date = String.Format("{0}:{1}:{2}", hours, minutes, seconds);
File.AppendAllText("mxfiltergen.logs", String.Format("[{0}] {1}", date, msg) + Environment.NewLine);
@@ -114,19 +144,64 @@ namespace PoE_MxFilterGen
Console.ForegroundColor = ConsoleColor.White;
}
public static void drawProgress(int progress, int total)
{
string seconds = "";
string minutes = "";
string hours = "";
if (DateTime.Now.Second < 10)
{
seconds = String.Format("0{0}", DateTime.Now.Second);
}
else
{
seconds = DateTime.Now.Second.ToString();
}
if (DateTime.Now.Minute < 10)
{
minutes = String.Format("0{0}", DateTime.Now.Minute);
}
else
{
minutes = DateTime.Now.Minute.ToString();
}
if (DateTime.Now.Hour < 10)
{
hours = String.Format("0{0}", DateTime.Now.Hour);
}
else
{
hours = DateTime.Now.Hour.ToString();
}
string date = String.Format("{0}:{1}:{2}", hours, minutes, seconds);
string beg = String.Format("[{0}] [", date);
Console.ForegroundColor = ConsoleColor.Cyan;
if (progress == 1)
{
Console.Write(beg);
Console.CursorLeft = total+beg.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();
}
}
public static void Splash()
{
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine("");
Console.WriteLine(@"############################");
Console.WriteLine(@"# #");
Console.WriteLine(@"# MxFilterGen #");
Console.WriteLine(@"# by mikx #");
Console.WriteLine(@"# poe.mikx.xyz #");
Console.WriteLine(@"# #");
Console.WriteLine(@"#--------------------------#");
Console.WriteLine(String.Format("# MxFilterGen {0}-{1} #", main.version, main.release));
Console.WriteLine(@"############################");
Console.WriteLine("#### MxFilterGen");
Console.WriteLine(string.Format("#### VERSION: {0}",main.version));
Console.WriteLine("#### DEV: mikx");
Console.WriteLine("#### POWERED BY: poe.ninja");
Console.WriteLine("");
Console.ForegroundColor = ConsoleColor.White;
}

View File

@@ -1 +1 @@
bfff0fcf98b7df58adeb8698423149e393b63067
710ffc5d9eff805a0b215f1fa96d491e0bdd21cf

View File

@@ -6,3 +6,47 @@ D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojResolveAssemblyReference.cache
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
D:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.dll
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojResolveAssemblyReference.cache
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
E:\_MxGit\PoE\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
E:\_MxGitHub\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojAssemblyReference.cache
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojAssemblyReference.cache
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
I:\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
I:\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\Newtonsoft.Json.xml
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojAssemblyReference.cache
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CoreCompileInputs.cache
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csproj.CopyComplete
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.exe
I:\MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\mxfiltergen.pdb

View File

@@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net452" />
<package id="Costura.Fody" version="3.2.1" targetFramework="net452" />
<package id="Fody" version="3.3.3" targetFramework="net452" developmentDependency="true" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net452" />
</packages>

View File

@@ -14,6 +14,9 @@ namespace PoE_MxFilterGen
{
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
try
{
Uri uri = new Uri(url);
@@ -30,5 +33,53 @@ namespace PoE_MxFilterGen
msg.CMW(ex.Message, true, 3);
}
}
public static string ReadString(string url)
{
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
var str = "";
try
{
Uri uri = new Uri(url);
str = wb.DownloadString(uri);
}
catch (WebException ex)
{
msg.CMW(ex.Message, true, 3);
msg.CMW("URL: " + url, true, 3);
}
catch (Exception ex)
{
msg.CMW(ex.Message, true, 3);
}
return str;
}
public static void DownloadFile(string url, string path)
{
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
try
{
Uri uri = new Uri(url);
wb.DownloadFile(uri,path);
}
catch (WebException ex)
{
msg.CMW(ex.Message, true, 3);
msg.CMW("URL: " + url, true, 3);
}
catch (Exception ex)
{
msg.CMW(ex.Message, true, 3);
}
}
}
}

View File

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

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