mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-14 16:27:21 +00:00
Minor clean
This commit is contained in:
parent
0f96b3c4d5
commit
6627d7e2f4
3 changed files with 8 additions and 9 deletions
|
@ -98,6 +98,7 @@ namespace PKHeX.Core
|
|||
public override int CurrentBox { get => BoxLayout.CurrentBox; set => BoxLayout.CurrentBox = value; }
|
||||
|
||||
protected int BattleBoxOffset;
|
||||
|
||||
public bool BattleBoxLocked
|
||||
{
|
||||
get => Data[BattleBoxOffset + 0x358] != 0; // wifi/live
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace PKHeX.Core
|
|||
get => Encoding.ASCII.GetString(Data, 0x39, 3);
|
||||
set
|
||||
{
|
||||
for (int i = 0; i < 3; i++)
|
||||
for (int i = 0; i < 3; i++)
|
||||
Data[0x39 + i] = (byte) (value.Length > i ? value[i] : '0');
|
||||
SAV.Edited = true;
|
||||
}
|
||||
|
|
|
@ -122,8 +122,7 @@ namespace PKHeX.WinForms
|
|||
int index = Bytes.IndexOf(nud);
|
||||
Raw[index] = (byte)nud.Value;
|
||||
|
||||
string str = GetString();
|
||||
TB_Text.Text = str;
|
||||
TB_Text.Text = GetString();
|
||||
editing = false;
|
||||
}
|
||||
|
||||
|
@ -190,13 +189,12 @@ namespace PKHeX.WinForms
|
|||
|
||||
private static ushort[] GetChars(int generation)
|
||||
{
|
||||
switch (generation)
|
||||
return generation switch
|
||||
{
|
||||
case 6:
|
||||
case 7:
|
||||
return chars67;
|
||||
default: return Array.Empty<ushort>();
|
||||
}
|
||||
6 => chars67,
|
||||
7 => chars67,
|
||||
_ => Array.Empty<ushort>()
|
||||
};
|
||||
}
|
||||
|
||||
private static readonly ushort[] chars67 =
|
||||
|
|
Loading…
Reference in a new issue