mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-08 03:34:10 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
13
dScripts/NtVandaServer.cpp
Normal file
13
dScripts/NtVandaServer.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "NtVandaServer.h"
|
||||
#include "InventoryComponent.h"
|
||||
|
||||
void NtVandaServer::OnMissionDialogueOK(Entity *self, Entity *target, int missionID, MissionState missionState) {
|
||||
|
||||
// Removes the alien parts after completing the mission
|
||||
if (missionID == m_AlienPartMissionID && missionState == MissionState::MISSION_STATE_READY_TO_COMPLETE) {
|
||||
auto* inventoryComponent = target->GetComponent<InventoryComponent>();
|
||||
for (const auto& alienPartLot : m_AlienPartLots) {
|
||||
inventoryComponent->RemoveItem(alienPartLot, 1);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user