DarkflameServer/dGame/dPropertyBehaviors/ControlBehaviorMessages/BehaviorMessageBase.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
699 B
C
Raw Permalink Normal View History

#ifndef __BEHAVIORMESSAGEBASE__H__
#define __BEHAVIORMESSAGEBASE__H__
#include <stdexcept>
#include <string>
#include "Amf3.h"
#include "dCommonVars.h"
#include "Game.h"
#include "Logger.h"
enum class BehaviorState : uint32_t;
/**
* @brief The behaviorID target of this ControlBehaviors message
*
*/
class BehaviorMessageBase {
public:
const uint32_t GetBehaviorId() { return behaviorId; };
protected:
BehaviorMessageBase(AMFArrayValue* arguments);
int32_t GetBehaviorIdFromArgument(AMFArrayValue* arguments);
uint32_t GetActionIndexFromArgument(AMFArrayValue* arguments, const std::string& keyName = "actionIndex");
int32_t behaviorId = -1;
};
#endif //!__BEHAVIORMESSAGEBASE__H__