Fix, stop using alt-ShinyIcon outside the box (#929)

with no filter for slot value, the alt-icon will be used for PKM-QR icon, team, and others.
This commit is contained in:
pokecal
2017-03-09 07:59:07 +09:00
committed by Kaphotics
parent 57c9b78108
commit 6da4b3d41c

View File

@@ -103,7 +103,7 @@ private static Image getSprite(PKM pkm, SaveFile SAV, int box, int slot, bool fl
return null;
bool isBoxBGRed = false;
if (SAV.Generation == 7 || SAV.Generation == 6)
if (pkm.Species != 0 && slot >= 0 && slot < 30 && (SAV.Generation == 7 || SAV.Generation == 6))
{
switch (SAV.getBoxWallpaper(box))
{