DarkflameServer/dDatabase/Tables/CDLootTableTable.h

26 lines
738 B
C
Raw Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
struct CDLootTable {
2022-07-28 13:39:57 +00:00
unsigned int itemid; //!< The LOT of the item
unsigned int LootTableIndex; //!< The Loot Table Index
unsigned int id; //!< The ID
bool MissionDrop; //!< Whether or not this loot table is a mission drop
unsigned int sortPriority; //!< The sorting priority
};
class CDLootTableTable : public CDTable<CDLootTableTable> {
private:
2022-07-28 13:39:57 +00:00
std::vector<CDLootTable> entries;
public:
void LoadValuesFromDatabase();
// Queries the table with a custom "where" clause
2022-07-28 13:39:57 +00:00
std::vector<CDLootTable> Query(std::function<bool(CDLootTable)> predicate);
const std::vector<CDLootTable>& GetEntries() const;
};