poe.watch api update 02
This commit is contained in:
parent
c921689116
commit
61d55362a6
|
@ -1,53 +0,0 @@
|
|||
<?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>{30965CCD-46DF-47A3-BDBC-6FC0B0900B4E}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CHANCING__Belt_</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Belt%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,100 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Belt")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Belt)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Belt)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("30965ccd-46df-47a3-bdbc-6fc0b0900b4e")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,53 +0,0 @@
|
|||
<?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>{B4433CCE-879E-4061-9E18-518D473A39DC}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>chancing_body</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Body%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,101 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Body Armour")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Body)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Body)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("b4433cce-879e-4061-9e18-518d473a39dc")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,53 +0,0 @@
|
|||
<?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>{BB8A89F2-5FD2-476C-8484-B01B60D70576}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>chancing_boot</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Boots%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,101 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Boots")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Boots)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Boots)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("bb8a89f2-5fd2-476c-8484-b01b60d70576")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,53 +0,0 @@
|
|||
<?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>{08A15B18-3572-4A15-8FEB-16933C1E34C2}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CHANCING__Gloves_</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Gloves%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,101 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Gloves")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Gloves)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Gloves)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("08a15b18-3572-4a15-8feb-16933c1e34c2")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,53 +0,0 @@
|
|||
<?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>{F66DADB1-0E93-406F-AA8C-5FD93733455A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CHANCING__Helmet_</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Helmet%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,101 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Helmet")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Helmet)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Helmet)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("f66dadb1-0e93-406f-aa8c-5fd93733455a")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,53 +0,0 @@
|
|||
<?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>{EEAB1016-0C68-441C-9BED-58C00163BC3B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CHANCING__Quiver_</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Quiver%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,101 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Quiver")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Quiver)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Quiver)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("eeab1016-0c68-441c-9bed-58c00163bc3b")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
|
@ -1,53 +0,0 @@
|
|||
<?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>{9530B929-416B-43FE-A1BA-FEEBFFB97575}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CHANCING__Shield_</RootNamespace>
|
||||
<AssemblyName>CHANCING %28Shield%29</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Builds\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<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" />
|
||||
<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="Generator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
|
@ -1,101 +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
|
||||
{
|
||||
public class ChanceSparklineBody
|
||||
{
|
||||
public List<double?> data { get; set; }
|
||||
public double? totalChange { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceExplicitModifierBody
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceLineBody
|
||||
{
|
||||
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 ChanceSparklineBody sparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ChanceExplicitModifierBody> 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 Theme
|
||||
{
|
||||
public string border { get; set; }
|
||||
public string background { get; set; }
|
||||
public string text { get; set; }
|
||||
public int text_size { get; set; }
|
||||
}
|
||||
|
||||
public class ChanceRootBody
|
||||
{
|
||||
public List<ChanceLineBody> lines { get; set; }
|
||||
}
|
||||
|
||||
class Generator
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue, int chanceMinValue, int confidence)
|
||||
{
|
||||
Theme jt = JsonConvert.DeserializeObject<Theme>(File.ReadAllText("structure/Chancing.json", Encoding.UTF8));
|
||||
|
||||
List<string> itemBase = new List<string>();
|
||||
ChanceRootBody j = JsonConvert.DeserializeObject<ChanceRootBody>(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 >= confidence && ln.links <= 4 && ln.itemType == "Shield")
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
if (ln.chaosValue >= chanceMinValue)
|
||||
{
|
||||
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 = Normal" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 50" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetTextColor {jt.text}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetBorderColor {jt.border}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" SetFontSize {jt.text_size}", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Les informations générales relatives à un assembly dépendent de
|
||||
// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations
|
||||
// associées à un assembly.
|
||||
[assembly: AssemblyTitle("CHANCING (Shield)")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CHANCING (Shield)")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly
|
||||
// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de
|
||||
// COM, affectez la valeur true à l'attribut ComVisible sur ce type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM
|
||||
[assembly: Guid("9530b929-416b-43fe-a1ba-feebffb97575")]
|
||||
|
||||
// Les informations de version pour un assembly se composent des quatre valeurs suivantes :
|
||||
//
|
||||
// Version principale
|
||||
// Version secondaire
|
||||
// Numéro de build
|
||||
// Révision
|
||||
//
|
||||
// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut
|
||||
// en utilisant '*', comme indiqué ci-dessous :
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -1,4 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net461" />
|
||||
</packages>
|
Loading…
Reference in New Issue