mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-09 20:24:16 +00:00
format codebase
This commit is contained in:
@@ -16,11 +16,11 @@ class PrerequisiteExpression final
|
||||
PrerequisiteExpression* b;
|
||||
|
||||
public:
|
||||
/**
|
||||
* Executes the prerequisite, checking its contents and returning whether or not the mission may be accepted
|
||||
* @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
|
||||
*/
|
||||
/**
|
||||
* Executes the prerequisite, checking its contents and returning whether or not the mission may be accepted
|
||||
* @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;
|
||||
|
||||
explicit PrerequisiteExpression(const std::string& str);
|
||||
@@ -33,26 +33,26 @@ public:
|
||||
class MissionPrerequisites final
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Checks whether or not the mission identified by the specified ID can be accepted based on the mission inventory passed.
|
||||
* Also performs checks for daily missions (e.g. if the time out is valid).
|
||||
* @param missionId the mission ID to check prerequisites for
|
||||
* @param missions the mission inventory to check the prerequisites against
|
||||
* @return whether or not the mission identified by the specified ID can be accepted
|
||||
*/
|
||||
/**
|
||||
* Checks whether or not the mission identified by the specified ID can be accepted based on the mission inventory passed.
|
||||
* Also performs checks for daily missions (e.g. if the time out is valid).
|
||||
* @param missionId the mission ID to check prerequisites for
|
||||
* @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);
|
||||
private:
|
||||
|
||||
/**
|
||||
* Cache of all the executed prerequisites
|
||||
*/
|
||||
/**
|
||||
* Cache of all the executed prerequisites
|
||||
*/
|
||||
static std::unordered_map<uint32_t, PrerequisiteExpression*> expressions;
|
||||
|
||||
/**
|
||||
* Checks the prerequisites for a mission
|
||||
* @param missionId the mission ID to check prerequisites for
|
||||
* @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);
|
||||
/**
|
||||
* Checks the prerequisites for a mission
|
||||
* @param missionId the mission ID to check prerequisites for
|
||||
* @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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user