mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-23 05:57:20 +00:00
d2aeebcd46
* Move CDClientManager to be a namespace Tested that worlds still load data as expected. Had no use being a singleton anyways. * Move cdclient data storage to tu local containers Allows some data from these containers to be saved on object by reference instead of always needing to copy. iteration 2 - move all unnamed namespace containers to a singular spot - use macro for template specialization and variable declaration - use templates to allow for as little copy paste of types and functions as possible * remember to use typename! compiler believes T::StorageType is accessing a member, not a type. * Update CDClientManager.cpp * move to cpp?
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "CDTable.h"
|
|
|
|
struct CDItemSets {
|
|
uint32_t setID; //!< The item set ID
|
|
uint32_t locStatus; //!< The loc status
|
|
std::string itemIDs; //!< THe item IDs
|
|
uint32_t kitType; //!< The item kit type
|
|
uint32_t kitRank; //!< The item kit rank
|
|
uint32_t kitImage; //!< The item kit image
|
|
uint32_t skillSetWith2; //!< The skill set with 2
|
|
uint32_t skillSetWith3; //!< The skill set with 3
|
|
uint32_t skillSetWith4; //!< The skill set with 4
|
|
uint32_t skillSetWith5; //!< The skill set with 5
|
|
uint32_t skillSetWith6; //!< The skill set with 6
|
|
bool localize; //!< Whether or localize
|
|
std::string gate_version; //!< The gate version
|
|
uint32_t kitID; //!< The kit ID
|
|
float priority; //!< The priority
|
|
};
|
|
|
|
class CDItemSetsTable : public CDTable<CDItemSetsTable, std::vector<CDItemSets>> {
|
|
public:
|
|
void LoadValuesFromDatabase();
|
|
// Queries the table with a custom "where" clause
|
|
std::vector<CDItemSets> Query(std::function<bool(CDItemSets)> predicate);
|
|
};
|
|
|