From 6b30292efd76c3d56e58d2ba76a74b9d5d161757 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Mon, 20 Jun 2022 22:22:32 -0700 Subject: [PATCH] Fix issue with dropship computer The dropship computer now no longer gives a player a second mission item should they interact with it again after mission completion --- dScripts/AmDropshipComputer.cpp | 4 ++-- dScripts/AmDropshipComputer.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dScripts/AmDropshipComputer.cpp b/dScripts/AmDropshipComputer.cpp index 836b09b0..dfc17474 100644 --- a/dScripts/AmDropshipComputer.cpp +++ b/dScripts/AmDropshipComputer.cpp @@ -27,12 +27,12 @@ void AmDropshipComputer::OnUse(Entity* self, Entity* user) return; } - if (inventoryComponent->GetLotCount(12323) != 0) + if (inventoryComponent->GetLotCount(m_NexusTalonDataCard) != 0 || missionComponent->GetMission(979)->GetMissionState() == MissionState::MISSION_STATE_COMPLETE) { return; } - inventoryComponent->AddItem(12323, 1, eLootSourceType::LOOT_SOURCE_NONE); + inventoryComponent->AddItem(m_NexusTalonDataCard, 1, eLootSourceType::LOOT_SOURCE_NONE); } void AmDropshipComputer::OnDie(Entity* self, Entity* killer) diff --git a/dScripts/AmDropshipComputer.h b/dScripts/AmDropshipComputer.h index 9b28d92d..620770af 100644 --- a/dScripts/AmDropshipComputer.h +++ b/dScripts/AmDropshipComputer.h @@ -8,4 +8,6 @@ public: void OnUse(Entity* self, Entity* user) override; void OnDie(Entity* self, Entity* killer) override; void OnTimerDone(Entity* self, std::string timerName) override; +private: + const LOT m_NexusTalonDataCard = 12323; };