Make GetItemDefinitionIDs behave more like the real one.

This commit is contained in:
Mr_Goldberg 2021-05-26 23:06:40 -04:00
parent c162ca79d5
commit faf15e5d88
No known key found for this signature in database
GPG key ID: 8597D87419DEF278

View file

@ -623,7 +623,10 @@ bool GetItemDefinitionIDs(
PRINT_DEBUG("array_size %u\n", *punItemDefIDsArraySize);
if (pItemDefIDs == nullptr)
if (!item_definitions_loaded)
return false;
if (pItemDefIDs == nullptr || *punItemDefIDsArraySize == 0)
{
*punItemDefIDsArraySize = defined_items.size();
return true;