DarkflameServer/dDatabase/Tables/CDMissionNPCComponentTable.h

28 lines
806 B
C
Raw Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
struct CDMissionNPCComponent {
2022-07-28 13:39:57 +00:00
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
};
class CDMissionNPCComponentTable : public CDTable<CDMissionNPCComponentTable> {
private:
2022-07-28 13:39:57 +00:00
std::vector<CDMissionNPCComponent> entries;
public:
CDMissionNPCComponentTable();
// Queries the table with a custom "where" clause
2022-07-28 13:39:57 +00:00
std::vector<CDMissionNPCComponent> Query(std::function<bool(CDMissionNPCComponent)> predicate);
// Gets all the entries in the table
2022-07-28 13:39:57 +00:00
std::vector<CDMissionNPCComponent> GetEntries(void) const;
};