2021-12-05 17:54:36 +00:00
|
|
|
#pragma once
|
|
|
|
#include "CDTable.h"
|
|
|
|
|
|
|
|
struct CDRailActivatorComponent {
|
|
|
|
int32_t id;
|
|
|
|
std::u16string startAnimation;
|
|
|
|
std::u16string loopAnimation;
|
|
|
|
std::u16string stopAnimation;
|
|
|
|
std::u16string startSound;
|
|
|
|
std::u16string loopSound;
|
|
|
|
std::u16string stopSound;
|
|
|
|
std::pair<uint32_t, std::u16string> startEffectID;
|
|
|
|
std::pair<uint32_t, std::u16string> loopEffectID;
|
|
|
|
std::pair<uint32_t, std::u16string> stopEffectID;
|
|
|
|
std::string preconditions;
|
|
|
|
bool playerCollision;
|
|
|
|
bool cameraLocked;
|
|
|
|
bool damageImmune;
|
|
|
|
bool noAggro;
|
|
|
|
bool showNameBillboard;
|
|
|
|
};
|
|
|
|
|
2023-03-17 14:36:21 +00:00
|
|
|
class CDRailActivatorComponentTable : public CDTable<CDRailActivatorComponentTable> {
|
2021-12-05 17:54:36 +00:00
|
|
|
public:
|
2023-07-25 08:26:52 +00:00
|
|
|
void LoadValuesFromDatabase();
|
2023-03-17 14:36:21 +00:00
|
|
|
static const std::string GetTableName() { return "RailActivatorComponent"; };
|
2021-12-05 17:54:36 +00:00
|
|
|
[[nodiscard]] CDRailActivatorComponent GetEntryByID(int32_t id) const;
|
2023-07-25 08:26:52 +00:00
|
|
|
[[nodiscard]] const std::vector<CDRailActivatorComponent>& GetEntries() const;
|
2021-12-05 17:54:36 +00:00
|
|
|
private:
|
|
|
|
static std::pair<uint32_t, std::u16string> EffectPairFromString(std::string& str);
|
|
|
|
std::vector<CDRailActivatorComponent> m_Entries{};
|
|
|
|
};
|