1.0.3 release

This commit is contained in:
mikx 2017-10-22 05:25:32 -04:00
commit cdac15a62d
56 changed files with 94640 additions and 0 deletions

Binary file not shown.

22
PoE-MxFilterGen.sln Normal file
View File

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PoE-MxFilterGen", "PoE-MxFilterGen\PoE-MxFilterGen.csproj", "{9DE53609-C5DD-497A-B2B6-4F1E3528D652}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9DE53609-C5DD-497A-B2B6-4F1E3528D652}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9DE53609-C5DD-497A-B2B6-4F1E3528D652}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9DE53609-C5DD-497A-B2B6-4F1E3528D652}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9DE53609-C5DD-497A-B2B6-4F1E3528D652}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

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

View File

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{9DE53609-C5DD-497A-B2B6-4F1E3528D652}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>PoE_MxFilterGen</RootNamespace>
<AssemblyName>mxfiltergen</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="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" />
<Compile Include="web.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("PoE-MxFilterGen")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PoE-MxFilterGen")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("9de53609-c5dd-497a-b2b6-4f1e3528d652")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,55 @@
## Weapons Gen
Show
BaseType "Midnight Blade" "Ritual Sceptre" "Cutlass" "Vaal Axe" "Infernal Sword" "Prophecy Wand" "Vaal Blade" "Imperial Bow" "Royal Bow" "Jewelled Foil" "Steelhead" "Maelström Staff" "Despot Axe" "Sage Wand"
Rarity = Unique
SetTextColor 222 95 0
SetBackgroundColor 255 255 255
SetBorderColor 180 96 0
SetFontSize 45
PlayAlertSound 8 300
## END #######
## Armours Gen
Show
BaseType "Vaal Gauntlets" "Sorcerer Boots" "Sacrificial Garb" "Sage''s Robe" "Astral Plate" "Ebony Tower Shield" "Lacquered Garb" "Widowsilk Robe" "Occultist''s Vestment" "Necromancer Silks" "Cutthroat''s Garb" "Savant''s Robe" "Zodiac Leather" "Exquisite Leather" "Spidersilk Robe" "Full Wyrmscale" "Saintly Chainmail" "Crusader Plate" "Elegant Ringmail" "Destiny Leather" "Varnished Coat" "Golden Plate" "Two-Point Arrow Quiver" "Gladiator Plate" "Sentinel Jacket" "Wyrmscale Doublet" "Triumphant Lamellar" "Sadist Garb" "Full Dragonscale" "Vaal Regalia" "Holy Chainmail" "Destroyer Regalia" "Desert Brigandine" "Assassin''s Garb" "Buckskin Tunic" "Hubris Circlet" "Crusader Boots" "Legion Gloves" "Glorious Plate" "Scholar''s Robe" "Goathide Boots" "Rawhide Boots" "Mind Cage" "Clasped Mitts" "Callous Mask" "Raven Mask" "Ezomyte Tower Shield" "Arcanist Slippers" "Cedar Tower Shield" "Simple Robe" "Plate Vest" "Callous Mask Piece" "Fire Arrow Quiver" "Latticed Ringmail" "Conquest Chainmail" "Close Helmet" "Carnal Armour" "Copper Plate"
Rarity = Unique
SetTextColor 222 95 0
SetBackgroundColor 255 255 255
SetBorderColor 180 96 0
SetFontSize 45
PlayAlertSound 8 300
## END #######
## Accessories Gen
Show
BaseType "Leather Belt" "Greatwolf Talisman" "Rustic Sash" "Prismatic Ring" "Two-Stone Ring" "Citrine Amulet" "Amber Amulet" "Onyx Amulet" "Moonstone Ring" "Agate Amulet" "Topaz Ring" "Jade Amulet" "Gold Amulet" "Ruby Amulet" "Diamond Ring" "Turquoise Amulet" "Unset Ring" "Wereclaw Talisman" "Sapphire Ring" "Lapis Amulet"
Rarity = Unique
SetTextColor 222 95 0
SetBackgroundColor 255 255 255
SetBorderColor 180 96 0
SetFontSize 45
PlayAlertSound 8 300
## END #######
## Maps Gen
Show
BaseType "Chateau Map" "Museum Map" "Courtyard Map" "Harbinger Map"
Rarity = Unique
SetTextColor 222 95 0
SetBackgroundColor 255 255 255
SetBorderColor 180 96 0
SetFontSize 45
PlayAlertSound 8 300
## END #######
## Cards Gen
Show
Class "Divination Card"
BaseType "House of Mirrors" "The Doctor" "The Fiend" "The Spark and the Flame" "Mawr Blaidd" "Hunter''s Reward" "The Queen" "The Immortal" "The Wolf" "The Standoff" "Abandoned Wealth" "The Wolven King''s Bite" "The Dragon''s Heart" "Pride Before the Fall" "Wealth and Power" "The King''s Heart" "Last Hope" "The Celestial Justicar" "Heterochromia" "The Last One Standing"
SetTextColor 20 65 110
SetBackgroundColor 224 224 224
SetBorderColor 57 97 145
SetFontSize 45
PlayAlertSound 5 300
## END #######

