mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 22:49:55 +00:00
74 lines
2 KiB
C++
74 lines
2 KiB
C++
//
|
|
// 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>
|
|
|
|
namespace mwmp
|
|
{
|
|
class Networking;
|
|
class LocalPlayer : public BasePlayer
|
|
{
|
|
public:
|
|
|
|
LocalPlayer();
|
|
virtual ~LocalPlayer();
|
|
|
|
void update();
|
|
|
|
void charGen(int stageFirst, int stageEnd);
|
|
bool charGenThread(); // return true if CGStage::current == CGStage::end
|
|
|
|
void updateDynamicStats(bool forceUpdate = false);
|
|
void updateAttributes(bool forceUpdate = false);
|
|
void updateSkills(bool forceUpdate = false);
|
|
void updateLevel(bool forceUpdate = false);
|
|
void updatePosition(bool forceUpdate = false);
|
|
void updateCell(bool forceUpdate = false);
|
|
void updateChar();
|
|
void updateEquipment(bool forceUpdate = false);
|
|
void updateInventory(bool forceUpdate = false);
|
|
void updateAttackState(bool forceUpdate = false);
|
|
void updateDeadState(bool forceUpdate = false);
|
|
void updateDrawStateAndFlags(bool forceUpdate = false);
|
|
|
|
void addItems();
|
|
void addSpells();
|
|
|
|
void removeItems();
|
|
void removeSpells();
|
|
|
|
void setDynamicStats();
|
|
void setAttributes();
|
|
void setSkills();
|
|
void setLevel();
|
|
void setPosition();
|
|
void setCell();
|
|
void setClass();
|
|
void setEquipment();
|
|
void setInventory();
|
|
void setSpellbook();
|
|
|
|
void sendClass();
|
|
void sendInventory();
|
|
void sendSpellbook();
|
|
void sendSpellAddition(std::string id);
|
|
void sendSpellAddition(const ESM::Spell &spell);
|
|
void sendSpellRemoval(std::string id);
|
|
void sendSpellRemoval(const ESM::Spell &spell);
|
|
void sendAttack(Attack::TYPE type);
|
|
|
|
void prepareAttack(Attack::TYPE type, bool state);
|
|
|
|
private:
|
|
Networking *getNetworking();
|
|
MWWorld::Ptr getPlayerPtr();
|
|
|
|
};
|
|
}
|
|
|
|
#endif //OPENMW_LOCALPLAYER_HPP
|