mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-12 19:18:28 +00:00
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:
@@ -21,7 +21,7 @@ public:
|
||||
* @param missions the list of missions to check the prerequisites against (f.e. whether they're completed)
|
||||
* @return whether or not all the prerequisites are met
|
||||
*/
|
||||
bool Execute(const std::unordered_map<uint32_t, Mission*>& missions) const;
|
||||
bool Execute(const std::map<uint32_t, Mission*>& missions) const;
|
||||
|
||||
explicit PrerequisiteExpression(const std::string& str);
|
||||
~PrerequisiteExpression();
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
* @param missions the mission inventory to check the prerequisites against
|
||||
* @return whether or not the mission identified by the specified ID can be accepted
|
||||
*/
|
||||
static bool CanAccept(uint32_t missionId, const std::unordered_map<uint32_t, Mission*>& missions);
|
||||
static bool CanAccept(uint32_t missionId, const std::map<uint32_t, Mission*>& missions);
|
||||
private:
|
||||
|
||||
/**
|
||||
@@ -54,5 +54,5 @@ private:
|
||||
* @param missions the mission inventory to check the prerequisites against
|
||||
* @return whether or not the mission identified by the specified ID can be accepted
|
||||
*/
|
||||
static bool CheckPrerequisites(uint32_t missionId, const std::unordered_map<uint32_t, Mission*>& missions);
|
||||
static bool CheckPrerequisites(uint32_t missionId, const std::map<uint32_t, Mission*>& missions);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user