mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-14 04:08:20 +00:00
e524b86e12
* breakout the component types into a scoped enum tested that things are the same as they were before * fix missed rename * fix brick-by-brick name to be crafting because that's what it is
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
#ifndef __TRIGGERCOMPONENT__H__
|
|
#define __TRIGGERCOMPONENT__H__
|
|
|
|
#include "Component.h"
|
|
#include "eReplicaComponentType.h"
|
|
|
|
namespace LUTriggers {
|
|
struct Trigger;
|
|
struct Command;
|
|
};
|
|
|
|
class TriggerComponent : public Component {
|
|
public:
|
|
static const eReplicaComponentType ComponentType = eReplicaComponentType::TRIGGER;
|
|
|
|
explicit TriggerComponent(Entity* parent, const std::string triggerInfo);
|
|
|
|
void TriggerEvent(eTriggerEventType event, Entity* optionalTarget = nullptr);
|
|
LUTriggers::Trigger* GetTrigger() const { return m_Trigger; }
|
|
|
|
private:
|
|
|
|
void HandleTriggerCommand(LUTriggers::Command* command, Entity* optionalTarget);
|
|
std::vector<std::string> ParseArgs(std::string args);
|
|
std::vector<Entity*> GatherTargets(LUTriggers::Command* command, Entity* optionalTarget);
|
|
|
|
// Trigger Event Handlers
|
|
void HandleSetPhysicsVolume(Entity* targetEntity, std::vector<std::string> argArray, std::string target);
|
|
void HandleUpdateMission(Entity* targetEntity, std::vector<std::string> argArray);
|
|
void HandleFireEvent(Entity* targetEntity, std::string args);
|
|
void HandleCastSkill(Entity* targetEntity, uint32_t skillID);
|
|
|
|
LUTriggers::Trigger* m_Trigger;
|
|
};
|
|
#endif //!__TRIGGERCOMPONENT__H__
|