2017-04-05 09:52:27 +00:00
|
|
|
#ifndef OPENMW_LOCALACTOR_HPP
|
|
|
|
#define OPENMW_LOCALACTOR_HPP
|
|
|
|
|
|
|
|
#include <components/openmw-mp/Base/BaseActor.hpp>
|
2017-04-24 18:06:23 +00:00
|
|
|
#include "../mwmechanics/creaturestats.hpp"
|
2017-04-06 01:00:50 +00:00
|
|
|
#include "../mwworld/manualref.hpp"
|
2021-07-04 10:54:11 +00:00
|
|
|
#include "../mwworld/timestamp.hpp"
|
2017-04-05 09:52:27 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class LocalActor : public BaseActor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
LocalActor();
|
|
|
|
virtual ~LocalActor();
|
|
|
|
|
2017-04-10 14:10:18 +00:00
|
|
|
void update(bool forceUpdate);
|
2017-04-06 01:00:50 +00:00
|
|
|
|
2017-04-23 10:59:15 +00:00
|
|
|
void updateCell();
|
2017-04-10 14:10:18 +00:00
|
|
|
void updatePosition(bool forceUpdate);
|
2017-04-14 13:00:34 +00:00
|
|
|
void updateAnimFlags(bool forceUpdate);
|
2017-04-15 10:42:30 +00:00
|
|
|
void updateAnimPlay();
|
2017-04-16 15:43:13 +00:00
|
|
|
void updateSpeech();
|
2017-04-16 13:42:07 +00:00
|
|
|
void updateStatsDynamic(bool forceUpdate);
|
2019-12-06 09:40:07 +00:00
|
|
|
void updateEquipment(bool forceUpdate, bool sendImmediately = false);
|
2019-08-25 06:35:23 +00:00
|
|
|
void updateAttackOrCast();
|
2017-04-06 12:11:51 +00:00
|
|
|
|
2019-12-06 09:40:07 +00:00
|
|
|
void sendEquipment();
|
2021-07-04 10:54:11 +00:00
|
|
|
void sendSpellsActiveAddition(const std::string id, bool isStackingSpell, ESM::ActiveSpells::ActiveSpellParams params, MWWorld::TimeStamp timestamp);
|
|
|
|
void sendSpellsActiveRemoval(const std::string id, bool isStackingSpell, MWWorld::TimeStamp timestamp);
|
2019-12-05 11:27:55 +00:00
|
|
|
void sendDeath(char newDeathState);
|
|
|
|
|
2017-04-06 01:00:50 +00:00
|
|
|
MWWorld::Ptr getPtr();
|
|
|
|
void setPtr(const MWWorld::Ptr& newPtr);
|
|
|
|
|
2018-12-31 02:36:59 +00:00
|
|
|
bool hasSentData;
|
2018-06-27 18:47:55 +00:00
|
|
|
|
2017-04-06 01:00:50 +00:00
|
|
|
private:
|
|
|
|
MWWorld::Ptr ptr;
|
2017-04-10 14:10:18 +00:00
|
|
|
|
|
|
|
bool posWasChanged;
|
2017-05-26 01:37:49 +00:00
|
|
|
bool equipmentChanged;
|
2017-04-13 12:26:48 +00:00
|
|
|
|
|
|
|
bool wasRunning;
|
|
|
|
bool wasSneaking;
|
|
|
|
bool wasForceJumping;
|
|
|
|
bool wasForceMoveJumping;
|
|
|
|
|
|
|
|
bool wasJumping;
|
|
|
|
bool wasFlying;
|
|
|
|
|
|
|
|
MWMechanics::DrawState_ lastDrawState;
|
2017-04-16 13:42:07 +00:00
|
|
|
|
|
|
|
MWMechanics::DynamicStat<float> oldHealth;
|
|
|
|
MWMechanics::DynamicStat<float> oldMagicka;
|
|
|
|
MWMechanics::DynamicStat<float> oldFatigue;
|
2017-04-05 09:52:27 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_LOCALACTOR_HPP
|