mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-01 08:19:15 +00:00
Simplify box bin loading
This commit is contained in:
parent
8b608389eb
commit
b2860ea3de
1 changed files with 2 additions and 16 deletions
|
@ -466,14 +466,7 @@ namespace PKHeX
|
|||
|
||||
PKM[] pkms = BoxData;
|
||||
for (int i = 0; i < pkms.Length; i++)
|
||||
{
|
||||
if (Generation == 1)
|
||||
pkms[i] = new PokemonList1(decryptPKM(pkdata[i]))[0];
|
||||
else if (Generation == 2)
|
||||
pkms[i] = new PokemonList2(decryptPKM(pkdata[i]))[0];
|
||||
else
|
||||
pkms[i].Data = decryptPKM(pkdata[i]);
|
||||
}
|
||||
pkms[i] = getPKM(decryptPKM(pkdata[i]));
|
||||
BoxData = pkms;
|
||||
return true;
|
||||
}
|
||||
|
@ -491,14 +484,7 @@ namespace PKHeX
|
|||
|
||||
PKM[] pkms = BoxData;
|
||||
for (int i = 0; i < BoxSlotCount; i++)
|
||||
{
|
||||
if (Generation == 1)
|
||||
pkms[box * BoxSlotCount + i] = new PokemonList1(decryptPKM(pkdata[i]))[0];
|
||||
else if (Generation == 2)
|
||||
pkms[box * BoxSlotCount + i] = new PokemonList2(decryptPKM(pkdata[i]))[0];
|
||||
else
|
||||
pkms[box * BoxSlotCount + i].Data = decryptPKM(pkdata[i]);
|
||||
}
|
||||
pkms[box*BoxSlotCount + i] = getPKM(decryptPKM(pkdata[i]));
|
||||
BoxData = pkms;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue