Update usum eventflag max

now these event flags are making sense
This commit is contained in:
Kurt
2017-11-11 18:58:57 -08:00
parent dea70bf243
commit fbab1cfbe6
2 changed files with 5 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ public SAV7(byte[] data = null)
public override int Generation => 7;
protected override int GiftCountMax => 48;
protected override int GiftFlagMax => 0x100 * 8;
protected override int EventFlagMax => 3968;
protected override int EventFlagMax => USUM ? 4928 : 3968;
protected override int EventConstMax => (EventFlag - EventConst) / 2;
public override int OTLength => 12;
public override int NickLength => 12;

View File

@@ -438,6 +438,8 @@ private void DiffSaves()
SaveFile s1 = SaveUtil.GetVariantSAV(File.ReadAllBytes(TB_OldSAV.Text));
SaveFile s2 = SaveUtil.GetVariantSAV(File.ReadAllBytes(TB_NewSAV.Text));
if (s1 == null) { WinFormsUtil.Alert("Save 1 file invalid."); return; }
if (s2 == null) { WinFormsUtil.Alert("Save 2 file invalid."); return; }
if (s1.GetType() != s2.GetType()) { WinFormsUtil.Alert("Save types are different.", $"S1: {s1.GetType().Name}", $"S2: {s2.GetType().Name}"); return; }
if (s1.Version != s2.Version) { WinFormsUtil.Alert("Save versions are different.", $"S1: {s1.Version}", $"S2: {s2.Version}"); return; }
@@ -455,9 +457,9 @@ private void DiffSaves()
{
if (oldBits[i] == newBits[i]) continue;
if (newBits[i])
tbIsSet += i.ToString("0000") + ",";
tbIsSet += $"{i:0000},";
else
tbUnSet += i.ToString("0000") + ",";
tbUnSet += $"{i:0000},";
}
}
catch (Exception e)