mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
Fixed ContentID
Fixed the ContentID problem, This is a fix until the new db stuff
This commit is contained in:
parent
8a63ea44bd
commit
4989f37eca
4 changed files with 23 additions and 4 deletions
|
@ -34,6 +34,25 @@ namespace Db {
|
||||||
return static_cast< T >( atol( m_pValue ) );
|
return static_cast< T >( atol( m_pValue ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint64_t getUInt64()
|
||||||
|
{
|
||||||
|
if( m_pValue )
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
uint64_t value;
|
||||||
|
sscanf( m_pValue, "%I64d", &value );
|
||||||
|
return value;
|
||||||
|
#else
|
||||||
|
uint64_t value;
|
||||||
|
sscanf( m_pValue, "%Lu", &value );
|
||||||
|
return value;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t getLength() const;
|
uint32_t getLength() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -70,7 +70,7 @@ namespace Core {
|
||||||
setBirthDay( field[2].get< int8_t >(), field[3].get< int8_t >() );
|
setBirthDay( field[2].get< int8_t >(), field[3].get< int8_t >() );
|
||||||
m_guardianDeity = field[4].get< int8_t >();
|
m_guardianDeity = field[4].get< int8_t >();
|
||||||
m_class = field[5].get< int8_t >();
|
m_class = field[5].get< int8_t >();
|
||||||
m_contentId = field[7].get< uint64_t >();
|
m_contentId = field[7].getUInt64();
|
||||||
m_zoneId = field[8].get< uint16_t >();
|
m_zoneId = field[8].get< uint16_t >();
|
||||||
|
|
||||||
auto pQR2 = g_database.query( "SELECT * FROM characlass WHERE CharacterId = " + std::to_string( charId ) + ";" );
|
auto pQR2 = g_database.query( "SELECT * FROM characlass WHERE CharacterId = " + std::to_string( charId ) + ";" );
|
||||||
|
|
|
@ -277,7 +277,7 @@ uint64_t Core::Network::SapphireAPI::getNextContentId()
|
||||||
return 0x0040000001000001;
|
return 0x0040000001000001;
|
||||||
}
|
}
|
||||||
|
|
||||||
contentId = pQR->fetch()[0].get< uint64_t >() + 1;
|
contentId = pQR->fetch()[0].getUInt64() + 1;
|
||||||
if( contentId < 0x0040000001000001 )
|
if( contentId < 0x0040000001000001 )
|
||||||
{
|
{
|
||||||
return 0x0040000001000001;
|
return 0x0040000001000001;
|
||||||
|
|
|
@ -131,7 +131,7 @@ bool Core::Entity::Player::load( uint32_t charId, Core::SessionPtr pSession )
|
||||||
|
|
||||||
field[11].getBinary( reinterpret_cast< char* >( m_customize ), sizeof( m_customize ) );
|
field[11].getBinary( reinterpret_cast< char* >( m_customize ), sizeof( m_customize ) );
|
||||||
|
|
||||||
m_modelMainWeapon = field[12].get< uint64_t >();
|
m_modelMainWeapon = field[12].getUInt64();
|
||||||
|
|
||||||
field[14].getBinary( reinterpret_cast< char* >( m_modelEquip ), sizeof( m_modelEquip ) );
|
field[14].getBinary( reinterpret_cast< char* >( m_modelEquip ), sizeof( m_modelEquip ) );
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ bool Core::Entity::Player::load( uint32_t charId, Core::SessionPtr pSession )
|
||||||
|
|
||||||
field[21].getBinary( reinterpret_cast< char* >( m_howTo ), sizeof( m_howTo ) );
|
field[21].getBinary( reinterpret_cast< char* >( m_howTo ), sizeof( m_howTo ) );
|
||||||
|
|
||||||
m_contentId = field[22].get< uint64_t >();
|
m_contentId = field[22].getUInt64();
|
||||||
|
|
||||||
m_voice = field[23].get< uint32_t >();
|
m_voice = field[23].get< uint32_t >();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue