fix: racing meta missions and undefined behavior in mission progression

Tested that missions can still be completed
Tested that racing meta tasks are now actually possible
TODO: Tested that old characters with incomplete meta missions are brought up to speed with their current progress
This commit is contained in:
David Markowitz
2025-11-19 22:18:57 -08:00
parent a713216540
commit 4a9971d182
7 changed files with 66 additions and 14 deletions

View File

@@ -38,7 +38,7 @@ public:
* Returns all the missions for this entity, mapped by mission ID
* @return the missions for this entity, mapped by mission ID
*/
const std::unordered_map<uint32_t, Mission*>& GetMissions() const;
const std::map<uint32_t, Mission*>& GetMissions() const;
/**
* Returns the mission for the given mission ID, if it exists
@@ -170,6 +170,8 @@ public:
bool HasMission(uint32_t missionId);
void ResetMission(const int32_t missionId);
void FixRacingMetaMissions();
private:
bool OnGetObjectReportInfo(GameMessages::GameMsg& msg);
bool OnGetMissionState(GameMessages::GameMsg& msg);
@@ -177,7 +179,7 @@ private:
/**
* All the missions owned by this entity, mapped by mission ID
*/
std::unordered_map<uint32_t, Mission*> m_Missions;
std::map<uint32_t, Mission*> m_Missions;
/**
* All the collectibles currently collected by the entity