Remove unnecessary value set

This commit is contained in:
Kurt 2020-09-19 10:23:21 -07:00
parent 70a7bd7775
commit 2ad3fe8fd6
2 changed files with 6 additions and 14 deletions

View File

@ -7,11 +7,8 @@ namespace NHSE.Core
public sealed class FileHashInfo : Dictionary<uint, FileHashDetails>
#pragma warning restore CA2237 // Mark ISerializable types with serializable
{
public readonly uint RevisionId; // Custom to us
public FileHashInfo(uint revisionId, FileHashDetails[] hashSets)
public FileHashInfo(IEnumerable<FileHashDetails> hashSets)
{
RevisionId = revisionId;
foreach (var hashSet in hashSets)
this[hashSet.FileSize] = hashSet;
}

View File

@ -7,14 +7,13 @@ public static class FileHashRevision
{
#region REVISION 1.0.0
private const uint REVISION_100_ID = 0;
private const int MAIN_SAVE_SIZE = 0xAC0938;
private const int PERSONAL_SAVE_SIZE = 0x6BC50;
private const int POSTBOX_SAVE_SIZE = 0xB44580;
private const int PHOTO_STUDIO_ISLAND_SIZE = 0x263B4;
private const int PROFILE_SIZE = 0x69508;
public static readonly FileHashInfo REV_100 = new FileHashInfo(REVISION_100_ID, new[]
public static readonly FileHashInfo REV_100 = new FileHashInfo(new[]
{
new FileHashDetails("main.dat", MAIN_SAVE_SIZE, new[]
{
@ -61,14 +60,13 @@ public static class FileHashRevision
#region REVISION 1.1.0
private const uint REVISION_110_ID = 1;
private const int REV_110_MAIN_SAVE_SIZE = 0xAC2AA0;
private const int REV_110_PERSONAL_SAVE_SIZE = 0x6BED0;
private const int REV_110_POSTBOX_SAVE_SIZE = 0xB44590;
private const int REV_110_PHOTO_STUDIO_ISLAND_SIZE = 0x263C0;
private const int REV_110_PROFILE_SIZE = 0x69560;
public static readonly FileHashInfo REV_110 = new FileHashInfo(REVISION_110_ID, new[]
public static readonly FileHashInfo REV_110 = new FileHashInfo(new[]
{
new FileHashDetails("main.dat", REV_110_MAIN_SAVE_SIZE, new[]
{
@ -115,14 +113,13 @@ public static class FileHashRevision
#region REVISION 1.2.0
private const uint REVISION_120_ID = 2;
private const int REV_120_MAIN_SAVE_SIZE = 0xACECD0;
private const int REV_120_PERSONAL_SAVE_SIZE = 0x6D6C0;
private const int REV_120_POSTBOX_SAVE_SIZE = REV_110_POSTBOX_SAVE_SIZE;
private const int REV_120_PHOTO_STUDIO_ISLAND_SIZE = 0x2C9C0;
private const int REV_120_PROFILE_SIZE = REV_110_PROFILE_SIZE;
public static readonly FileHashInfo REV_120 = new FileHashInfo(REVISION_120_ID, new[]
public static readonly FileHashInfo REV_120 = new FileHashInfo(new[]
{
new FileHashDetails("main.dat", REV_120_MAIN_SAVE_SIZE, new[]
{
@ -169,14 +166,13 @@ public static class FileHashRevision
#region REVISION 1.3.0
private const uint REVISION_130_ID = 3;
private const int REV_130_MAIN_SAVE_SIZE = 0xACED80;
private const int REV_130_PERSONAL_SAVE_SIZE = 0x6D6D0;
private const int REV_130_POSTBOX_SAVE_SIZE = REV_110_POSTBOX_SAVE_SIZE;
private const int REV_130_PHOTO_STUDIO_ISLAND_SIZE = REV_120_PHOTO_STUDIO_ISLAND_SIZE;
private const int REV_130_PROFILE_SIZE = REV_110_PROFILE_SIZE;
public static readonly FileHashInfo REV_130 = new FileHashInfo(REVISION_130_ID, new[]
public static readonly FileHashInfo REV_130 = new FileHashInfo(new[]
{
new FileHashDetails("main.dat", REV_130_MAIN_SAVE_SIZE, new[]
{
@ -223,14 +219,13 @@ public static class FileHashRevision
#region REVISION 1.4.0
private const uint REVISION_140_ID = 4;
private const int REV_140_MAIN_SAVE_SIZE = 0xB05790;
private const int REV_140_PERSONAL_SAVE_SIZE = 0x74420;
private const int REV_140_POSTBOX_SAVE_SIZE = REV_110_POSTBOX_SAVE_SIZE;
private const int REV_140_PHOTO_STUDIO_ISLAND_SIZE = REV_120_PHOTO_STUDIO_ISLAND_SIZE;
private const int REV_140_PROFILE_SIZE = REV_110_PROFILE_SIZE;
public static readonly FileHashInfo REV_140 = new FileHashInfo(REVISION_140_ID, new[]
public static readonly FileHashInfo REV_140 = new FileHashInfo(new[]
{
new FileHashDetails("main.dat", REV_140_MAIN_SAVE_SIZE, new[]
{