DarkflameServer/dDatabase/Tables/CDInventoryComponentTable.h

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

24 lines
742 B
C
Raw Permalink Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
struct CDInventoryComponent {
unsigned int id; //!< The component ID for this object
unsigned int itemid; //!< The LOT of the object
unsigned int count; //!< The count of the items the object has
bool equip; //!< Whether or not to equip the item
};
class CDInventoryComponentTable : public CDTable<CDInventoryComponentTable> {
private:
std::vector<CDInventoryComponent> entries;
2022-07-28 13:39:57 +00:00
public:
void LoadValuesFromDatabase();
// Queries the table with a custom "where" clause
std::vector<CDInventoryComponent> Query(std::function<bool(CDInventoryComponent)> predicate);
2022-07-28 13:39:57 +00:00
const std::vector<CDInventoryComponent>& GetEntries() const;
};