Fix boolean value copy changes

a5710ee374
This commit is contained in:
Kurt 2022-02-25 16:10:49 -08:00
parent ccca8abdad
commit fd07456ee1
3 changed files with 10 additions and 2 deletions

View file

@ -202,5 +202,13 @@ namespace PKHeX.Core
}
}
}
public void CopyFrom(SCBlock other)
{
if (Type.IsBoolean())
ChangeBooleanType(other.Type);
else
ChangeData(other.Data);
}
}
}

View file

@ -44,7 +44,7 @@ public sealed class SAV8LA : SaveFile, ISaveBlock8LA, ISCBlockArray
var mine = AllBlocks;
var newB = z.AllBlocks;
for (int i = 0; i < mine.Count; i++)
newB[i].Data.CopyTo(mine[i].Data, 0);
mine[i].CopyFrom(newB[i]);
State.Edited = true;
}

View file

@ -42,7 +42,7 @@ namespace PKHeX.Core
var mine = AllBlocks;
var newB = z.AllBlocks;
for (int i = 0; i < mine.Count; i++)
newB[i].Data.CopyTo(mine[i].Data, 0);
mine[i].CopyFrom(newB[i]);
State.Edited = true;
}