From 6d2a21450b50b9ba6cf57be1355af8aa78590ae2 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Mon, 1 Sep 2025 13:15:46 -0700 Subject: [PATCH] fix item exploits Update VendorComponent.cpp Update Mail.cpp --- dGame/Character.cpp | 2 +- dGame/dBehaviors/ConsumeItemBehavior.cpp | 2 +- dGame/dComponents/AchievementVendorComponent.cpp | 3 +-- dGame/dComponents/ActivityComponent.cpp | 5 +---- dGame/dComponents/InventoryComponent.cpp | 1 - dGame/dComponents/VendorComponent.cpp | 11 +++++++++-- dGame/dGameMessages/GameMessages.cpp | 15 +++++++++++---- dGame/dInventory/Item.cpp | 5 ++--- dGame/dUtilities/Mail.cpp | 2 +- dGame/dUtilities/Preconditions.cpp | 4 +--- dScripts/02_server/Map/AG/AgCagedBricksServer.cpp | 2 +- dScripts/02_server/Map/AG/NpcCowboyServer.cpp | 2 +- dScripts/02_server/Map/AG/NpcWispServer.cpp | 2 +- dScripts/02_server/Map/AG/RemoveRentalGear.cpp | 2 +- dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp | 4 ++-- .../02_server/Map/General/TokenConsoleServer.cpp | 2 +- .../02_server/Map/NS/NsTokenConsoleServer.cpp | 2 +- .../02_server/Map/NT/NtCombatChallengeServer.cpp | 2 +- dScripts/02_server/Map/NT/NtDukeServer.cpp | 2 +- dScripts/02_server/Map/NT/NtVandaServer.cpp | 2 +- dScripts/02_server/Map/PR/SpawnGryphonServer.cpp | 2 +- dScripts/02_server/Map/njhub/NjColeNPC.cpp | 2 +- .../02_server/Map/njhub/NjScrollChestServer.cpp | 2 +- dScripts/NPCAddRemoveItem.cpp | 2 +- dScripts/ai/PROPERTY/AG/AgPropGuard.cpp | 2 +- 25 files changed, 44 insertions(+), 38 deletions(-) diff --git a/dGame/Character.cpp b/dGame/Character.cpp index 13ac5e37..0af51a1c 100644 --- a/dGame/Character.cpp +++ b/dGame/Character.cpp @@ -496,7 +496,7 @@ void Character::OnZoneLoad() { // Remove all GM items for (const auto lot : Inventory::GetAllGMItems()) { - inventoryComponent->RemoveItem(lot, inventoryComponent->GetLotCount(lot)); + inventoryComponent->RemoveItem(lot, inventoryComponent->GetLotCount(lot), eInventoryType::ALL); } } diff --git a/dGame/dBehaviors/ConsumeItemBehavior.cpp b/dGame/dBehaviors/ConsumeItemBehavior.cpp index 440a641b..66745ee7 100644 --- a/dGame/dBehaviors/ConsumeItemBehavior.cpp +++ b/dGame/dBehaviors/ConsumeItemBehavior.cpp @@ -12,7 +12,7 @@ void ConsumeItemBehavior::Handle(BehaviorContext* context, RakNet::BitStream& bi auto inventoryComponent = caster->GetComponent(); if (!inventoryComponent) return; - if (inventoryComponent->RemoveItem(this->m_ConsumeLOT, this->m_NumToConsume, eInventoryType::INVALID, false, true)){ + if (inventoryComponent->RemoveItem(this->m_ConsumeLOT, this->m_NumToConsume, eInventoryType::ALL, false, true)){ action_to_cast = m_ActionConsumed; } } diff --git a/dGame/dComponents/AchievementVendorComponent.cpp b/dGame/dComponents/AchievementVendorComponent.cpp index 006a2b6f..5ac03102 100644 --- a/dGame/dComponents/AchievementVendorComponent.cpp +++ b/dGame/dComponents/AchievementVendorComponent.cpp @@ -64,12 +64,11 @@ void AchievementVendorComponent::Buy(Entity* buyer, LOT lot, uint32_t count) { } const uint32_t altCurrencyCost = itemComp.commendationCost * count; - if (inventoryComponent->GetLotCount(costLOT) < altCurrencyCost) { + if (inventoryComponent->GetLotCount(costLOT) < altCurrencyCost || !inventoryComponent->RemoveItem(costLOT, altCurrencyCost, eInventoryType::ALL)) { GameMessages::SendVendorTransactionResult(buyer, buyer->GetSystemAddress(), eVendorTransactionResult::PURCHASE_FAIL); return; } - inventoryComponent->RemoveItem(costLOT, altCurrencyCost); inventoryComponent->AddItem(lot, count, eLootSourceType::VENDOR); GameMessages::SendVendorTransactionResult(buyer, buyer->GetSystemAddress(), eVendorTransactionResult::PURCHASE_SUCCESS); diff --git a/dGame/dComponents/ActivityComponent.cpp b/dGame/dComponents/ActivityComponent.cpp index 5958d184..8e0c62d3 100644 --- a/dGame/dComponents/ActivityComponent.cpp +++ b/dGame/dComponents/ActivityComponent.cpp @@ -354,10 +354,7 @@ bool ActivityComponent::CheckCost(Entity* player) const { bool ActivityComponent::TakeCost(Entity* player) const { auto* inventoryComponent = player->GetComponent(); - if (CheckCost(player)) { - inventoryComponent->RemoveItem(m_ActivityInfo.optionalCostLOT, m_ActivityInfo.optionalCostCount); - return true; - } else return false; + return CheckCost(player) && inventoryComponent->RemoveItem(m_ActivityInfo.optionalCostLOT, m_ActivityInfo.optionalCostCount, eInventoryType::ALL); } void ActivityComponent::PlayerReady(Entity* player, bool bReady) { diff --git a/dGame/dComponents/InventoryComponent.cpp b/dGame/dComponents/InventoryComponent.cpp index b983759d..4cc0a3de 100644 --- a/dGame/dComponents/InventoryComponent.cpp +++ b/dGame/dComponents/InventoryComponent.cpp @@ -180,7 +180,6 @@ void InventoryComponent::AddItem( const int32_t sourceType, const bool bound, int32_t preferredSlot) { - LOG("AddItem %i %i %s %s", lot, count, StringifiedEnum::ToString(lootSourceType).data(), StringifiedEnum::ToString(inventoryType).data()); if (count == 0) { LOG("Attempted to add 0 of item (%i) to the inventory!", lot); diff --git a/dGame/dComponents/VendorComponent.cpp b/dGame/dComponents/VendorComponent.cpp index b4a5f05c..b6c89a50 100644 --- a/dGame/dComponents/VendorComponent.cpp +++ b/dGame/dComponents/VendorComponent.cpp @@ -164,10 +164,17 @@ void VendorComponent::Buy(Entity* buyer, LOT lot, uint32_t count) { return; } } + + bool success = true; for (const auto& [crafintCurrencyLOT, crafintCurrencyCount]: craftingCurrencies) { - inventoryComponent->RemoveItem(crafintCurrencyLOT, crafintCurrencyCount * count); + success = inventoryComponent->RemoveItem(crafintCurrencyLOT, crafintCurrencyCount * count, eInventoryType::ALL); + if (!success) break; } + if (!success) { + GameMessages::SendVendorTransactionResult(buyer, buyer->GetSystemAddress(), eVendorTransactionResult::PURCHASE_FAIL); + return; + } float buyScalar = GetBuyScalar(); const auto coinCost = static_cast(std::floor((itemComp.baseValue * buyScalar) * count)); @@ -184,7 +191,7 @@ void VendorComponent::Buy(Entity* buyer, LOT lot, uint32_t count) { GameMessages::SendVendorTransactionResult(buyer, buyer->GetSystemAddress(), eVendorTransactionResult::PURCHASE_FAIL); return; } - inventoryComponent->RemoveItem(itemComp.currencyLOT, altCurrencyCost); + inventoryComponent->RemoveItem(itemComp.currencyLOT, altCurrencyCost, eInventoryType::ALL); } character->SetCoins(character->GetCoins() - (coinCost), eLootSourceType::VENDOR); diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index 64583b61..96cf0380 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -4823,11 +4823,10 @@ void GameMessages::HandleBuybackFromVendor(RakNet::BitStream& inStream, Entity* if (Inventory::IsValidItem(itemComp.currencyLOT)) { const uint32_t altCurrencyCost = std::floor(itemComp.altCurrencyCost * sellScalar) * count; - if (inv->GetLotCount(itemComp.currencyLOT) < altCurrencyCost) { + if (inv->GetLotCount(itemComp.currencyLOT) < altCurrencyCost || !inv->RemoveItem(itemComp.currencyLOT, altCurrencyCost, eInventoryType::ALL)) { GameMessages::SendVendorTransactionResult(entity, sysAddr, eVendorTransactionResult::PURCHASE_FAIL); return; } - inv->RemoveItem(itemComp.currencyLOT, altCurrencyCost); } //inv->RemoveItem(count, -1, iObjID); @@ -5508,10 +5507,18 @@ void GameMessages::HandleModularBuildFinish(RakNet::BitStream& inStream, Entity* modules += u"1:" + (modToStr); if (k + 1 != count) modules += u"+"; + bool hasItem = false; if (temp->GetLotCount(mod) > 0) { - inv->RemoveItem(mod, 1, TEMP_MODELS); + hasItem = inv->RemoveItem(mod, 1, TEMP_MODELS); } else { - inv->RemoveItem(mod, 1); + hasItem = inv->RemoveItem(mod, 1, eInventoryType::ALL); + } + + if (!hasItem) { + LOG("Player (%llu) attempted to finish a modular build without having all the required parts.", character->GetObjectID()); + GameMessages::SendFinishArrangingWithItem(character, entity->GetObjectID()); // kick them from modular build + GameMessages::SendModularBuildEnd(character); // i dont know if this does anything but DLUv2 did it + return; } // Doing this check for 1 singular mission that needs to know when you've swapped every part out during a car modular build. diff --git a/dGame/dInventory/Item.cpp b/dGame/dInventory/Item.cpp index a552eddf..ca93cd9a 100644 --- a/dGame/dInventory/Item.cpp +++ b/dGame/dInventory/Item.cpp @@ -289,11 +289,10 @@ bool Item::Consume() { GameMessages::SendUseItemResult(inventory->GetComponent()->GetParent(), lot, success); - if (success) { + const auto myLot = this->lot; + if (success && inventory->GetComponent()->RemoveItem(lot, 1, eInventoryType::ALL)) { // Save this because if this is the last item in the inventory // we may delete ourself (lol) - const auto myLot = this->lot; - inventory->GetComponent()->RemoveItem(lot, 1); auto* missionComponent = inventory->GetComponent()->GetParent()->GetComponent(); if (missionComponent) missionComponent->Progress(eMissionTaskType::GATHER, myLot, LWOOBJID_EMPTY, "", -1); } diff --git a/dGame/dUtilities/Mail.cpp b/dGame/dUtilities/Mail.cpp index 0a93ced0..5ab82f61 100644 --- a/dGame/dUtilities/Mail.cpp +++ b/dGame/dUtilities/Mail.cpp @@ -106,7 +106,7 @@ namespace Mail { // Remove coins and items from the sender player->GetCharacter()->SetCoins(player->GetCharacter()->GetCoins() - mailCost, eLootSourceType::MAIL); if (inventoryComponent && hasAttachment && item) { - removeSuccess = inventoryComponent->RemoveItem(mailInfo.itemLOT, mailInfo.itemCount, INVALID, true); + removeSuccess = inventoryComponent->RemoveItem(mailInfo.itemLOT, mailInfo.itemCount, ALL, true); auto* missionComponent = player->GetComponent(); if (missionComponent && removeSuccess) missionComponent->Progress(eMissionTaskType::GATHER, mailInfo.itemLOT, LWOOBJID_EMPTY, "", -mailInfo.itemCount); } diff --git a/dGame/dUtilities/Preconditions.cpp b/dGame/dUtilities/Preconditions.cpp index 118d9037..0c322987 100644 --- a/dGame/dUtilities/Preconditions.cpp +++ b/dGame/dUtilities/Preconditions.cpp @@ -130,9 +130,7 @@ bool Precondition::CheckValue(Entity* player, const uint32_t value, bool evaluat case PreconditionType::HasItem: if (evaluateCosts) // As far as I know this is only used for quickbuilds, and removal shouldn't actually be handled here. { - inventoryComponent->RemoveItem(value, count); - - return true; + return inventoryComponent->RemoveItem(value, count, eInventoryType::ALL); } return inventoryComponent->GetLotCount(value) >= count; diff --git a/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp b/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp index 4d7e8a64..dd51f5b4 100644 --- a/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp +++ b/dScripts/02_server/Map/AG/AgCagedBricksServer.cpp @@ -24,6 +24,6 @@ void AgCagedBricksServer::OnUse(Entity* self, Entity* user) { auto inv = static_cast(user->GetComponent(eReplicaComponentType::INVENTORY)); if (inv) { - inv->RemoveItem(14553, 1); + inv->RemoveItem(14553, 1, eInventoryType::ALL); } } diff --git a/dScripts/02_server/Map/AG/NpcCowboyServer.cpp b/dScripts/02_server/Map/AG/NpcCowboyServer.cpp index 996a99c2..219110b7 100644 --- a/dScripts/02_server/Map/AG/NpcCowboyServer.cpp +++ b/dScripts/02_server/Map/AG/NpcCowboyServer.cpp @@ -22,7 +22,7 @@ void NpcCowboyServer::OnMissionDialogueOK(Entity* self, Entity* target, int miss inventoryComponent->AddItem(14378, 1, eLootSourceType::NONE); } } else if (missionState == eMissionState::READY_TO_COMPLETE || missionState == eMissionState::COMPLETE_READY_TO_COMPLETE) { - inventoryComponent->RemoveItem(14378, 1); + inventoryComponent->RemoveItem(14378, 1, eInventoryType::ALL); } // Next up hide or show the samples based on the mission state diff --git a/dScripts/02_server/Map/AG/NpcWispServer.cpp b/dScripts/02_server/Map/AG/NpcWispServer.cpp index e087df24..0a6c9fda 100644 --- a/dScripts/02_server/Map/AG/NpcWispServer.cpp +++ b/dScripts/02_server/Map/AG/NpcWispServer.cpp @@ -22,7 +22,7 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio && maelstromVacuum == nullptr) { inventory->AddItem(maelstromVacuumLot, 1, eLootSourceType::NONE); } else if (missionState == eMissionState::READY_TO_COMPLETE || missionState == eMissionState::COMPLETE_READY_TO_COMPLETE) { - inventory->RemoveItem(maelstromVacuumLot, 1); + inventory->RemoveItem(maelstromVacuumLot, 1, eInventoryType::ALL); } // Next up hide or show the samples based on the mission state diff --git a/dScripts/02_server/Map/AG/RemoveRentalGear.cpp b/dScripts/02_server/Map/AG/RemoveRentalGear.cpp index f9bdf1ce..3b950a58 100644 --- a/dScripts/02_server/Map/AG/RemoveRentalGear.cpp +++ b/dScripts/02_server/Map/AG/RemoveRentalGear.cpp @@ -31,7 +31,7 @@ void RemoveRentalGear::OnMissionDialogueOK(Entity* self, Entity* target, int mis auto* id = inv->FindItemByLot(item); if (id) { inv->UnEquipItem(id); - inv->RemoveItem(id->GetLot(), id->GetCount()); + inv->RemoveItem(id->GetLot(), id->GetCount(), eInventoryType::ALL); } } diff --git a/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp b/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp index 88415481..db235f8e 100644 --- a/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp +++ b/dScripts/02_server/Map/FV/ImgBrickConsoleQB.cpp @@ -74,13 +74,13 @@ void ImgBrickConsoleQB::OnUse(Entity* self, Entity* user) { if (missionComponent != nullptr && inventoryComponent != nullptr) { if (missionComponent->GetMissionState(1302) == eMissionState::ACTIVE) { - inventoryComponent->RemoveItem(13074, 1); + inventoryComponent->RemoveItem(13074, 1, eInventoryType::ALL); missionComponent->ForceProgressTaskType(1302, 1, 1); } if (missionComponent->GetMissionState(1926) == eMissionState::ACTIVE) { - inventoryComponent->RemoveItem(14472, 1); + inventoryComponent->RemoveItem(14472, 1, eInventoryType::ALL); missionComponent->ForceProgressTaskType(1926, 1, 1); } diff --git a/dScripts/02_server/Map/General/TokenConsoleServer.cpp b/dScripts/02_server/Map/General/TokenConsoleServer.cpp index 0a1f679c..68f4130f 100644 --- a/dScripts/02_server/Map/General/TokenConsoleServer.cpp +++ b/dScripts/02_server/Map/General/TokenConsoleServer.cpp @@ -14,7 +14,7 @@ void TokenConsoleServer::OnUse(Entity* self, Entity* user) { //make sure the user has the required amount of infected bricks if (inv && inv->GetLotCount(6194) >= bricksToTake) { //yeet the bricks - inv->RemoveItem(6194, bricksToTake); + inv->RemoveItem(6194, bricksToTake, eInventoryType::ALL); //play sound if (self->HasVar(u"sound1")) { diff --git a/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp b/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp index 7d825828..39bda78b 100644 --- a/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp +++ b/dScripts/02_server/Map/NS/NsTokenConsoleServer.cpp @@ -34,7 +34,7 @@ void NsTokenConsoleServer::OnUse(Entity* self, Entity* user) { return; } - inventoryComponent->RemoveItem(6194, 25); + inventoryComponent->RemoveItem(6194, 25, eInventoryType::ALL); const auto useSound = self->GetVar(u"sound1"); diff --git a/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp b/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp index 94ad718f..fc5ed3a6 100644 --- a/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp +++ b/dScripts/02_server/Map/NT/NtCombatChallengeServer.cpp @@ -51,7 +51,7 @@ void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender, auto* inventoryComponent = sender->GetComponent(); if (inventoryComponent != nullptr) { - inventoryComponent->RemoveItem(3039, 1); + inventoryComponent->RemoveItem(3039, 1, eInventoryType::ALL); } GameMessages::SendPlayNDAudioEmitter(self, sender->GetSystemAddress(), startSound); diff --git a/dScripts/02_server/Map/NT/NtDukeServer.cpp b/dScripts/02_server/Map/NT/NtDukeServer.cpp index 4ab19445..90defd0c 100644 --- a/dScripts/02_server/Map/NT/NtDukeServer.cpp +++ b/dScripts/02_server/Map/NT/NtDukeServer.cpp @@ -34,7 +34,7 @@ void NtDukeServer::OnMissionDialogueOK(Entity* self, Entity* target, int mission if ((state == eMissionState::AVAILABLE || state == eMissionState::ACTIVE) && lotCount < 1) { inventoryComponent->AddItem(m_SwordLot, 1, eLootSourceType::NONE); } else if (state == eMissionState::READY_TO_COMPLETE) { - inventoryComponent->RemoveItem(m_SwordLot, lotCount); + inventoryComponent->RemoveItem(m_SwordLot, lotCount, eInventoryType::ALL); } } NtBcSubmitServer::OnMissionDialogueOK(self, target, missionID, missionState); diff --git a/dScripts/02_server/Map/NT/NtVandaServer.cpp b/dScripts/02_server/Map/NT/NtVandaServer.cpp index 45096387..d10dfb08 100644 --- a/dScripts/02_server/Map/NT/NtVandaServer.cpp +++ b/dScripts/02_server/Map/NT/NtVandaServer.cpp @@ -8,7 +8,7 @@ void NtVandaServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio if (missionID == m_AlienPartMissionID && missionState == eMissionState::READY_TO_COMPLETE) { auto* inventoryComponent = target->GetComponent(); for (const auto& alienPartLot : m_AlienPartLots) { - inventoryComponent->RemoveItem(alienPartLot, 1); + inventoryComponent->RemoveItem(alienPartLot, 1, eInventoryType::ALL); } } NtBcSubmitServer::OnMissionDialogueOK(self, target, missionID, missionState); diff --git a/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp b/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp index cf635fe4..9e22efbf 100644 --- a/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp +++ b/dScripts/02_server/Map/PR/SpawnGryphonServer.cpp @@ -20,7 +20,7 @@ void SpawnGryphonServer::OnUse(Entity* self, Entity* user) { // Little extra for handling the case of the egg being placed the first time if (missionComponent != nullptr && inventoryComponent != nullptr && missionComponent->GetMissionState(1391) == eMissionState::ACTIVE) { - inventoryComponent->RemoveItem(12483, inventoryComponent->GetLotCount(12483)); + inventoryComponent->RemoveItem(12483, inventoryComponent->GetLotCount(12483), eInventoryType::ALL); GameMessages::SendTerminateInteraction(user->GetObjectID(), eTerminateType::FROM_INTERACTION, self->GetObjectID()); return; } diff --git a/dScripts/02_server/Map/njhub/NjColeNPC.cpp b/dScripts/02_server/Map/njhub/NjColeNPC.cpp index b989f3ee..b2b830aa 100644 --- a/dScripts/02_server/Map/njhub/NjColeNPC.cpp +++ b/dScripts/02_server/Map/njhub/NjColeNPC.cpp @@ -39,7 +39,7 @@ void NjColeNPC::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, } if (inventoryComponent->GetLotCount(14499) > 0) { - inventoryComponent->RemoveItem(14499, 1); + inventoryComponent->RemoveItem(14499, 1, eInventoryType::ALL); } else { return; } diff --git a/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp b/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp index 7156b368..c5ca302e 100644 --- a/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp +++ b/dScripts/02_server/Map/njhub/NjScrollChestServer.cpp @@ -9,7 +9,7 @@ void NjScrollChestServer::OnUse(Entity* self, Entity* user) { if (playerInventory != nullptr && playerInventory->GetLotCount(keyLOT) == 1) { // Check for the key and remove - playerInventory->RemoveItem(keyLOT, 1); + playerInventory->RemoveItem(keyLOT, 1, eInventoryType::ALL); // Reward the player with the item set playerInventory->AddItem(rewardItemLOT, 1, eLootSourceType::NONE); diff --git a/dScripts/NPCAddRemoveItem.cpp b/dScripts/NPCAddRemoveItem.cpp index 13677072..40d0a2a7 100644 --- a/dScripts/NPCAddRemoveItem.cpp +++ b/dScripts/NPCAddRemoveItem.cpp @@ -14,7 +14,7 @@ void NPCAddRemoveItem::OnMissionDialogueOK(Entity* self, Entity* target, int mis if (itemSetting.add && (missionState == eMissionState::AVAILABLE || missionState == eMissionState::COMPLETE_AVAILABLE)) { inventory->AddItem(lot, 1, eLootSourceType::NONE); } else if (itemSetting.remove && (missionState == eMissionState::READY_TO_COMPLETE || missionState == eMissionState::COMPLETE_READY_TO_COMPLETE)) { - inventory->RemoveItem(lot, 1); + inventory->RemoveItem(lot, 1, eInventoryType::ALL); } } } diff --git a/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp b/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp index e8e94b53..4e77cb55 100644 --- a/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp +++ b/dScripts/ai/PROPERTY/AG/AgPropGuard.cpp @@ -24,7 +24,7 @@ void AgPropGuard::OnMissionDialogueOK(Entity* self, Entity* target, int missionI if (id) { inventoryComponent->UnEquipItem(id); - inventoryComponent->RemoveItem(id->GetLot(), id->GetCount()); + inventoryComponent->RemoveItem(id->GetLot(), id->GetCount(), eInventoryType::ALL); } } } else if (