Show old egg sprite if egg holds item

Accurately show the item
This commit is contained in:
Kurt 2018-10-10 22:59:00 -07:00
parent e8552affca
commit 16dcef13a6

View file

@ -42,7 +42,7 @@ namespace PKHeX.WinForms
var baseImage = GetBaseImage(species, form, gender, isShiny, generation);
if (isEgg)
baseImage = LayerOverImageEgg(baseImage, species);
baseImage = LayerOverImageEgg(baseImage, species, heldItem != 0);
if (isShiny)
baseImage = LayerOverImageShiny(baseImage, isBoxBGRed);
if (heldItem > 0)
@ -111,9 +111,9 @@ namespace PKHeX.WinForms
return ImageUtil.LayerImage(baseImage, rare, 0, 0, 0.7);
}
private static Image LayerOverImageEgg(Image baseImage, int species)
private static Image LayerOverImageEgg(Image baseImage, int species, bool hasItem)
{
if (ShowEggSpriteAsItem)
if (ShowEggSpriteAsItem && !hasItem)
return LayerOverImageEggAsItem(baseImage, species);
return LayerOverImageEggTransparentSpecies(baseImage, species);
}