Fixes issue where HeldItem string in PokemonBuilder could be empty.
This commit is contained in:
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user