PKHeX/PKHeX.Core/Saves/Substructures/Gen6/BattleBox6.cs
Kurt fc754b346b
File scoped namespaces (#3529)
[Language Reference](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/file-scoped-namespaces)

Updates all the files, one less level of indentation.

Some small changes were made to API surfaces, renaming `PKM pkm` -> `PKM pk`, and `LegalityAnalysis.pkm` -> `LegalityAnalysis.Entity`
2022-06-18 11:04:24 -07:00

27 lines
889 B
C#

namespace PKHeX.Core;
public sealed class BattleBox6 : SaveBlock<SAV6>
{
public BattleBox6(SAV6XY SAV, int offset) : base(SAV) => Offset = offset;
public BattleBox6(SAV6AO SAV, int offset) : base(SAV) => Offset = offset;
private int LockedFlagOffset => Offset + (6 * PokeCrypto.SIZE_6STORED);
public bool Locked
{
get => LockedWiFiTournament || LockedLiveTournament;
set => LockedWiFiTournament = LockedLiveTournament = value;
}
public bool LockedWiFiTournament
{
get => (Data[LockedFlagOffset] & 1) != 0;
set => Data[LockedFlagOffset] = (byte)((Data[Offset + LockedFlagOffset] & ~1) | (value ? 1 : 0));
}
public bool LockedLiveTournament
{
get => (Data[LockedFlagOffset] & 2) != 0;
set => Data[LockedFlagOffset] = (byte)((Data[Offset + LockedFlagOffset] & ~2) | (value ? 2 : 0));
}
}