mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-25 23:17:28 +00:00
28 lines
763 B
C++
28 lines
763 B
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "CDTable.h"
|
|
|
|
struct CDMissionNPCComponent {
|
|
unsigned int id; //!< The ID
|
|
unsigned int missionID; //!< The Mission ID
|
|
bool offersMission; //!< Whether or not this NPC offers a mission
|
|
bool acceptsMission; //!< Whether or not this NPC accepts a mission
|
|
std::string gate_version; //!< The gate version
|
|
};
|
|
|
|
namespace CDMissionNPCComponentTable {
|
|
private:
|
|
std::vector<CDMissionNPCComponent> entries;
|
|
|
|
public:
|
|
void LoadTableIntoMemory();
|
|
// Queries the table with a custom "where" clause
|
|
std::vector<CDMissionNPCComponent> Query(std::function<bool(CDMissionNPCComponent)> predicate);
|
|
|
|
// Gets all the entries in the table
|
|
std::vector<CDMissionNPCComponent> GetEntries(void) const;
|
|
|
|
};
|
|
|