DarkflameServer/dDatabase/CDClientDatabase/CDClientTables/CDCurrencyTableTable.h

32 lines
887 B
C
Raw Permalink Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
/*!
\file CDCurrencyTableTable.hpp
\brief Contains data for the CurrencyTable table
*/
2022-07-28 13:39:57 +00:00
//! CurrencyTable Struct
struct CDCurrencyTable {
uint32_t currencyIndex; //!< The Currency Index
uint32_t npcminlevel; //!< The minimum level of the npc
uint32_t minvalue; //!< The minimum currency
uint32_t maxvalue; //!< The maximum currency
uint32_t id; //!< The ID of the currency index
};
//! CurrencyTable table
class CDCurrencyTableTable : public CDTable<CDCurrencyTableTable> {
private:
2022-07-28 13:39:57 +00:00
std::vector<CDCurrencyTable> entries;
public:
void LoadValuesFromDatabase();
// Queries the table with a custom "where" clause
2022-07-28 13:39:57 +00:00
std::vector<CDCurrencyTable> Query(std::function<bool(CDCurrencyTable)> predicate);
const std::vector<CDCurrencyTable>& GetEntries() const;
};