Compare commits
7 Commits
release-8.
...
de0255f6e0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de0255f6e0 | ||
|
|
ee66400e2c | ||
|
|
d744553931 | ||
|
|
c4a3b747e6 | ||
|
|
07d6e15fdc | ||
|
|
eb1bd70abb | ||
| ba45b06a53 |
@@ -1,6 +0,0 @@
|
||||
[January 1, 2018][2.0.0]
|
||||
+ Structure release. Will now generate from method or static data.
|
||||
|
||||
[October 26, 2017][1.0.4]
|
||||
F Fixed 3 crashes due to "not nullable variables".
|
||||
F Will now verify if \data and \gen exists and create them if they don't.
|
||||
@@ -15,6 +15,21 @@
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -38,6 +53,21 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Chaos_Orb.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>false</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=3.2.1.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.3.2.1\lib\net40\Costura.dll</HintPath>
|
||||
@@ -55,21 +85,32 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="generator\fossil.cs" />
|
||||
<Compile Include="json\settings.cs" />
|
||||
<Compile Include="main.cs" />
|
||||
<Compile Include="msg.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="TierGen.cs" />
|
||||
<Compile Include="web.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Chaos_Orb.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 et x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Fody.3.3.3\build\Fody.targets" Condition="Exists('..\packages\Fody.3.3.3\build\Fody.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("PoE-MxFilterGen")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyDescription("Path of Exile Filter Generator")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCompany("MxMedia")]
|
||||
[assembly: AssemblyProduct("PoE-MxFilterGen")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyCopyright("Copyright © MxMedia 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("9de53609-c5dd-497a-b2b6-4f1e3528d652")]
|
||||
[assembly: Guid("9de53609-c5dd-497a-b2b6-4f1e3528d663")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyVersion("8.4.0.0")]
|
||||
[assembly: AssemblyFileVersion("8.4.0.0")]
|
||||
|
||||
70
PoE-MxFilterGen/Properties/app.manifest
Normal file
70
PoE-MxFilterGen/Properties/app.manifest
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<!-- Options du manifeste de contrôle de compte d'utilisateur
|
||||
Si vous souhaitez modifier le niveau du contrôle de compte d'utilisateur Windows, remplacez le
|
||||
nœud requestedExecutionLevel par l'une des propositions suivantes.
|
||||
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||
|
||||
La spécification de l'élément requestedExecutionLevel désactive la virtualisation de fichiers et du Registre.
|
||||
Supprimez cet élément si votre application a besoin de la virtualisation pour des
|
||||
raisons de compatibilité descendante.
|
||||
-->
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
<applicationRequestMinimum>
|
||||
<defaultAssemblyRequest permissionSetReference="Custom" />
|
||||
<PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" />
|
||||
</applicationRequestMinimum>
|
||||
</security>
|
||||
</trustInfo>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Liste des versions de Windows pour lesquelles cette application a été testée,
|
||||
et sur lesquelles elle doit fonctionner. Décommentez éléments appropriés,
|
||||
et Windows va automatiquement sélectionner l'environnement le plus compatible. -->
|
||||
<!-- Windows Vista -->
|
||||
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||
<!-- Windows 7 -->
|
||||
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||
<!-- Windows 8 -->
|
||||
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||
<!-- Windows 8.1 -->
|
||||
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||
<!-- Windows 10 -->
|
||||
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||
</application>
|
||||
</compatibility>
|
||||
<!-- Indique que l'application prend en charge DPI et qu'elle n'est pas automatiquement mise à l'échelle par Windows à un niveau de
|
||||
DPI plus élevé. Les applications Windows Presentation Foundation (WPF) prennent automatiquement en charge DPI et n'ont pas besoin
|
||||
d'opter pour ce choix. Les applications Windows Forms qui ciblent .NET Framework 4.6 et qui optent pour ce paramètre, doivent
|
||||
également affecter la valeur 'true' au paramètre 'EnableWindowsFormsHighDpiAutoResizing' dans leur fichier app.config. -->
|
||||
<!--
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
-->
|
||||
<!-- Activer les thèmes pour les contrôles et boîtes de dialogue communes de Windows (Windows XP et version ultérieure) -->
|
||||
<!--
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
-->
|
||||
</assembly>
|
||||
@@ -1,122 +0,0 @@
|
||||
using PoE_MxFilterGen.json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace PoE_MxFilterGen
|
||||
{
|
||||
class TierGen
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue)
|
||||
{
|
||||
string giturl = settings.GetGIT();
|
||||
var js = web.ReadString($@"{giturl}/PoE-MxFilter-Structure/master/Tiers.txt");
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = @"gen\" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" HasExplicitMod ""Veiled""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " FracturedItem True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SynthesisedItem True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 112 255 112 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " MinimapIcon 1 Green Star" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " PlayEffect Green" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Identified True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 0 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Corrupted True" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 210 0 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 35" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 75" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 100" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 184 218 242" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, $" BaseType {js}" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel >= 60" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " ItemLevel <= 74" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " Rarity = Rare" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 215 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 54 54 54" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 222 118 0" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_tier.mp3""" + Environment.NewLine, Encoding.UTF8);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace FOSSIL__GEN_
|
||||
{
|
||||
public class Sparkline
|
||||
{
|
||||
public List<double> data { get; set; }
|
||||
public double totalChange { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class LowConfidenceSparkline
|
||||
{
|
||||
public List<double> data { get; set; }
|
||||
public double totalChange { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ExplicitModifier
|
||||
{
|
||||
public string text { get; set; }
|
||||
public bool optional { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class Line
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string name { get; set; }
|
||||
public string icon { get; set; }
|
||||
public int mapTier { get; set; }
|
||||
public int levelRequired { get; set; }
|
||||
public object baseType { get; set; }
|
||||
public int stackSize { get; set; }
|
||||
public object variant { get; set; }
|
||||
public object prophecyText { get; set; }
|
||||
public object artFilename { get; set; }
|
||||
public int links { get; set; }
|
||||
public int itemClass { get; set; }
|
||||
public Sparkline sparkline { get; set; }
|
||||
public LowConfidenceSparkline lowConfidenceSparkline { get; set; }
|
||||
public List<object> implicitModifiers { get; set; }
|
||||
public List<ExplicitModifier> explicitModifiers { get; set; }
|
||||
public string flavourText { get; set; }
|
||||
public bool corrupted { get; set; }
|
||||
public int gemLevel { get; set; }
|
||||
public int gemQuality { get; set; }
|
||||
public string itemType { get; set; }
|
||||
public double chaosValue { get; set; }
|
||||
public double exaltedValue { get; set; }
|
||||
public int count { get; set; }
|
||||
public string detailsId { get; set; }
|
||||
public object tradeInfo { get; set; }
|
||||
public object mapRegion { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class Translations
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class Language
|
||||
{
|
||||
public string name { get; set; }
|
||||
public Translations translations { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class RootFossil
|
||||
{
|
||||
public List<Line> lines { get; set; }
|
||||
public Language language { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class fossil
|
||||
{
|
||||
private static string iB;
|
||||
|
||||
public static void Gen(string section, string api, string league, int minValue)
|
||||
{
|
||||
List<string> itemBase = new List<string>();
|
||||
|
||||
var RootFossil = JsonConvert.DeserializeObject<List<RootFossil>>(File.ReadAllText("data/ninja.fossil.json", Encoding.UTF8));
|
||||
|
||||
foreach (var ln in RootFossil)
|
||||
{
|
||||
// Check if the item value is equal or superior to the minimum value
|
||||
|
||||
foreach (var r in ln.lines)
|
||||
{
|
||||
if (r.chaosValue >= 10)
|
||||
{
|
||||
if (!itemBase.Contains(r.name))
|
||||
{
|
||||
itemBase.Add(r.name);
|
||||
iB = iB + string.Format(@" ""{0}""", r.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (iB == null) { iB = @""""""; }
|
||||
string fn = @"gen\" + section + ".filter";
|
||||
File.AppendAllText(fn, string.Format("# Section: {0}", section) + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, "Show" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" Class ""Stackable Currency""" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " BaseType" + iB + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetTextColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBackgroundColor 255 255 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetBorderColor 255 165 0 255" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, " SetFontSize 40" + Environment.NewLine, Encoding.UTF8);
|
||||
File.AppendAllText(fn, @" CustomAlertSound ""mx_fossil.mp3""", Encoding.UTF8);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,38 +10,32 @@ namespace PoE_MxFilterGen.json
|
||||
{
|
||||
public class SETTINGS
|
||||
{
|
||||
public string git { get; set; }
|
||||
public string api { get; set; }
|
||||
public int minimumValue { get; set; }
|
||||
public bool verbose { get; set; }
|
||||
public bool ssf { get; set; }
|
||||
public int uniqueValue { get; set; }
|
||||
public int fossilValue { get; set; }
|
||||
public int cardValue { get; set; }
|
||||
public string updateurl { get; set; }
|
||||
public string section { get; set; }
|
||||
}
|
||||
|
||||
class settings
|
||||
{
|
||||
public static string GetGIT()
|
||||
|
||||
public static int GetUniqueValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.git;
|
||||
return j.uniqueValue;
|
||||
}
|
||||
|
||||
public static string GetAPI()
|
||||
public static int GetFossilValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.api;
|
||||
return j.fossilValue;
|
||||
}
|
||||
|
||||
public static int GetMinimumValue()
|
||||
public static int GetCardValue()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.minimumValue;
|
||||
}
|
||||
|
||||
public static bool GetVerbose()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.verbose;
|
||||
return j.cardValue;
|
||||
}
|
||||
|
||||
public static string GetSection()
|
||||
@@ -50,22 +44,15 @@ namespace PoE_MxFilterGen.json
|
||||
return j.section;
|
||||
}
|
||||
|
||||
public static bool GetSSF()
|
||||
{
|
||||
SETTINGS j = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText("settings.json"));
|
||||
return j.ssf;
|
||||
}
|
||||
|
||||
public static void WriteSection(string section)
|
||||
{
|
||||
SETTINGS js = JsonConvert.DeserializeObject<SETTINGS>(File.ReadAllText($@"settings.json"));
|
||||
SETTINGS se = new SETTINGS
|
||||
{
|
||||
git = js.git,
|
||||
api = js.api,
|
||||
minimumValue = js.minimumValue,
|
||||
verbose = js.verbose,
|
||||
ssf = js.ssf,
|
||||
uniqueValue = js.uniqueValue,
|
||||
fossilValue = js.fossilValue,
|
||||
cardValue = js.cardValue,
|
||||
updateurl = js.updateurl,
|
||||
section = section
|
||||
};
|
||||
var raw = JsonConvert.SerializeObject(se, Formatting.Indented);
|
||||
|
||||
@@ -5,11 +5,6 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace PoE_MxFilterGen
|
||||
{
|
||||
@@ -17,11 +12,11 @@ namespace PoE_MxFilterGen
|
||||
{
|
||||
private static DateTime dt = DateTime.Now;
|
||||
|
||||
public static string version = "8.0.0";
|
||||
public static string version = "8.4.0";
|
||||
public static string fDate = string.Format("{0}-{1}-{2}", dt.Day, dt.Month, dt.Year);
|
||||
|
||||
public static string api = "";
|
||||
public static string giturl = "https://raw.githubusercontent.com/mikxqc";
|
||||
public static string giturl = "https://git.mikx.xyz/mikx";
|
||||
|
||||
public static string section = "";
|
||||
public static string league = "";
|
||||
@@ -33,7 +28,7 @@ namespace PoE_MxFilterGen
|
||||
public static int sprog = 0;
|
||||
public static int stotal = 0;
|
||||
|
||||
public static bool deb = true;
|
||||
public static bool deb = false;
|
||||
|
||||
public class REMVAR
|
||||
{
|
||||
@@ -65,164 +60,148 @@ namespace PoE_MxFilterGen
|
||||
if (!File.Exists("settings.json"))
|
||||
{
|
||||
msg.CMW("ERROR: settings.json not found! Downloading a template...", true, 3);
|
||||
web.DownloadFile("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/json/mxfiltergen_temp_settings.json", "settings.json");
|
||||
web.DownloadFile("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_temp_settings.json", "settings.json");
|
||||
}
|
||||
|
||||
//web.DownloadFile("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/bin/mxfiltergen_updater.exe", "PoE-MxFilterGen-Updater.exe");
|
||||
|
||||
msg.Splash();
|
||||
msg.Splash();
|
||||
|
||||
// Get current league from MxD
|
||||
var ls = web.ReadString("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/json/mxfiltergen_var.json");
|
||||
var ls = web.ReadString("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_var.json");
|
||||
REMVAR lj = JsonConvert.DeserializeObject<REMVAR>(ls);
|
||||
league = lj.league;
|
||||
|
||||
api = $"https://poe.ninja/api/data/";
|
||||
|
||||
msg.CMW(string.Format("GIT: {0}", json.settings.GetGIT()), true, 1);
|
||||
msg.CMW(string.Format("API: {0}", json.settings.GetAPI()), true, 1);
|
||||
msg.CMW(string.Format("League: {0}", league), true, 1);
|
||||
msg.CMW(string.Format("Minimum Value: {0}c", json.settings.GetMinimumValue().ToString()), true, 1);
|
||||
msg.CMW(string.Format("Verbose: {0}", json.settings.GetVerbose().ToString()), true, 1);
|
||||
msg.CMW(string.Format("SSF: {0}", json.settings.GetSSF().ToString()), true, 1);
|
||||
msg.CMW($"League: {league}", true, 1);
|
||||
msg.CMW($"Min. Unique Value - {json.settings.GetUniqueValue()}c", true, 1);
|
||||
msg.CMW($"Min. Fossil Value - {json.settings.GetFossilValue()}c", true, 1);
|
||||
msg.CMW($"Min. Card Value - {json.settings.GetCardValue()}c", true, 1);
|
||||
|
||||
// Check for updates
|
||||
string remote_version = web.ReadString(@"https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/txt/mxfiltergen_version.txt");
|
||||
//msg.CMW(remote_version,true,3);
|
||||
if (deb == false)
|
||||
{
|
||||
//Process.Start("PoE-MxFilterGen-Updater.exe");
|
||||
//Process.GetCurrentProcess().Kill();
|
||||
} else
|
||||
{
|
||||
// Check if all the required dir exists
|
||||
msg.CMW($"Checking for required dirs...",true,1);
|
||||
if (!Directory.Exists(@"data\"))
|
||||
// Check if all the required dir exists
|
||||
msg.CMW($"Checking for required dirs...", true, 1);
|
||||
if (!Directory.Exists(@"data\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"data\");
|
||||
}
|
||||
if (!Directory.Exists(@"gen\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"gen\");
|
||||
}
|
||||
if (!Directory.Exists(@"structure\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"structure\");
|
||||
}
|
||||
|
||||
// Clean all generated data
|
||||
msg.CMW($"Cleaning the base dirs...", true, 1);
|
||||
CleanDirData();
|
||||
|
||||
// Clean the latest generated filter from settings path
|
||||
msg.CMW($"Cleaning the last filter from path...", true, 1);
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Normal.filter");
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict.filter");
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict_NSNLC.filter");
|
||||
|
||||
// Get latest poe.ninja api
|
||||
msg.CMW($"Downloading the latest API data from poe.ninja...", true, 1);
|
||||
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueArmour&language=en", "data/ninja.armour.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueWeapon&language=en", "data/ninja.weapon.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueAccessory&language=en", "data/ninja.accessory.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=DivinationCard&language=en", "data/ninja.card.json");
|
||||
web.SaveString(api + $"currencyoverview?league={league}&type=Currency&language=en", "data/ninja.currency.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=Fossil&language=en", "data/ninja.fossil.json");
|
||||
|
||||
// Generate Filter Array
|
||||
string[] filters;
|
||||
filters = new string[] { "Normal", "Strict", "Strict_NSNLC" };
|
||||
|
||||
foreach (string f in filters)
|
||||
{
|
||||
// Setup basic variable
|
||||
string filter_name = "MxFilter";
|
||||
|
||||
// Get the structure list
|
||||
var js = web.ReadString($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}.json");
|
||||
RootStructure j = JsonConvert.DeserializeObject<RootStructure>(js);
|
||||
|
||||
// Read the structure one by one to process gen
|
||||
// Generator (dlls) are downloaded from the web and executed in a separate AppDomain before the AD is unloaded to execute a new generator.
|
||||
// As we CAN'T unload an assembly, using AppDomains is the only way we can load/unload multiple assembly in a row.
|
||||
msg.CMW($@"Generating the {f} filter using {j.structures.Count} source(s)...", true, 1);
|
||||
ftotal = j.structures.Count;
|
||||
foreach (var sec in j.structures)
|
||||
{
|
||||
Directory.CreateDirectory(@"data\");
|
||||
}
|
||||
if (!Directory.Exists(@"gen\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"gen\");
|
||||
}
|
||||
if (!Directory.Exists(@"structure\"))
|
||||
{
|
||||
Directory.CreateDirectory(@"structure\");
|
||||
}
|
||||
|
||||
// Clean all generated data
|
||||
msg.CMW($"Cleaning the base dirs...", true, 1);
|
||||
CleanDirData();
|
||||
|
||||
// Clean the latest generated filter from settings path
|
||||
msg.CMW($"Cleaning the last filter from path...", true, 1);
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Normal.filter");
|
||||
File.Delete($@"{path}\My Games\Path of Exile\MxFilter_Strict.filter");
|
||||
if (File.Exists($@"{path}\My Games\Path of Exile\MxFilter.filter")) { File.Delete($@"{path}\My Games\Path of Exile\MxFilter.filter"); }
|
||||
|
||||
// Get latest poe.ninja api
|
||||
msg.CMW($"Downloading the latest API data from poe.ninja...", true, 1);
|
||||
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueArmour&language=en", "data/ninja.armour.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueWeapon&language=en", "data/ninja.weapon.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=UniqueAccessory&language=en", "data/ninja.accessory.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=DivinationCard&language=en", "data/ninja.card.json");
|
||||
web.SaveString(api + $"currencyoverview?league={league}&type=Currency&language=en", "data/ninja.currency.json");
|
||||
web.SaveString(api + $"itemoverview?league={league}&type=Fossil&language=en", "data/ninja.fossil.json");
|
||||
|
||||
// Get Theme File(s)
|
||||
web.DownloadFile($@"{giturl}/PoE-MxFilter-Structure/master/Chancing.json", @"structure\Chancing.json");
|
||||
|
||||
// Generate Filter Array
|
||||
string[] filters;
|
||||
if (json.settings.GetSSF()) { filters = new string[] { "SSF" }; } else { filters = new string[] { "Normal", "Strict" }; }
|
||||
|
||||
foreach(string f in filters)
|
||||
{
|
||||
// Setup basic variable
|
||||
string filter_name = "MxFilter";
|
||||
|
||||
// Get the structure list
|
||||
var js = web.ReadString($@"{giturl}/PoE-MxFilter-Structure/master/{f}.json");
|
||||
RootStructure j = JsonConvert.DeserializeObject<RootStructure>(js);
|
||||
|
||||
// Read the structure one by one to process gen
|
||||
// Generator (dlls) are downloaded from the web and executed in a separate AppDomain before the AD is unloaded to execute a new generator.
|
||||
// As we CAN'T unload an assembly, using AppDomains is the only way we can load/unload multiple assembly in a row.
|
||||
msg.CMW($@"Generating the {f} filter using {j.structures.Count} source(s)...", true, 1);
|
||||
ftotal = j.structures.Count;
|
||||
foreach (var sec in j.structures)
|
||||
if (sec.gen == true)
|
||||
{
|
||||
if (sec.gen == true)
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW(string.Format("REMOTE_GEN {0}", sec.section), true, 1);
|
||||
web.DownloadFile($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}/{sec.section}.dll", $@"structure\{sec.section}.dll");
|
||||
json.settings.WriteSection(sec.section);
|
||||
|
||||
var bytes = GenerateAssemblyAndGetRawBytes(sec.section);
|
||||
|
||||
var appDomain = AppDomain.CreateDomain(sec.section, null, new AppDomainSetup
|
||||
{
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW(string.Format("REMOTE_GEN {0}", sec.section), true, 1);
|
||||
web.DownloadFile($@"{giturl}/PoE-MxFilter-Structure/master/{f}/{sec.section}.dll", $@"structure\{sec.section}.dll");
|
||||
json.settings.WriteSection(sec.section);
|
||||
var bytes = GenerateAssemblyAndGetRawBytes(sec.section);
|
||||
ShadowCopyFiles = "true",
|
||||
LoaderOptimization = LoaderOptimization.MultiDomainHost
|
||||
});
|
||||
|
||||
var appDomain = AppDomain.CreateDomain(sec.section, null, new AppDomainSetup
|
||||
{
|
||||
ShadowCopyFiles = "true",
|
||||
LoaderOptimization = LoaderOptimization.MultiDomainHost
|
||||
});
|
||||
var assmblyLoaderType = typeof(AssmeblyLoader);
|
||||
var assemblyLoader = (IAssemblyLoader)appDomain.CreateInstanceFromAndUnwrap(assmblyLoaderType.Assembly.Location, assmblyLoaderType.FullName);
|
||||
assemblyLoader.Load(bytes);
|
||||
|
||||
var assmblyLoaderType = typeof(AssmeblyLoader);
|
||||
var assemblyLoader = (IAssemblyLoader)appDomain.CreateInstanceFromAndUnwrap(assmblyLoaderType.Assembly.Location, assmblyLoaderType.FullName);
|
||||
assemblyLoader.Load(bytes);
|
||||
|
||||
AppDomain.Unload(appDomain);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW($@"REMOTE_GET {sec.section}", true, 1);
|
||||
web.SaveString($@"{giturl}/PoE-MxFilter-Structure/master/{f}/{sec.section}.filter", $"structure/{sec.section}.filter");
|
||||
}
|
||||
AppDomain.Unload(appDomain);
|
||||
}
|
||||
|
||||
// Create the final filter.
|
||||
msg.CMW($@"Creating the final filter...", true, 1);
|
||||
foreach (var sec in j.structures)
|
||||
else
|
||||
{
|
||||
if (sec.gen == true)
|
||||
{
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("gen\\{0}.filter", sec.section)));
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", string.Format("# Section: {0}", sec.section) + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("structure\\{0}.filter", sec.section)));
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
}
|
||||
fprog = fprog + 1;
|
||||
msg.drawProgress(fprog, ftotal);
|
||||
//msg.CMW($@"REMOTE_GET {sec.section}", true, 1);
|
||||
web.SaveString($@"{giturl}/PoE-MxFilter-Structure/raw/branch/master/{f}/{sec.section}.filter", $"structure/{sec.section}.filter");
|
||||
}
|
||||
ftotal = 0;
|
||||
fprog = 0;
|
||||
CleanDir();
|
||||
}
|
||||
|
||||
// Download the sounds from the remote list
|
||||
msg.CMW($@"Downloading the latest sound...", true, 1);
|
||||
var sl = web.ReadString("https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/json/mxfiltergen_sound.json");
|
||||
REMSND slj = JsonConvert.DeserializeObject<REMSND>(sl);
|
||||
stotal = slj.sound.Count;
|
||||
foreach (string s in slj.sound)
|
||||
{
|
||||
sprog = sprog + 1;
|
||||
msg.drawProgress(sprog, stotal);
|
||||
if (File.Exists($@"{path}\My Games\Path of Exile\{s}")) { File.Delete($@"{path}\My Games\Path of Exile\{s}"); }
|
||||
web.DownloadFile($"https://raw.githubusercontent.com/mikxqc/PoE-MxFilter-Data/master/mp3/{s}",$@"{path}\My Games\Path of Exile\{s}");
|
||||
}
|
||||
|
||||
// Clean all generated data
|
||||
CleanDirData();
|
||||
}
|
||||
// Create the final filter.
|
||||
msg.CMW($@"Creating the final filter...", true, 1);
|
||||
foreach (var sec in j.structures)
|
||||
{
|
||||
if (sec.gen == true)
|
||||
{
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("gen\\{0}.filter", sec.section)));
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", string.Format("# Section: {0}", sec.section) + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", File.ReadAllText(string.Format("structure\\{0}.filter", sec.section)));
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
File.AppendAllText($@"{path}\My Games\Path of Exile\{filter_name}_{f}.filter", "" + Environment.NewLine);
|
||||
}
|
||||
}
|
||||
ftotal = 0;
|
||||
fprog = 0;
|
||||
CleanDir();
|
||||
}
|
||||
|
||||
// Download the sounds from the remote list
|
||||
msg.CMW($@"Downloading the latest sound...", true, 1);
|
||||
var sl = web.ReadString("https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/json/mxfiltergen_sound.json");
|
||||
REMSND slj = JsonConvert.DeserializeObject<REMSND>(sl);
|
||||
stotal = slj.sound.Count;
|
||||
foreach (string s in slj.sound)
|
||||
{
|
||||
sprog = sprog + 1;
|
||||
msg.drawProgress(sprog, stotal);
|
||||
if (File.Exists($@"{path}\My Games\Path of Exile\{s}")) { File.Delete($@"{path}\My Games\Path of Exile\{s}"); }
|
||||
web.DownloadFile($"https://git.mikx.xyz/mikx/PoE-MxFilter-Data/raw/branch/master/mp3/{s}", $@"{path}\My Games\Path of Exile\{s}");
|
||||
}
|
||||
|
||||
// Clean all generated data
|
||||
CleanDirData();
|
||||
}
|
||||
|
||||
private static byte[] GenerateAssemblyAndGetRawBytes(string dll)
|
||||
@@ -264,6 +243,11 @@ namespace PoE_MxFilterGen
|
||||
file.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private static void AutoUpdater_ApplicationExitEvent()
|
||||
{
|
||||
System.Environment.Exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
public interface IAssemblyLoader
|
||||
@@ -280,8 +264,8 @@ namespace PoE_MxFilterGen
|
||||
Type type = AppDomain.CurrentDomain.GetAssemblies().SelectMany(t => t.GetTypes()).Where(t => String.Equals(t.Name, "Generator", StringComparison.Ordinal)).First();
|
||||
object o = Activator.CreateInstance(type);
|
||||
MethodInfo mi = o.GetType().GetMethod("Gen");
|
||||
Object[] ob = new object[] { json.settings.GetSection(), json.settings.GetAPI(), main.league, json.settings.GetMinimumValue() };
|
||||
Object[] ob = new object[] { json.settings.GetSection(), "tobedeleted", main.league, json.settings.GetUniqueValue(), json.settings.GetFossilValue(), json.settings.GetCardValue() };
|
||||
mi.Invoke(o, ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -66,7 +66,6 @@ namespace PoE_MxFilterGen
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
|
||||
| SecurityProtocolType.Tls11
|
||||
| SecurityProtocolType.Tls12;
|
||||
var str = "";
|
||||
try
|
||||
{
|
||||
Uri uri = new Uri(url);
|
||||
|
||||
Reference in New Issue
Block a user