mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-09-06 07:18:42 +00:00
16 lines
641 B
C++
16 lines
641 B
C++
#include "NtVandaServer.h"
|
|
#include "InventoryComponent.h"
|
|
#include "eMissionState.h"
|
|
|
|
void NtVandaServer::OnMissionDialogueOK(Entity* self, Entity* target, int missionID, eMissionState missionState) {
|
|
|
|
// Removes the alien parts after completing the mission
|
|
if (missionID == m_AlienPartMissionID && missionState == eMissionState::READY_TO_COMPLETE) {
|
|
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
|
|
for (const auto& alienPartLot : m_AlienPartLots) {
|
|
inventoryComponent->RemoveItem(alienPartLot, 1, eInventoryType::ALL);
|
|
}
|
|
}
|
|
NtBcSubmitServer::OnMissionDialogueOK(self, target, missionID, missionState);
|
|
}
|