From a8a89c3bb2074065002a0f19c96a86da81f8b9f6 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Wed, 20 Jan 2016 20:40:52 -0800 Subject: [PATCH] 5bit day 0-31, should fit all possible dates. --- Misc/SAV6.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/SAV6.cs b/Misc/SAV6.cs index f288e7ef1..3ab1931d3 100644 --- a/Misc/SAV6.cs +++ b/Misc/SAV6.cs @@ -425,7 +425,7 @@ public int Vivillon public uint AdventureStart { get { return BitConverter.ToUInt32(Data, PlayTime + 0x4); } set { BitConverter.GetBytes(value).CopyTo(Data, PlayTime + 0x4); } } public int AdventureStartYear { get { return (int)(AdventureStart & 0xFFF); } set { AdventureStart = AdventureStart & 0xFFFFF000 | (uint)value; } } public int AdventureStartMonth { get { return (int)(AdventureStart >> 12 & 0xF); } set { AdventureStart = AdventureStart & 0xFFFF0FFF | ((uint)value & 0xF) << 12; } } - public int AdventureStartDay { get { return (int)(AdventureStart >> 16 & 0xF); } set { AdventureStart = AdventureStart & 0xFFF0FFFF | ((uint)value & 0xF) << 16; } } + public int AdventureStartDay { get { return (int)(AdventureStart >> 16 & 0xF); } set { AdventureStart = AdventureStart & 0xFFE0FFFF | ((uint)value & 0x1F) << 16; } } public int PlayedHours{ get { return BitConverter.ToUInt16(Data, PlayTime); } set { BitConverter.GetBytes((ushort)value).CopyTo(Data, PlayTime); }