1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-22 00:53:50 +00:00
openmw-tes3mp/components/openmw-mp/Base/BaseActor.hpp
David Cernat 7ffdb18bf9 [General] Implement ActorDeath packet, part 1
ActorDeath packets are sent for dead actors before their StatsDynamic packets. They contain the actor's deathReason in a manner similar to that of PlayerDeath packets.

A future commit will replace the deathReason with a variable named killer which will be an mwmp::Target.
2018-06-27 21:47:55 +03:00

90 lines
1.5 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 refNumIndex;
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;
std::string deathReason;
bool hasAiTarget;
Target aiTarget;
unsigned int aiAction;
bool hasPositionData;
bool hasStatsDynamicData;
Item equipmentItems[19];
};
class BaseActorList
{
public:
BaseActorList()
{
}
enum ACTOR_ACTION
{
SET = 0,
ADD = 1,
REMOVE = 2,
REQUEST = 3
};
enum AI_ACTION
{
FOLLOW = 0
};
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