mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Fix partycount setting for gen5
only update the party count when appropriate species present=>only update if below no species present=>only update if above Closes #1224
This commit is contained in:
parent
2979c4f7ec
commit
b8069184a2
1 changed files with 10 additions and 3 deletions
|
@ -197,7 +197,6 @@ namespace PKHeX.Core
|
|||
|
||||
PKM[] newParty = value.Where(pk => pk.Species != 0).ToArray();
|
||||
|
||||
PartyCount = newParty.Length;
|
||||
Array.Resize(ref newParty, 6);
|
||||
|
||||
for (int i = PartyCount; i < newParty.Length; i++)
|
||||
|
@ -481,8 +480,16 @@ namespace PKHeX.Core
|
|||
|
||||
for (int i = 0; i < 6; i++)
|
||||
if (getPartyOffset(i) == offset)
|
||||
if (PartyCount <= i)
|
||||
PartyCount = i + 1;
|
||||
{
|
||||
if (pkm.Species != 0)
|
||||
{
|
||||
if (PartyCount <= i)
|
||||
PartyCount = i + 1;
|
||||
}
|
||||
else if (PartyCount > i)
|
||||
PartyCount = i;
|
||||
break;
|
||||
}
|
||||
|
||||
setData(pkm.EncryptedPartyData, offset);
|
||||
Edited = true;
|
||||
|
|
Loading…
Reference in a new issue