1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-25 14:07:46 +00:00

Fixed charlist, logging in works again

This commit is contained in:
Mordred 2018-10-27 00:05:10 +02:00
parent 227941b6ca
commit 1df4adebec
2 changed files with 7 additions and 7 deletions

View file

@ -19,8 +19,8 @@ std::string Core::Util::binaryToHexString( uint8_t* pBinData, uint16_t size )
} }
std::string Core::Util::toLowerCopy( const std::string& inStr ) std::string Core::Util::toLowerCopy( const std::string& inStr )
{ {
std::string out; std::string out = inStr;
std::transform( inStr.begin(), inStr.end(), out.begin(), ::tolower ); std::transform( inStr.begin(), inStr.end(), out.begin(), [](unsigned char c) -> unsigned char { return ::tolower(c); });
return out; return out;
} }

View file

@ -228,12 +228,12 @@ CharList Core::Network::RestConnector::getCharList( char* sId )
for( auto& child : json["charArray"] ) for( auto& child : json["charArray"] )
{ {
g_log.debug( child["contentId"] ); g_log.info( child["contentId"] );
//std::string, uint32_t, uint64_t, std::string //std::string, uint32_t, uint64_t, std::string
list.push_back( { child["name"].get< std::string >(), list.push_back( { child["name"],
child["charId"].get< uint32_t >(), std::stoi( std::string( child["charId"] ) ),
child["contentId"].get< uint64_t >(), std::stoll( std::string( child["contentId"] ) ),
child["infoJson"].get< std::string >() child["infoJson"]
} ); } );
} }