mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
charinfo json field info
This commit is contained in:
parent
317d16e3ed
commit
38d02ceb91
2 changed files with 27 additions and 16 deletions
|
@ -84,6 +84,7 @@ std::string PlayerMinimal::getInfoJson()
|
||||||
auto payload = nlohmann::json();
|
auto payload = nlohmann::json();
|
||||||
auto& c = payload["content"];
|
auto& c = payload["content"];
|
||||||
|
|
||||||
|
// DisplayName
|
||||||
c.push_back( getName() );
|
c.push_back( getName() );
|
||||||
|
|
||||||
// class levels
|
// class levels
|
||||||
|
@ -94,26 +95,33 @@ std::string PlayerMinimal::getInfoJson()
|
||||||
levelsArray.push_back( std::to_string( m_classMap[ i ] ) );
|
levelsArray.push_back( std::to_string( m_classMap[ i ] ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ClassLv
|
||||||
c.push_back( levelsArray );
|
c.push_back( levelsArray );
|
||||||
|
|
||||||
// unknowns
|
// Race
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
// Tribe
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
// Sex
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
|
||||||
//
|
// BirthMonth
|
||||||
c.push_back( std::to_string( getBirthMonth() ) );
|
c.push_back( std::to_string( getBirthMonth() ) );
|
||||||
|
// Birthday
|
||||||
c.push_back( std::to_string( getBirthDay() ) );
|
c.push_back( std::to_string( getBirthDay() ) );
|
||||||
|
// GuardianDeity
|
||||||
c.push_back( std::to_string( getGuardianDeity() ) );
|
c.push_back( std::to_string( getGuardianDeity() ) );
|
||||||
|
|
||||||
|
// Class
|
||||||
c.push_back( std::to_string( m_class ) );
|
c.push_back( std::to_string( m_class ) );
|
||||||
|
|
||||||
// unknown
|
// ZoneId
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
|
||||||
|
// TerritoryType
|
||||||
c.push_back( std::to_string( getZoneId() ) );
|
c.push_back( std::to_string( getZoneId() ) );
|
||||||
|
|
||||||
// unknown
|
// ContentFinderCondition
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
|
||||||
// look map
|
// look map
|
||||||
|
@ -122,10 +130,12 @@ std::string PlayerMinimal::getInfoJson()
|
||||||
{
|
{
|
||||||
lookArray.push_back( std::to_string( it.second ) );
|
lookArray.push_back( std::to_string( it.second ) );
|
||||||
}
|
}
|
||||||
|
// Customize
|
||||||
c.push_back( lookArray );
|
c.push_back( lookArray );
|
||||||
|
|
||||||
// weapons
|
// ModelMainWeapon
|
||||||
c.push_back( std::to_string( m_modelMainWeapon ) );
|
c.push_back( std::to_string( m_modelMainWeapon ) );
|
||||||
|
// ModelSubWeapon
|
||||||
c.push_back( std::to_string( m_modelSubWeapon ) );
|
c.push_back( std::to_string( m_modelSubWeapon ) );
|
||||||
|
|
||||||
// model
|
// model
|
||||||
|
@ -134,20 +144,29 @@ std::string PlayerMinimal::getInfoJson()
|
||||||
{
|
{
|
||||||
modelArray.push_back( std::to_string( i ) );
|
modelArray.push_back( std::to_string( i ) );
|
||||||
}
|
}
|
||||||
|
// ModelEquip
|
||||||
c.push_back( modelArray );
|
c.push_back( modelArray );
|
||||||
|
|
||||||
// unknowns
|
// MainWeapon
|
||||||
c.push_back( "1" );
|
c.push_back( "1" );
|
||||||
|
// SubWeapon
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
c.push_back( "0" );
|
// JobStone
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
|
||||||
|
// RemakeFlag
|
||||||
|
c.push_back( "0" );
|
||||||
|
|
||||||
|
// ConfigFlags
|
||||||
c.push_back( std::to_string( m_equipDisplayFlags ) );
|
c.push_back( std::to_string( m_equipDisplayFlags ) );
|
||||||
|
|
||||||
// unknowns
|
// Voice
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
// WorldName
|
||||||
c.push_back( "" );
|
c.push_back( "" );
|
||||||
|
// LoginStatus
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
// IsOutTerritory
|
||||||
c.push_back( "0" );
|
c.push_back( "0" );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,16 +23,8 @@ namespace Sapphire::Api
|
||||||
|
|
||||||
void saveAsNew();
|
void saveAsNew();
|
||||||
|
|
||||||
std::string getLookString();
|
|
||||||
|
|
||||||
std::string getInfoJson();
|
std::string getInfoJson();
|
||||||
|
|
||||||
std::string getModelString();
|
|
||||||
|
|
||||||
std::string getClassString();
|
|
||||||
|
|
||||||
std::string getLevelsString();
|
|
||||||
|
|
||||||
uint8_t getClassLevel();
|
uint8_t getClassLevel();
|
||||||
|
|
||||||
// return the id of the actor
|
// return the id of the actor
|
||||||
|
|
Loading…
Add table
Reference in a new issue