2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Custom Classes
|
|
|
|
#include "CDTable.h"
|
|
|
|
|
|
|
|
struct CDMovementAIComponent {
|
|
|
|
unsigned int id;
|
|
|
|
std::string MovementType;
|
|
|
|
float WanderChance;
|
|
|
|
float WanderDelayMin;
|
|
|
|
float WanderDelayMax;
|
|
|
|
float WanderSpeed;
|
|
|
|
float WanderRadius;
|
|
|
|
std::string attachedPath;
|
|
|
|
};
|
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
class CDMovementAIComponentTable : public CDTable<CDMovementAIComponentTable> {
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
|
|
|
std::vector<CDMovementAIComponent> entries;
|
|
|
|
|
|
|
|
public:
|
2023-07-25 08:26:52 +00:00
|
|
|
void LoadValuesFromDatabase();
|
2023-03-17 14:36:21 +00:00
|
|
|
// Queries the table with a custom "where" clause
|
2021-12-05 17:54:36 +00:00
|
|
|
std::vector<CDMovementAIComponent> Query(std::function<bool(CDMovementAIComponent)> predicate);
|
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
// Gets all the entries in the table
|
2023-07-25 08:26:52 +00:00
|
|
|
const std::vector<CDMovementAIComponent>& GetEntries() const;
|
2021-12-05 17:54:36 +00:00
|
|
|
};
|