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/apps/openmw-mp/NetActor.hpp

84 lines
1.6 KiB
C++

//
// Created by koncord on 25.08.17.
//
#pragma once
#include <RakNetTypes.h>
#include <tuple>
#include "Inventory.hpp"
#include "Cells.hpp"
namespace mwmp
{
class BasePlayer;
class BaseNetCreature;
class BaseActor;
}
class NetActor
{
public:
NetActor();
virtual ~NetActor() = default;
void resetUpdateFlags();
/**
*
* @return x, y, z
*/
std::tuple<float, float, float> getPosition() const;
void setPosition(float x, float y, float z);
/**
*
* @return x, y
*/
std::tuple<float, float> getRotation() const;
void setRotation(float x, float z);
void setMomentum(float x, float y, float z);
/**
*
* @return base, current
*/
std::tuple<float, float> getHealth() const;
void setHealth(float base, float current);
/**
*
* @return base, current
*/
std::tuple<float, float> getMagicka() const;
void setMagicka(float base, float current);
/**
*
* @return base, current
*/
std::tuple<float, float> getFatigue() const;
void setFatigue(float base, float current);
Inventory &getInventory();
Cells &getCell();
mwmp::BaseNetCreature *getNetCreature() { return netCreature; }
bool isPlayer() const { return isActorPlayer; }
Player *toPlayer();
protected:
bool baseInfoChanged, shapeshiftChanged, levelChanged, statsChanged, positionChanged, momentumChanged, attributesChanged, skillsChanged, aiChanged;
mwmp::BasePlayer *basePlayer;
mwmp::BaseNetCreature *netCreature;
Inventory inventory;
Cells cellAPI;
bool isActorPlayer;
};