You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3mp/components/openmw-mp/Base/BaseActor.hpp

103 lines
1.8 KiB
C++

#ifndef OPENMW_BASEACTOR_HPP
#define OPENMW_BASEACTOR_HPP
#include <components/esm/loadcell.hpp>
#include <components/openmw-mp/Base/BaseStructs.hpp>
#include <RakNetTypes.h>
namespace mwmp
{
class BaseActor
{
public:
BaseActor()
{
hasPositionData = false;
hasStatsDynamicData = false;
}
std::string refId;
int refNum;
int mpNum;
ESM::Position position;
ESM::Position direction;
ESM::Cell cell;
unsigned int movementFlags;
char drawState;
bool isFlying;
std::string sound;
SimpleCreatureStats creatureStats;
Animation animation;
Attack attack;
Target killer;
bool isFollowerCellChange;
bool hasAiTarget;
Target aiTarget;
unsigned int aiAction;
unsigned int aiDistance;
unsigned int aiDuration;
bool aiShouldRepeat;
ESM::Position aiCoordinates;
bool hasPositionData;
bool hasStatsDynamicData;
Item equipmentItems[19];
};
class BaseActorList
{
public:
BaseActorList(): count(0), action(0), isValid(false)
{
}
enum ACTOR_ACTION
{
SET = 0,
ADD = 1,
REMOVE = 2,
REQUEST = 3
};
enum AI_ACTION
{
CANCEL = 0,
ACTIVATE = 1,
COMBAT = 2,
ESCORT = 3,
FOLLOW = 4,
TRAVEL = 5,
WANDER = 6
};
RakNet::RakNetGUID guid;
std::vector<BaseActor> baseActors;
unsigned int count;
ESM::Cell cell;
unsigned char action; // 0 - Clear and set in entirety, 1 - Add item, 2 - Remove item, 3 - Request items
bool isValid;
};
}
#endif //OPENMW_BASEACTOR_HPP