fix: make vanity npc's use default equipment if none is specified (#1116)

This commit is contained in:
Aaron Kimbrell 2023-06-16 16:09:46 -05:00 committed by GitHub
parent 2a0f63c0a1
commit 1a74c028c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ Entity* VanityUtilities::SpawnNPC(LOT lot, const std::string& name, const NiPoin
auto* inventoryComponent = entity->GetComponent<InventoryComponent>();
if (inventoryComponent != nullptr) {
if (inventoryComponent && !inventory.empty()) {
inventoryComponent->SetNPCItems(inventory);
}