mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 06:20:25 +00:00
Minor clean
This commit is contained in:
parent
e3ad6ec55d
commit
bd11affa13
2 changed files with 11 additions and 3 deletions
|
@ -132,7 +132,14 @@ namespace PKHeX.WinForms
|
|||
uint valFly = BitConverter.ToUInt32(SAV.General, ofsFly);
|
||||
CLB_FlyDest.Items.Clear();
|
||||
for (int i = 0; i < FlyDestD.Length; i++)
|
||||
CLB_FlyDest.Items.Add(metLocationList.First(v => v.Value == FlyDestD[i]).Text, FlyDestC[i] < 32 ? (valFly & 1u << FlyDestC[i]) != 0 : (SAV.General[ofsFly + (FlyDestC[i] >> 3)] & 1 << (FlyDestC[i] & 7)) != 0);
|
||||
{
|
||||
var dest = FlyDestD[i];
|
||||
var name = metLocationList.First(v => v.Value == dest).Text;
|
||||
var state = FlyDestC[i] < 32
|
||||
? (valFly & 1u << FlyDestC[i]) != 0
|
||||
: (SAV.General[ofsFly + (FlyDestC[i] >> 3)] & 1 << (FlyDestC[i] & 7)) != 0;
|
||||
CLB_FlyDest.Items.Add(name, state);
|
||||
}
|
||||
uint valBP = BitConverter.ToUInt16(SAV.General, ofsBP);
|
||||
NUD_BP.Value = valBP > 9999 ? 9999 : valBP;
|
||||
|
||||
|
|
|
@ -357,9 +357,10 @@ namespace PKHeX.WinForms
|
|||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
if (heldMailIDs.Count(v => v == i) > 1) //D
|
||||
var index = i;
|
||||
if (heldMailIDs.Count(v => v == index) > 1) //D
|
||||
ret.Add($"MailID{i} duplicated");
|
||||
if (m[i].IsEmpty == false && heldMailIDs.All(v => v != i)) //E
|
||||
if (m[i].IsEmpty == false && heldMailIDs.All(v => v != index)) //E
|
||||
ret.Add($"MailID{i} not referred");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue