From 72b38127164a926ab9562e7d0fc65ddef358059f Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sun, 6 Feb 2022 14:28:15 -0800 Subject: [PATCH 1/3] fixed tab indent --- dGame/dMission/RacingTaskParam.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dGame/dMission/RacingTaskParam.h b/dGame/dMission/RacingTaskParam.h index e85d9f91..38f8dd8e 100644 --- a/dGame/dMission/RacingTaskParam.h +++ b/dGame/dMission/RacingTaskParam.h @@ -16,5 +16,5 @@ enum class RacingTaskParam : int32_t { RACING_TASK_PARAM_WIN_RACE_IN_WORLD = 14, // Date: Sun, 6 Feb 2022 14:28:27 -0800 Subject: [PATCH 2/3] Added associate for 17 --- dGame/dMission/MissionTask.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dGame/dMission/MissionTask.cpp b/dGame/dMission/MissionTask.cpp index 4c49327d..9bcbdc81 100644 --- a/dGame/dMission/MissionTask.cpp +++ b/dGame/dMission/MissionTask.cpp @@ -420,6 +420,7 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string& case MissionTaskType::MISSION_TASK_TYPE_RACING: { + // The meaning of associate can be found in RacingTaskParam.h if (parameters.empty()) break; if (!InAllTargets(dZoneManager::Instance()->GetZone()->GetWorldID()) && !(parameters[0] == 4 || parameters[0] == 5) && !InAllTargets(value)) break; @@ -444,6 +445,11 @@ void MissionTask::Progress(int32_t value, LWOOBJID associate, const std::string& if (!InAllTargets(value)) break; AddProgress(count); } + else if (associate == 17) + { + if (!InAllTargets(value)) break; + AddProgress(count); + } else { AddProgress(count); From 9cfb9a0de69060216fc1de0bf7a358cd5c744b88 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sun, 6 Feb 2022 14:28:37 -0800 Subject: [PATCH 3/3] Added specific smashable mission progression --- dScripts/FvRaceSmashEggImagineServer.cpp | 4 +++- dScripts/RaceSmashServer.cpp | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dScripts/FvRaceSmashEggImagineServer.cpp b/dScripts/FvRaceSmashEggImagineServer.cpp index 68faea04..8e0d0897 100644 --- a/dScripts/FvRaceSmashEggImagineServer.cpp +++ b/dScripts/FvRaceSmashEggImagineServer.cpp @@ -27,7 +27,9 @@ void FvRaceSmashEggImagineServer::OnDie(Entity *self, Entity *killer) { characterComponent->UpdatePlayerStatistic(RacingSmashablesSmashed); } if (missionComponent == nullptr) return; - missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_RACING, self->GetLOT(), (LWOOBJID)RacingTaskParam::RACING_TASK_PARAM_SMASH_DRAGON_EGGS); + // Dragon eggs have their own smash server so we handle mission progression for them here. + missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_RACING, 0, (LWOOBJID)RacingTaskParam::RACING_TASK_PARAM_SMASHABLES); + missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_RACING, self->GetLOT(), (LWOOBJID)RacingTaskParam::RACING_TASK_PARAM_SMASH_SPECIFIC_SMASHABLE); } } diff --git a/dScripts/RaceSmashServer.cpp b/dScripts/RaceSmashServer.cpp index 059ac430..582a8ed3 100644 --- a/dScripts/RaceSmashServer.cpp +++ b/dScripts/RaceSmashServer.cpp @@ -22,6 +22,8 @@ void RaceSmashServer::OnDie(Entity *self, Entity *killer) { // Progress racing smashable missions if(missionComponent == nullptr) return; missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_RACING, 0, (LWOOBJID)RacingTaskParam::RACING_TASK_PARAM_SMASHABLES); + // Progress missions that ask us to smash a specific smashable. + missionComponent->Progress(MissionTaskType::MISSION_TASK_TYPE_RACING, self->GetLOT(), (LWOOBJID)RacingTaskParam::RACING_TASK_PARAM_SMASH_SPECIFIC_SMASHABLE); } } }