commit 9c61662ce605a2af83013a848a8a1aee96f45664 Author: mikx Date: Tue Sep 19 10:18:00 2023 -0400 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c4efe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/MxEpoch.Shards.sln b/MxEpoch.Shards.sln new file mode 100644 index 0000000..de2d437 --- /dev/null +++ b/MxEpoch.Shards.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33403.182 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MxEpoch", "MxEpoch.Shards\MxEpoch.csproj", "{CE6AC995-7CD4-404D-A2EC-618FEF680B9E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CE6AC995-7CD4-404D-A2EC-618FEF680B9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CE6AC995-7CD4-404D-A2EC-618FEF680B9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CE6AC995-7CD4-404D-A2EC-618FEF680B9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CE6AC995-7CD4-404D-A2EC-618FEF680B9E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {1FC4EF82-00D7-4402-8483-1C3275BE5D9A} + EndGlobalSection +EndGlobal diff --git a/MxEpoch.Shards/App.config b/MxEpoch.Shards/App.config new file mode 100644 index 0000000..4bfa005 --- /dev/null +++ b/MxEpoch.Shards/App.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/MxEpoch.Shards/MxEpoch.csproj b/MxEpoch.Shards/MxEpoch.csproj new file mode 100644 index 0000000..29c8304 --- /dev/null +++ b/MxEpoch.Shards/MxEpoch.csproj @@ -0,0 +1,67 @@ + + + + + Debug + AnyCPU + {CE6AC995-7CD4-404D-A2EC-618FEF680B9E} + Exe + MxEpoch + MxEpoch + v4.8 + 512 + true + true + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + game_last.epoch.ico + + + + C:\Users\blood\Downloads\LastEpochSaveEditor V4.5\LastEpochLib.dll + + + ..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/MxEpoch.Shards/Program.cs b/MxEpoch.Shards/Program.cs new file mode 100644 index 0000000..ea43020 --- /dev/null +++ b/MxEpoch.Shards/Program.cs @@ -0,0 +1,67 @@ +///////////////////////////////////////////////////////////////////////////////// +// ___ ___ ///////////////////////////////////////////////////////////////////// +// | \/ |_ __ //////////////////////////////////////////////////////////////// +// | . . \ \/ / //////////////////////////////////////////////////////////////// +// | |\/| |> < ///////////////////////////////////////////////////////////////// +// | | | /_/\_\ //////////////////////////////////////////////////////////////// +// \_| |_| ///////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////////// +// https://www.mikx.ovh // https://mxg.ovh // http://discord.mxg.ovh //////////// +///////////////////////////////////////////////////////////////////////////////// +// MxEpoch ////////////////////////////////////////////////////////////////////// +// By mikx (https://mxgit.ovh) ////////////////////////////////////////////////// +// Credits: ///////////////////////////////////////////////////////////////////// +// Ash06 - LastEpochLib (https://fearlessrevolution.com/viewtopic.php?t=17089) // +///////////////////////////////////////////////////////////////////////////////// +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MxEpoch.Shards +{ + internal class Program + { + static void Main(string[] args) + { + // Load file from args or by draging it on the exe + string file = args[0]; + + // Backup + if (!Directory.Exists("Backup")) { Directory.CreateDirectory("Backup"); } + DateTime dt = DateTime.Now; + string year = dt.Year.ToString(); + string month = dt.Month.ToString(); + string day = dt.Day.ToString(); + string hour = dt.Hour.ToString(); + string minute = dt.Minute.ToString(); + string second = dt.Second.ToString(); + File.Copy(file, $@"Backup\STASH_0.{year}-{month}-{day}.{hour}-{minute}-{second}"); + + // Load the stash data from the file + var stash = LastEpochLib.Stash.Load.Stash(file); + + // Iterate throught the shards in the stash + foreach (var s in stash.SavedShards) + { + // Set the quantity for this shard + s.Quantity = 200; + } + + // Iterate throught the glyphs in the stash + foreach (var g in stash.MaterialsList) + { + // Set the quantity for this glyph + g.Quantity = 200; + } + + // Prepare a string to be saved as a new stash file + string contents = LastEpochLib.Get.StartFile + JsonConvert.SerializeObject((object)stash); + // Save the prepared string to the loaded file, with the modified data from above + File.WriteAllText(file, contents); + } + } +} diff --git a/MxEpoch.Shards/Properties/AssemblyInfo.cs b/MxEpoch.Shards/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..2813222 --- /dev/null +++ b/MxEpoch.Shards/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("MxEpoch.Shards")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MxEpoch.Shards")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[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("ce6ac995-7cd4-404d-a2ec-618fef680b9e")] + +// 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")] diff --git a/MxEpoch.Shards/game_last.epoch.ico b/MxEpoch.Shards/game_last.epoch.ico new file mode 100644 index 0000000..02ddd1b Binary files /dev/null and b/MxEpoch.Shards/game_last.epoch.ico differ diff --git a/MxEpoch.Shards/packages.config b/MxEpoch.Shards/packages.config new file mode 100644 index 0000000..0b14af3 --- /dev/null +++ b/MxEpoch.Shards/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file