fix item exploits

Update VendorComponent.cpp

Update Mail.cpp
This commit is contained in:
David Markowitz
2025-09-01 13:15:46 -07:00
parent f9e74e6994
commit 6d2a21450b
25 changed files with 44 additions and 38 deletions

View File

@@ -51,7 +51,7 @@ void NtCombatChallengeServer::OnMessageBoxResponse(Entity* self, Entity* sender,
auto* inventoryComponent = sender->GetComponent<InventoryComponent>();
if (inventoryComponent != nullptr) {
inventoryComponent->RemoveItem(3039, 1);
inventoryComponent->RemoveItem(3039, 1, eInventoryType::ALL);
}
GameMessages::SendPlayNDAudioEmitter(self, sender->GetSystemAddress(), startSound);

View File

@@ -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);

View File

@@ -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<InventoryComponent>();
for (const auto& alienPartLot : m_AlienPartLots) {
inventoryComponent->RemoveItem(alienPartLot, 1);
inventoryComponent->RemoveItem(alienPartLot, 1, eInventoryType::ALL);
}
}
NtBcSubmitServer::OnMissionDialogueOK(self, target, missionID, missionState);