From 38d02ceb91ee4813a5a8f95ead0a008b9072cefb Mon Sep 17 00:00:00 2001 From: NotAdam Date: Mon, 22 Jul 2019 00:29:00 +1000 Subject: [PATCH] charinfo json field info --- src/api/PlayerMinimal.cpp | 35 +++++++++++++++++++++++++++-------- src/api/PlayerMinimal.h | 8 -------- 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/api/PlayerMinimal.cpp b/src/api/PlayerMinimal.cpp index c0a6ba34..2bda842b 100644 --- a/src/api/PlayerMinimal.cpp +++ b/src/api/PlayerMinimal.cpp @@ -84,6 +84,7 @@ std::string PlayerMinimal::getInfoJson() auto payload = nlohmann::json(); auto& c = payload["content"]; + // DisplayName c.push_back( getName() ); // class levels @@ -94,26 +95,33 @@ std::string PlayerMinimal::getInfoJson() levelsArray.push_back( std::to_string( m_classMap[ i ] ) ); } + // ClassLv c.push_back( levelsArray ); - // unknowns + // Race c.push_back( "0" ); + // Tribe c.push_back( "0" ); + // Sex c.push_back( "0" ); - // + // BirthMonth c.push_back( std::to_string( getBirthMonth() ) ); + // Birthday c.push_back( std::to_string( getBirthDay() ) ); + // GuardianDeity c.push_back( std::to_string( getGuardianDeity() ) ); + // Class c.push_back( std::to_string( m_class ) ); - // unknown + // ZoneId c.push_back( "0" ); + // TerritoryType c.push_back( std::to_string( getZoneId() ) ); - // unknown + // ContentFinderCondition c.push_back( "0" ); // look map @@ -122,10 +130,12 @@ std::string PlayerMinimal::getInfoJson() { lookArray.push_back( std::to_string( it.second ) ); } + // Customize c.push_back( lookArray ); - // weapons + // ModelMainWeapon c.push_back( std::to_string( m_modelMainWeapon ) ); + // ModelSubWeapon c.push_back( std::to_string( m_modelSubWeapon ) ); // model @@ -134,20 +144,29 @@ std::string PlayerMinimal::getInfoJson() { modelArray.push_back( std::to_string( i ) ); } + // ModelEquip c.push_back( modelArray ); - // unknowns + // MainWeapon c.push_back( "1" ); + // SubWeapon c.push_back( "0" ); - c.push_back( "0" ); + // JobStone c.push_back( "0" ); + // RemakeFlag + c.push_back( "0" ); + + // ConfigFlags c.push_back( std::to_string( m_equipDisplayFlags ) ); - // unknowns + // Voice c.push_back( "0" ); + // WorldName c.push_back( "" ); + // LoginStatus c.push_back( "0" ); + // IsOutTerritory c.push_back( "0" ); diff --git a/src/api/PlayerMinimal.h b/src/api/PlayerMinimal.h index 39121928..d51251c2 100644 --- a/src/api/PlayerMinimal.h +++ b/src/api/PlayerMinimal.h @@ -23,16 +23,8 @@ namespace Sapphire::Api void saveAsNew(); - std::string getLookString(); - std::string getInfoJson(); - std::string getModelString(); - - std::string getClassString(); - - std::string getLevelsString(); - uint8_t getClassLevel(); // return the id of the actor