mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-13 10:58:07 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
52
dDatabase/Tables/CDVendorComponentTable.h
Normal file
52
dDatabase/Tables/CDVendorComponentTable.h
Normal file
@@ -0,0 +1,52 @@
|
||||
#pragma once
|
||||
|
||||
// Custom Classes
|
||||
#include "CDTable.h"
|
||||
|
||||
/*!
|
||||
\file CDVendorComponentTable.hpp
|
||||
\brief Contains data for the VendorComponent table
|
||||
*/
|
||||
|
||||
//! VendorComponent Struct
|
||||
struct CDVendorComponent {
|
||||
unsigned int id; //!< The Component ID
|
||||
float buyScalar; //!< Buy Scalar (what does that mean?)
|
||||
float sellScalar; //!< Sell Scalar (what does that mean?)
|
||||
float refreshTimeSeconds; //!< The refresh time
|
||||
unsigned int LootMatrixIndex; //!< LootMatrixIndex of the vendor's items
|
||||
};
|
||||
|
||||
//! VendorComponent table
|
||||
class CDVendorComponentTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDVendorComponent> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDVendorComponentTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDVendorComponentTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDVendorComponent> Query(std::function<bool(CDVendorComponent)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
std::vector<CDVendorComponent> GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user