Fixes issue where HeldItem string in PokemonBuilder could be empty.

master
Deukhoofd 2 years ago
parent a59f73b2f6
commit 8369328719
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F

@ -146,7 +146,7 @@ namespace PkmnLibSharp.Battling
PopulateUninitialized(species, forme!, random);
Item? heldItem = null;
if (HeldItem != null)
if (HeldItem != null && !string.IsNullOrWhiteSpace(HeldItem))
{
if (!Library.StaticLibrary.ItemLibrary.TryGet(HeldItem, out heldItem))
{

Loading…
Cancel
Save