mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-12-07 08:38:25 +00:00
Merge branch 'main' into cdclient-rework
This commit is contained in:
@@ -5,12 +5,6 @@
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
|
||||
/*!
|
||||
\file CDBehaviorTemplateTable.hpp
|
||||
\brief Contains data for the BehaviorTemplate table
|
||||
*/
|
||||
|
||||
//! BehaviorTemplate Entry Struct
|
||||
struct CDBehaviorTemplate {
|
||||
unsigned int behaviorID; //!< The Behavior ID
|
||||
unsigned int templateID; //!< The Template ID (LOT)
|
||||
@@ -19,22 +13,17 @@ struct CDBehaviorTemplate {
|
||||
};
|
||||
|
||||
|
||||
//! BehaviorTemplate table
|
||||
class CDBehaviorTemplateTable : public CDTable {
|
||||
class CDBehaviorTemplateTable : public CDTable<CDBehaviorTemplateTable> {
|
||||
private:
|
||||
std::vector<CDBehaviorTemplate> entries;
|
||||
std::unordered_map<uint32_t, CDBehaviorTemplate> entriesMappedByBehaviorID;
|
||||
std::unordered_set<std::string> m_EffectHandles;
|
||||
public:
|
||||
void LoadHost() override;
|
||||
|
||||
//! Constructor
|
||||
CDBehaviorTemplateTable(void);
|
||||
|
||||
//! Destructor
|
||||
~CDBehaviorTemplateTable(void);
|
||||
|
||||
//! Returns the table's name
|
||||
/*!
|
||||
\return The table name
|
||||
*/
|
||||
std::string GetName(void) const override;
|
||||
|
||||
const CDBehaviorTemplate& GetByBehaviorID(const uint32_t behaviorID) const;
|
||||
CDBehaviorTemplateTable();
|
||||
// Queries the table with a custom "where" clause
|
||||
std::vector<CDBehaviorTemplate> Query(std::function<bool(CDBehaviorTemplate)> predicate);
|
||||
|
||||
std::vector<CDBehaviorTemplate> GetEntries(void) const;
|
||||
|
||||
const CDBehaviorTemplate GetByBehaviorID(uint32_t behaviorID);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user