2023-02-14 02:55:44 +00:00
|
|
|
#ifndef __BEHAVIORMESSAGEBASE__H__
|
|
|
|
#define __BEHAVIORMESSAGEBASE__H__
|
|
|
|
|
|
|
|
#include <stdexcept>
|
|
|
|
#include <string>
|
|
|
|
|
2023-05-13 22:22:00 +00:00
|
|
|
#include "Amf3.h"
|
2023-02-14 02:55:44 +00:00
|
|
|
#include "dCommonVars.h"
|
|
|
|
|
|
|
|
#include "Game.h"
|
|
|
|
#include "dLogger.h"
|
|
|
|
|
2023-02-16 17:30:33 +00:00
|
|
|
enum class BehaviorState : uint32_t;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The behaviorID target of this ControlBehaviors message
|
|
|
|
*
|
|
|
|
*/
|
2023-02-14 02:55:44 +00:00
|
|
|
class BehaviorMessageBase {
|
|
|
|
public:
|
2023-02-16 17:30:33 +00:00
|
|
|
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;
|
2023-02-14 02:55:44 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //!__BEHAVIORMESSAGEBASE__H__
|