From a5126536a403775428d2e5e20ee5326024ae7bf7 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Wed, 30 Sep 2026 07:46:13 -0500 Subject: [PATCH] fix(quickbuild): the item cost is taken with the quickbuild as its source Live's RemoveItemFromInventory for a quickbuild's item cost (the FV Stone Warrior pedestal's 5 Maelstrom Infected Bricks, taken when the build starts) had the loot source Quickbuild and the quickbuild's object ID as the loot source object. DLU sent loot source None with no source. Co-Authored-By: Claude Opus 5.5 --- dGame/dComponents/QuickBuildComponent.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dGame/dComponents/QuickBuildComponent.cpp b/dGame/dComponents/QuickBuildComponent.cpp index f607cb924..aa52e4867 100644 --- a/dGame/dComponents/QuickBuildComponent.cpp +++ b/dGame/dComponents/QuickBuildComponent.cpp @@ -664,9 +664,11 @@ void QuickBuildComponent::TakeItemCosts(Entity& user) { if (!inventoryComponent) return; // Live took the precondition items (for example the FV Stone Warrior pedestal's 5 Maelstrom Infected Bricks) - // when the build started and gave them back when it was cancelled + // when the build started and gave them back when it was cancelled. The removal names the quickbuild as its loot + // source (Quickbuild, the quickbuild's object ID), as live's did. + const ItemRemovalSource removalSource{ eLootSourceType::QUICKBUILD, m_Parent->GetObjectID() }; for (const auto& cost : m_Precondition->GetItemCosts(&user)) { - if (inventoryComponent->RemoveItem(cost.lot, cost.count, eInventoryType::ALL)) m_TakenItems.push_back(cost); + if (inventoryComponent->RemoveItem(cost.lot, cost.count, eInventoryType::ALL, false, false, removalSource)) m_TakenItems.push_back(cost); } if (!m_TakenItems.empty()) m_TakenItemsFrom = user.GetObjectID(); }