class PlayerSAO;
-enum RemotePlayerChatResult {
+enum RemotePlayerChatResult
+{
RPLAYER_CHATRESULT_OK,
RPLAYER_CHATRESULT_FLOODING,
RPLAYER_CHATRESULT_KICK,
};
+
/*
Player on the server
*/
class RemotePlayer : public Player
{
+ friend class PlayerDatabaseFiles;
+
public:
RemotePlayer(const char *name, IItemDefManager *idef);
virtual ~RemotePlayer() {}
- void save(std::string savedir, IGameDef *gamedef);
void deSerialize(std::istream &is, const std::string &playername, PlayerSAO *sao);
PlayerSAO *getPlayerSAO() { return m_sao; }
*ratio = m_day_night_ratio;
}
- void setHotbarImage(const std::string &name)
- {
- hud_hotbar_image = name;
- }
+ void setHotbarImage(const std::string &name) { hud_hotbar_image = name; }
- std::string getHotbarImage() const
- {
- return hud_hotbar_image;
- }
+ std::string getHotbarImage() const { return hud_hotbar_image; }
void setHotbarSelectedImage(const std::string &name)
{
}
void setSky(const video::SColor &bgcolor, const std::string &type,
- const std::vector<std::string> ¶ms)
+ const std::vector<std::string> ¶ms)
{
m_sky_bgcolor = bgcolor;
m_sky_type = type;
}
void getSky(video::SColor *bgcolor, std::string *type,
- std::vector<std::string> *params)
+ std::vector<std::string> *params)
{
*bgcolor = m_sky_bgcolor;
*type = m_sky_type;
void setDirty(bool dirty) { m_dirty = true; }
u16 protocol_version;
+
private:
/*
serialize() writes a bunch of text that can contain
deSerialize stops reading exactly at the right point.
*/
void serialize(std::ostream &os);
+ void serializeExtraAttributes(std::string &output);
PlayerSAO *m_sao;
bool m_dirty;