DarkflameServer/dDatabase/Tables/CDItemSetsTable.h
David Markowitz dc526aeec1 Move away from constructor queries
Fix up other large tables to have proper backup lookups

Revert "idk im just dumb ig"

This reverts commit 5d5be5df53b8959b42b291613d7db749a65a3585.

idk im just dumb ig
2023-07-25 19:10:37 -07:00

36 lines
1.2 KiB
C++

#pragma once
// Custom Classes
#include "CDTable.h"
struct CDItemSets {
unsigned int setID; //!< The item set ID
unsigned int locStatus; //!< The loc status
std::string itemIDs; //!< THe item IDs
unsigned int kitType; //!< The item kit type
unsigned int kitRank; //!< The item kit rank
unsigned int kitImage; //!< The item kit image
unsigned int skillSetWith2; //!< The skill set with 2
unsigned int skillSetWith3; //!< The skill set with 3
unsigned int skillSetWith4; //!< The skill set with 4
unsigned int skillSetWith5; //!< The skill set with 5
unsigned int skillSetWith6; //!< The skill set with 6
bool localize; //!< Whether or localize
std::string gate_version; //!< The gate version
unsigned int kitID; //!< The kit ID
float priority; //!< The priority
};
class CDItemSetsTable : public CDTable<CDItemSetsTable> {
private:
std::vector<CDItemSets> entries;
public:
void LoadValuesFromDatabase();
// Queries the table with a custom "where" clause
std::vector<CDItemSets> Query(std::function<bool(CDItemSets)> predicate);
const std::vector<CDItemSets>& GetEntries(void) const;
};