2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Custom Classes
|
|
|
|
#include "CDTable.h"
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\file CDScriptComponentTable.hpp
|
|
|
|
\brief Contains data for the ScriptComponent table
|
|
|
|
*/
|
|
|
|
|
2022-07-28 13:39:57 +00:00
|
|
|
//! ScriptComponent Struct
|
2021-12-05 17:54:36 +00:00
|
|
|
struct CDScriptComponent {
|
2022-07-28 13:39:57 +00:00
|
|
|
unsigned int id; //!< The component ID
|
|
|
|
std::string script_name; //!< The script name
|
|
|
|
std::string client_script_name; //!< The client script name
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
//! ObjectSkills table
|
|
|
|
class CDScriptComponentTable : public CDTable {
|
|
|
|
private:
|
2022-07-28 13:39:57 +00:00
|
|
|
std::map<unsigned int, CDScriptComponent> entries;
|
2021-12-05 17:54:36 +00:00
|
|
|
CDScriptComponent m_ToReturnWhenNoneFound;
|
2022-07-28 13:39:57 +00:00
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
public:
|
|
|
|
//! Gets an entry by ID
|
|
|
|
const CDScriptComponent& GetByID(unsigned int id);
|
2022-07-28 13:39:57 +00:00
|
|
|
|
|
|
|
//! Constructor
|
|
|
|
CDScriptComponentTable(void);
|
|
|
|
|
|
|
|
//! Destructor
|
|
|
|
~CDScriptComponentTable(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
|
|
|
|
*/
|
|
|
|
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|
|
|
|
|