2016-01-12 03:41:44 +00:00
|
|
|
//
|
|
|
|
// Created by koncord on 14.01.16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef OPENMW_LOCALPLAYER_HPP
|
|
|
|
#define OPENMW_LOCALPLAYER_HPP
|
|
|
|
|
|
|
|
#include <components/openmw-mp/Base/BasePlayer.hpp>
|
|
|
|
#include <RakNetTypes.h>
|
2016-11-17 15:16:25 +00:00
|
|
|
#include "Networking.hpp"
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
namespace mwmp
|
|
|
|
{
|
|
|
|
class LocalPlayer : public BasePlayer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
LocalPlayer();
|
|
|
|
virtual ~LocalPlayer();
|
|
|
|
|
2016-11-15 19:54:06 +00:00
|
|
|
void update();
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-09-30 05:59:58 +00:00
|
|
|
void charGen(int stageFirst, int stageEnd);
|
|
|
|
bool charGenThread(); // return true if CGStage::current == CGStage::end
|
|
|
|
|
2016-09-28 04:50:16 +00:00
|
|
|
void updateDynamicStats(bool forceUpdate = false);
|
2016-09-30 01:52:21 +00:00
|
|
|
void updateAttributes(bool forceUpdate = false);
|
|
|
|
void updateSkills(bool forceUpdate = false);
|
|
|
|
void updateLevel(bool forceUpdate = false);
|
2016-09-30 05:59:58 +00:00
|
|
|
void updatePosition(bool forceUpdate = false);
|
2016-01-12 03:41:44 +00:00
|
|
|
void updateCell(bool forceUpdate = false);
|
2016-09-30 05:59:58 +00:00
|
|
|
void updateChar();
|
2016-11-17 20:33:30 +00:00
|
|
|
void updateEquipment(bool forceUpdate = false);
|
2016-09-30 05:59:58 +00:00
|
|
|
void updateInventory(bool forceUpdate = false);
|
|
|
|
void updateAttackState(bool forceUpdate = false);
|
|
|
|
void updateDeadState(bool forceUpdate = false);
|
2016-01-12 03:41:44 +00:00
|
|
|
void updateDrawStateAndFlags(bool forceUpdate = false);
|
|
|
|
|
2016-09-29 07:19:39 +00:00
|
|
|
void setDynamicStats();
|
2016-09-29 10:10:32 +00:00
|
|
|
void setAttributes();
|
|
|
|
void setSkills();
|
|
|
|
void setLevel();
|
2016-09-30 05:59:58 +00:00
|
|
|
void setPosition();
|
|
|
|
void setCell();
|
|
|
|
void setClass();
|
2016-11-17 20:33:30 +00:00
|
|
|
void setEquipment();
|
2016-07-17 09:53:55 +00:00
|
|
|
|
2016-09-30 05:59:58 +00:00
|
|
|
void sendClass();
|
2016-11-16 19:34:46 +00:00
|
|
|
void sendInventory();
|
2016-11-21 04:07:29 +00:00
|
|
|
void sendSpellAddition(std::string id);
|
|
|
|
void sendSpellRemoval(std::string id);
|
2016-11-12 11:39:04 +00:00
|
|
|
void sendAttack(Attack::TYPE type);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-11-12 11:39:04 +00:00
|
|
|
void prepareAttack(Attack::TYPE type, bool state);
|
2016-01-12 03:41:44 +00:00
|
|
|
|
2016-09-30 05:59:58 +00:00
|
|
|
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
private:
|
2016-11-15 19:54:06 +00:00
|
|
|
Networking *getNetworking();
|
|
|
|
MWWorld::Ptr getPlayerPtr();
|
2016-01-12 03:41:44 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //OPENMW_LOCALPLAYER_HPP
|