From 1f62a0867afb872324306bebdca522414e3e9af5 Mon Sep 17 00:00:00 2001 From: Nic0Nic0Nii <89110903+Nic0Nic0Nii@users.noreply.github.com> Date: Wed, 31 Jan 2024 16:36:43 +0000 Subject: [PATCH] Fix Traveling Merchant inventory item references not updating when the traveling merchant is randomized. Co-authored-by: sigonasr2 --- Adventures in Lestoria/InventoryCreator.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Adventures in Lestoria/InventoryCreator.cpp b/Adventures in Lestoria/InventoryCreator.cpp index 9564aabf..38ef3eee 100644 --- a/Adventures in Lestoria/InventoryCreator.cpp +++ b/Adventures in Lestoria/InventoryCreator.cpp @@ -102,16 +102,9 @@ std::function #pragma region Row Merchant Updates std::function InventoryCreator::RowMerchant_InventorySlotsUpdate= [](InventoryScrollableWindowComponent&component,ITCategory cat){ - const std::vector>&merchantInv=Merchant::GetCurrentTravelingMerchant().GetShopItems(); - //We only want to refresh the inventory slots if the component count no longer matches what's actually in our inventory. - if(component.components.size() item:merchantInv){ component.AddButtonOnSlotUpdate(cat); - }else - if(component.components.size()>merchantInv.size()){ //There are empty spots, so let's clean up. - component.RemoveAllComponents(); - for(std::shared_ptr item:merchantInv){ - component.AddButtonOnSlotUpdate(cat); - } } }; std::function InventoryCreator::RowMerchant_AddButtonOnSlotUpdate=