Fixed an issue where repeatable missions were not rewarding the items they should be rewarding (#357)

When applied this fixes issues with repeatable mission were not rewarding the correct items.
This commit is contained in:
David Markowitz
2022-01-14 05:00:09 -08:00
committed by GitHub
parent 24aaa04954
commit 70af1f9314
3 changed files with 15 additions and 9 deletions

View File

@ -14,15 +14,15 @@ void NpcWispServer::OnMissionDialogueOK(Entity* self, Entity* target, int missio
if (inventory == nullptr)
return;
LOT maelstromCubeLot = 14592;
auto* maelstromCube = inventory->FindItemByLot(maelstromCubeLot);
LOT maelstromVacuumLot = 14592;
auto* maelstromVacuum = inventory->FindItemByLot(maelstromVacuumLot);
// For the daily we add the maelstrom cube if the player doesn't have it yet
// For the daily we add the maelstrom vacuum if the player doesn't have it yet
if (missionID == 1883 && (missionState == MissionState::MISSION_STATE_AVAILABLE || missionState == MissionState::MISSION_STATE_COMPLETE_AVAILABLE)
&& maelstromCube == nullptr) {
inventory->AddItem(maelstromCubeLot, 1);
&& maelstromVacuum == nullptr) {
inventory->AddItem(maelstromVacuumLot, 1);
} else if (missionState == MissionState::MISSION_STATE_READY_TO_COMPLETE || missionState == MissionState::MISSION_STATE_COMPLETE_READY_TO_COMPLETE) {
inventory->RemoveItem(maelstromCubeLot, 1);
inventory->RemoveItem(maelstromVacuumLot, 1);
}
// Next up hide or show the samples based on the mission state