Fixes issue where HeldItem string in PokemonBuilder could be empty.
This commit is contained in:
parent
a59f73b2f6
commit
8369328719
|
@ -146,7 +146,7 @@ namespace PkmnLibSharp.Battling
|
||||||
PopulateUninitialized(species, forme!, random);
|
PopulateUninitialized(species, forme!, random);
|
||||||
|
|
||||||
Item? heldItem = null;
|
Item? heldItem = null;
|
||||||
if (HeldItem != null)
|
if (HeldItem != null && !string.IsNullOrWhiteSpace(HeldItem))
|
||||||
{
|
{
|
||||||
if (!Library.StaticLibrary.ItemLibrary.TryGet(HeldItem, out heldItem))
|
if (!Library.StaticLibrary.ItemLibrary.TryGet(HeldItem, out heldItem))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue