DarkflameServer/dDatabase/Tables/CDInventoryComponentTable.h

24 lines
696 B
C
Raw Permalink Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
struct CDInventoryComponent {
2022-07-28 13:39:57 +00:00
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
};
2023-07-16 07:27:30 +00:00
namespace CDInventoryComponentTable {
private:
2022-07-28 13:39:57 +00:00
std::vector<CDInventoryComponent> entries;
public:
2023-07-16 07:27:30 +00:00
void LoadTableIntoMemory();
// Queries the table with a custom "where" clause
2022-07-28 13:39:57 +00:00
std::vector<CDInventoryComponent> Query(std::function<bool(CDInventoryComponent)> predicate);
std::vector<CDInventoryComponent> GetEntries(void) const;
};