From b077bd937d960fb96afa894cd7fb377f8d27bfd7 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Wed, 9 Feb 2022 16:42:17 -0800 Subject: [PATCH] Fixed bugs with minigame progression --- dGame/dMission/MissionTask.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/dGame/dMission/MissionTask.cpp b/dGame/dMission/MissionTask.cpp index 4c49327d..8503e8bc 100644 --- a/dGame/dMission/MissionTask.cpp +++ b/dGame/dMission/MissionTask.cpp @@ -78,14 +78,7 @@ void MissionTask::SetProgress(const uint32_t value, const bool echo) std::vector updates; updates.push_back(static_cast(progress)); - - GameMessages::SendNotifyMissionTask( - entity, - entity->GetSystemAddress(), - static_cast(info->id), - static_cast(1 << (mask + 1)), - updates - ); + GameMessages::SendNotifyMissionTask(entity, entity->GetSystemAddress(), static_cast(info->id), static_cast(1 << (mask + 1)), updates); } @@ -190,15 +183,13 @@ bool MissionTask::InParameters(const uint32_t value) const bool MissionTask::IsComplete() const { - // Minigames are the only ones where the target value is a score they need to get but the actual target is the act ID - return GetType() == MissionTaskType::MISSION_TASK_TYPE_MINIGAME ? progress == info->target : progress >= info->targetValue; + return progress >= info->targetValue; } void MissionTask::Complete() { - // Minigames are the only ones where the target value is a score they need to get but the actual target is the act ID - SetProgress(GetType() == MissionTaskType::MISSION_TASK_TYPE_MINIGAME ? info->target : info->targetValue); + SetProgress(info->targetValue); } @@ -354,7 +345,7 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string& } if(info->targetGroup == targets && value >= info->targetValue) { - SetProgress(info->target); + SetProgress(info->targetValue); break; } break;