mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-23 22:13:35 +00:00
7671cc6865
* CDClient cleanup and optimization - Use static function to get table name - Remove unused GetName function - Replace above function with a static GetTableName function - Remove verbose comments - Remove verbose initializers - Remove need to specify table name when getting a table by name - Remove unused typedef for mac and linux * Re-add unused table Convert tables to singletons - Convert all CDClient tables to singletons - Move Singleton.h to dCommon - Reduce header clutter in CDClientManager
34 lines
1.5 KiB
C++
34 lines
1.5 KiB
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "CDTable.h"
|
|
|
|
struct CDDestructibleComponent {
|
|
unsigned int id; //!< The component ID from the ComponentsRegistry Table
|
|
int faction; //!< The Faction ID of the object
|
|
std::string factionList; //!< A list of the faction IDs
|
|
int life; //!< The amount of life of the object
|
|
unsigned int imagination; //!< The amount of imagination of the object
|
|
int LootMatrixIndex; //!< The Loot Matrix Index
|
|
int CurrencyIndex; //!< The Currency Index
|
|
unsigned int level; //!< ???
|
|
float armor; //!< The amount of armor of the object
|
|
unsigned int death_behavior; //!< The behavior ID of the death behavior
|
|
bool isnpc; //!< Whether or not the object is an NPC
|
|
unsigned int attack_priority; //!< ???
|
|
bool isSmashable; //!< Whether or not the object is smashable
|
|
int difficultyLevel; //!< ???
|
|
};
|
|
|
|
class CDDestructibleComponentTable : public CDTable<CDDestructibleComponentTable> {
|
|
private:
|
|
std::vector<CDDestructibleComponent> entries;
|
|
|
|
public:
|
|
CDDestructibleComponentTable();
|
|
// Queries the table with a custom "where" clause
|
|
std::vector<CDDestructibleComponent> Query(std::function<bool(CDDestructibleComponent)> predicate);
|
|
|
|
std::vector<CDDestructibleComponent> GetEntries(void) const;
|
|
};
|