Binary file not shown.

View File

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

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -0,0 +1,6 @@
{
"api":"http://poe.ninja/api/Data/",
"league":"Harbinger",
"confidence":5,
"minimumValue":20
}

View File

@ -0,0 +1,91 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.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

@ -0,0 +1,91 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.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

@ -0,0 +1,91 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.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

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

@ -0,0 +1,45 @@
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 SETTINGS
{
public string api { get; set; }
public string league { get; set; }
public int confidence { get; set; }
public int minimumValue { get; set; }
}
class settings
{
public static string GetAPI()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.api;
}
public static string GetLeague()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.league;
}
public static int GetConfidence()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.confidence;
}
public static int GetMinimumValue()
{
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
return j.minimumValue;
}
}
}

View File

@ -0,0 +1,91 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen.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);
}
}
}

58
PoE-MxFilterGen/main.cs Normal file
View File

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
class main
{
private static DateTime dt = DateTime.Now;
public static string version = "1.0.3";
public static string release = "stable";
public static string fDate = string.Format("{0}-{1}-{2}",dt.Day,dt.Month,dt.Year);
static void Main(string[] args)
{
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);
// Clean all generated data
DirectoryInfo dataDir = new DirectoryInfo(@"data\");
DirectoryInfo genDir = new DirectoryInfo(@"gen\");
foreach (FileInfo file in dataDir.GetFiles())
{
file.Delete();
}
foreach (FileInfo file in genDir.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");
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();
}
}
}

134
PoE-MxFilterGen/msg.cs Normal file
View File

@ -0,0 +1,134 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PoE_MxFilterGen
{
class msg
{
public static void CM(string msg, bool time, int color)
{
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);
//color switch
ConsoleColor cc = ConsoleColor.White;
switch (color)
{
case 0:
//nothing
break;
case 1:
cc = ConsoleColor.Cyan;
break;
case 2:
cc = ConsoleColor.Green;
break;
case 3:
cc = ConsoleColor.Red;
break;
}
if (time)
{
Console.ForegroundColor = cc;
Console.WriteLine(String.Format("[{0}] {1}", date, msg));
}
else
{
Console.ForegroundColor = cc;
Console.WriteLine(String.Format("{0}", msg));
}
Console.ForegroundColor = ConsoleColor.White;
}
public static void CMW(string msg, bool time, int color)
{
string date = String.Format("{0}:{1}:{2}", DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second);
File.AppendAllText("mxfiltergen.logs", String.Format("[{0}] {1}", date, msg) + Environment.NewLine);
//color switch
ConsoleColor cc = ConsoleColor.White;
switch (color)
{
case 0:
//nothing
break;
case 1:
cc = ConsoleColor.Cyan;
break;
case 2:
cc = ConsoleColor.Green;
break;
case 3:
cc = ConsoleColor.Red;
break;
}
if (time)
{
Console.ForegroundColor = cc;
Console.WriteLine(String.Format("[{0}] {1}", date, msg));
}
else
{
Console.ForegroundColor = cc;
Console.WriteLine(String.Format(""));
}
Console.ForegroundColor = ConsoleColor.White;
}
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("");
Console.ForegroundColor = ConsoleColor.White;
}
}
}

View File

@ -0,0 +1 @@
bfff0fcf98b7df58adeb8698423149e393b63067

View File

@ -0,0 +1,8 @@
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe.config
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.exe
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\bin\Debug\mxfiltergen.pdb
D:\_MxGit\PoE-MxFilterGen\PoE-MxFilterGen\obj\Debug\PoE-MxFilterGen.csprojResolveAssemblyReference.cache
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

Binary file not shown.

Binary file not shown.

View File

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

34
PoE-MxFilterGen/web.cs Normal file
View File

@ -0,0 +1,34 @@
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
{
public static void SaveString(string url, string path)
{
WebClient wb = new WebClient();
wb.Encoding = Encoding.UTF8;
try
{
Uri uri = new Uri(url);
var str = wb.DownloadString(uri);
File.AppendAllText(path, str, Encoding.UTF8);
}
catch (WebException ex)
{
msg.CMW(ex.Message, true, 3);
msg.CMW("URL: " + url, true, 3);
}
catch (Exception ex)
{
msg.CMW(ex.Message, true, 3);
}
}
}
}

View File

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

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

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

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