2017-04-05 09:52:27 +00:00
|
|
|
#ifndef OPENMW_BASEACTOR_HPP
|
|
|
|
#define OPENMW_BASEACTOR_HPP
|
|
|
|
|
|
|
|
#include <components/esm/loadcell.hpp>
|
2017-04-16 13:42:07 +00:00
|
|
|
|
2017-04-08 05:59:21 +00:00
|
|
|
#include <components/openmw-mp/Base/BaseStructs.hpp>
|
2017-04-16 13:42:07 +00:00
|
|
|
|
2017-04-09 07:50:35 +00:00
|
|
|
#include <RakNetTypes.h>
|
2017-04-05 09:52:27 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class BaseActor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
BaseActor()
|
|
|
|
{
|
2017-05-01 17:18:22 +00:00
|
|
|
hasPositionData = false;
|
|
|
|
hasStatsDynamicData = false;
|
2017-04-05 09:52:27 +00:00
|
|
|
}
|
|
|
|
|
2017-04-09 13:32:44 +00:00
|
|
|
std::string refId;
|
2018-07-13 01:12:03 +00:00
|
|
|
int refNum;
|
2017-04-09 13:32:44 +00:00
|
|
|
int mpNum;
|
|
|
|
|
2017-04-10 04:22:03 +00:00
|
|
|
ESM::Position position;
|
2017-04-10 13:32:10 +00:00
|
|
|
ESM::Position direction;
|
2017-04-16 13:42:07 +00:00
|
|
|
|
2017-04-10 04:22:03 +00:00
|
|
|
ESM::Cell cell;
|
2017-04-09 13:32:44 +00:00
|
|
|
|
2017-04-13 12:26:48 +00:00
|
|
|
unsigned int movementFlags;
|
2017-04-05 09:52:27 +00:00
|
|
|
char drawState;
|
|
|
|
bool isFlying;
|
|
|
|
|
2017-04-16 15:43:13 +00:00
|
|
|
std::string sound;
|
|
|
|
|
2017-04-30 15:44:59 +00:00
|
|
|
SimpleCreatureStats creatureStats;
|
|
|
|
|
2017-04-08 05:59:21 +00:00
|
|
|
Animation animation;
|
2017-04-18 07:03:58 +00:00
|
|
|
Attack attack;
|
2017-05-01 16:44:23 +00:00
|
|
|
|
2018-07-05 19:24:51 +00:00
|
|
|
Target killer;
|
2018-06-27 18:47:55 +00:00
|
|
|
|
2018-05-12 03:29:11 +00:00
|
|
|
bool hasAiTarget;
|
|
|
|
Target aiTarget;
|
|
|
|
unsigned int aiAction;
|
2018-07-10 02:07:58 +00:00
|
|
|
unsigned int aiDistance;
|
|
|
|
unsigned int aiDuration;
|
2018-07-10 20:18:32 +00:00
|
|
|
bool aiShouldRepeat;
|
2018-07-10 02:07:58 +00:00
|
|
|
ESM::Position aiCoordinates;
|
2018-05-12 03:29:11 +00:00
|
|
|
|
2017-05-01 16:44:23 +00:00
|
|
|
bool hasPositionData;
|
|
|
|
bool hasStatsDynamicData;
|
2017-05-26 01:37:49 +00:00
|
|
|
|
2018-04-20 19:46:16 +00:00
|
|
|
Item equipmentItems[19];
|
2017-04-05 09:52:27 +00:00
|
|
|
};
|
2017-04-09 07:50:35 +00:00
|
|
|
|
2017-04-09 13:32:44 +00:00
|
|
|
class BaseActorList
|
2017-04-09 07:50:35 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2017-04-09 13:32:44 +00:00
|
|
|
BaseActorList()
|
2017-04-09 07:50:35 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-04-09 13:32:44 +00:00
|
|
|
enum ACTOR_ACTION
|
|
|
|
{
|
|
|
|
SET = 0,
|
|
|
|
ADD = 1,
|
|
|
|
REMOVE = 2,
|
|
|
|
REQUEST = 3
|
|
|
|
};
|
|
|
|
|
2018-05-12 03:29:11 +00:00
|
|
|
enum AI_ACTION
|
|
|
|
{
|
2018-07-10 02:07:58 +00:00
|
|
|
CANCEL = 0,
|
2018-07-10 04:07:37 +00:00
|
|
|
ACTIVATE = 1,
|
|
|
|
COMBAT = 2,
|
|
|
|
ESCORT = 3,
|
|
|
|
FOLLOW = 4,
|
|
|
|
TRAVEL = 5,
|
|
|
|
WANDER = 6
|
2018-05-12 03:29:11 +00:00
|
|
|
};
|
|
|
|
|
2017-04-09 07:50:35 +00:00
|
|
|
RakNet::RakNetGUID guid;
|
|
|
|
|
|
|
|
std::vector<BaseActor> baseActors;
|
2017-04-16 13:42:07 +00:00
|
|
|
|
2017-04-09 07:50:35 +00:00
|
|
|
unsigned int count;
|
|
|
|
|
|
|
|
ESM::Cell cell;
|
2017-04-09 13:32:44 +00:00
|
|
|
|
|
|
|
unsigned char action; // 0 - Clear and set in entirety, 1 - Add item, 2 - Remove item, 3 - Request items
|
2017-05-16 11:20:40 +00:00
|
|
|
|
|
|
|
bool isValid;
|
2017-04-09 07:50:35 +00:00
|
|
|
};
|
2017-04-05 09:52:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_BASEACTOR_HPP
|