DarkflameServer/dDatabase/Tables/CDMissionNPCComponentTable.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
810 B
C
Raw Normal View History

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