diff options
Diffstat (limited to 'src/remoteplayer.cpp')
-rw-r--r-- | src/remoteplayer.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/remoteplayer.cpp b/src/remoteplayer.cpp index f8f31d928..d070eb7e4 100644 --- a/src/remoteplayer.cpp +++ b/src/remoteplayer.cpp @@ -72,14 +72,15 @@ void RemotePlayer::serializeExtraAttributes(std::string &output) { assert(m_sao); Json::Value json_root; - const PlayerAttributes &attrs = m_sao->getExtendedAttributes(); + + const StringMap &attrs = m_sao->getMeta().getStrings(); for (const auto &attr : attrs) { json_root[attr.first] = attr.second; } output = fastWriteJson(json_root); - m_sao->setExtendedAttributeModified(false); + m_sao->getMeta().setModified(false); } @@ -132,8 +133,9 @@ void RemotePlayer::deSerialize(std::istream &is, const std::string &playername, const Json::Value::Members attr_list = attr_root.getMemberNames(); for (const auto &it : attr_list) { Json::Value attr_value = attr_root[it]; - sao->setExtendedAttribute(it, attr_value.asString()); + sao->getMeta().setString(it, attr_value.asString()); } + sao->getMeta().setModified(false); } catch (SettingNotFoundException &e) {} } |