mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-12 02:18:07 +00:00
format codebase
This commit is contained in:
@@ -10,63 +10,59 @@
|
||||
|
||||
//! RarityTable Entry Struct
|
||||
struct CDRarityTable {
|
||||
unsigned int id;
|
||||
float randmax;
|
||||
unsigned int rarity;
|
||||
unsigned int RarityTableIndex;
|
||||
unsigned int id;
|
||||
float randmax;
|
||||
unsigned int rarity;
|
||||
unsigned int RarityTableIndex;
|
||||
|
||||
friend bool operator> (const CDRarityTable& c1, const CDRarityTable& c2)
|
||||
{
|
||||
return c1.rarity > c2.rarity;
|
||||
}
|
||||
friend bool operator> (const CDRarityTable& c1, const CDRarityTable& c2) {
|
||||
return c1.rarity > c2.rarity;
|
||||
}
|
||||
|
||||
friend bool operator>= (const CDRarityTable& c1, const CDRarityTable& c2)
|
||||
{
|
||||
return c1.rarity >= c2.rarity;
|
||||
}
|
||||
friend bool operator>= (const CDRarityTable& c1, const CDRarityTable& c2) {
|
||||
return c1.rarity >= c2.rarity;
|
||||
}
|
||||
|
||||
friend bool operator< (const CDRarityTable& c1, const CDRarityTable& c2)
|
||||
{
|
||||
return c1.rarity < c2.rarity;
|
||||
}
|
||||
friend bool operator< (const CDRarityTable& c1, const CDRarityTable& c2) {
|
||||
return c1.rarity < c2.rarity;
|
||||
}
|
||||
|
||||
friend bool operator<= (const CDRarityTable& c1, const CDRarityTable& c2)
|
||||
{
|
||||
return c1.rarity <= c2.rarity;
|
||||
}
|
||||
friend bool operator<= (const CDRarityTable& c1, const CDRarityTable& c2) {
|
||||
return c1.rarity <= c2.rarity;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//! RarityTable table
|
||||
class CDRarityTableTable : public CDTable {
|
||||
private:
|
||||
std::vector<CDRarityTable> entries;
|
||||
std::vector<CDRarityTable> entries;
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CDRarityTableTable(void);
|
||||
//! Constructor
|
||||
CDRarityTableTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDRarityTableTable(void);
|
||||
//! Destructor
|
||||
~CDRarityTableTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
//! 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<CDRarityTable> Query(std::function<bool(CDRarityTable)> predicate);
|
||||
//! Queries the table with a custom "where" clause
|
||||
/*!
|
||||
\param predicate The predicate
|
||||
*/
|
||||
std::vector<CDRarityTable> Query(std::function<bool(CDRarityTable)> predicate);
|
||||
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
const std::vector<CDRarityTable>& GetEntries(void) const;
|
||||
//! Gets all the entries in the table
|
||||
/*!
|
||||
\return The entries
|
||||
*/
|
||||
const std::vector<CDRarityTable>& GetEntries(void) const;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user