mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-06 07:18:42 +00:00
fix item exploits
Update VendorComponent.cpp Update Mail.cpp
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user