mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-15 04:38:21 +00:00
dc526aeec1
Fix up other large tables to have proper backup lookups Revert "idk im just dumb ig" This reverts commit 5d5be5df53b8959b42b291613d7db749a65a3585. idk im just dumb ig
25 lines
791 B
C++
25 lines
791 B
C++
#pragma once
|
|
|
|
// Custom Classes
|
|
#include "CDTable.h"
|
|
#include <unordered_map>
|
|
#include <unordered_set>
|
|
|
|
struct CDBehaviorParameter {
|
|
unsigned int behaviorID; //!< The Behavior ID
|
|
std::unordered_map<std::string, uint32_t>::iterator parameterID; //!< The Parameter ID
|
|
float value; //!< The value of the behavior template
|
|
};
|
|
|
|
class CDBehaviorParameterTable : public CDTable<CDBehaviorParameterTable> {
|
|
private:
|
|
std::unordered_map<uint64_t, CDBehaviorParameter> m_Entries;
|
|
std::unordered_map<std::string, uint32_t> m_ParametersList;
|
|
public:
|
|
void LoadValuesFromDatabase();
|
|
|
|
float GetValue(const uint32_t behaviorID, const std::string& name, const float defaultValue = 0);
|
|
|
|
std::map<std::string, float> GetParametersByBehaviorID(uint32_t behaviorID);
|
|
};
|