mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-06 18:57:45 +00:00
persist emotes now persist through logout/login
This commit is contained in:
parent
fccf3daf95
commit
0b88f63aa9
3 changed files with 8 additions and 8 deletions
|
@ -67,7 +67,7 @@ Core::Entity::Player::Player() :
|
||||||
m_bAutoattack( false ),
|
m_bAutoattack( false ),
|
||||||
m_markedForRemoval( false ),
|
m_markedForRemoval( false ),
|
||||||
m_mount( 0 ),
|
m_mount( 0 ),
|
||||||
m_emote( 0 ),
|
m_emoteMode( 0 ),
|
||||||
m_directorInitialized( false ),
|
m_directorInitialized( false ),
|
||||||
m_onEnterEventDone( false )
|
m_onEnterEventDone( false )
|
||||||
{
|
{
|
||||||
|
@ -1384,12 +1384,12 @@ uint8_t Core::Entity::Player::getCurrentMount() const
|
||||||
|
|
||||||
void Core::Entity::Player::setPersistentEmote( uint32_t emoteId )
|
void Core::Entity::Player::setPersistentEmote( uint32_t emoteId )
|
||||||
{
|
{
|
||||||
m_emote = emoteId;
|
m_emoteMode = emoteId;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t Core::Entity::Player::getPersistentEmote() const
|
uint32_t Core::Entity::Player::getPersistentEmote() const
|
||||||
{
|
{
|
||||||
return m_emote;
|
return m_emoteMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::Entity::Player::autoAttack( CharaPtr pTarget )
|
void Core::Entity::Player::autoAttack( CharaPtr pTarget )
|
||||||
|
|
|
@ -718,7 +718,7 @@ private:
|
||||||
uint32_t m_cfPenaltyUntil; // unix time
|
uint32_t m_cfPenaltyUntil; // unix time
|
||||||
|
|
||||||
uint8_t m_mount;
|
uint8_t m_mount;
|
||||||
uint32_t m_emote;
|
uint32_t m_emoteMode;
|
||||||
|
|
||||||
Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator;
|
Util::SpawnIndexAllocator< uint8_t > m_objSpawnIndexAllocator;
|
||||||
Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator;
|
Util::SpawnIndexAllocator< uint8_t > m_actorSpawnIndexAllocator;
|
||||||
|
|
|
@ -125,9 +125,9 @@ bool Core::Entity::Player::load( uint32_t charId, SessionPtr pSession )
|
||||||
m_birthDay = res->getUInt8( "BirthDay" );
|
m_birthDay = res->getUInt8( "BirthDay" );
|
||||||
m_birthMonth = res->getUInt8( "BirthMonth" );
|
m_birthMonth = res->getUInt8( "BirthMonth" );
|
||||||
m_status = static_cast< ActorStatus >( res->getUInt( "Status" ) );
|
m_status = static_cast< ActorStatus >( res->getUInt( "Status" ) );
|
||||||
|
m_emoteMode = res->getUInt( "EmoteModeType" );
|
||||||
|
|
||||||
if( m_status == Entity::Chara::ActorStatus::EmoteMode )
|
m_activeTitle = res->getUInt16( "ActiveTitle" );
|
||||||
m_status = Entity::Chara::ActorStatus::Idle;
|
|
||||||
|
|
||||||
m_class = static_cast< ClassJob >( res->getUInt( "Class" ) );
|
m_class = static_cast< ClassJob >( res->getUInt( "Class" ) );
|
||||||
m_homePoint = res->getUInt8( "Homepoint" );
|
m_homePoint = res->getUInt8( "Homepoint" );
|
||||||
|
@ -352,7 +352,7 @@ void Core::Entity::Player::updateSql()
|
||||||
memcpy( modelVec.data(), m_modelEquip, sizeof( m_modelEquip ) );
|
memcpy( modelVec.data(), m_modelEquip, sizeof( m_modelEquip ) );
|
||||||
stmt->setBinary( 13, modelVec );
|
stmt->setBinary( 13, modelVec );
|
||||||
|
|
||||||
stmt->setInt( 14, 0 ); // EmodeModeType
|
stmt->setInt( 14, m_emoteMode ); // EmodeModeType
|
||||||
stmt->setInt( 15, 0 ); // Language
|
stmt->setInt( 15, 0 ); // Language
|
||||||
|
|
||||||
stmt->setInt( 16, static_cast< uint32_t >( m_bNewGame ) );
|
stmt->setInt( 16, static_cast< uint32_t >( m_bNewGame ) );
|
||||||
|
@ -379,7 +379,7 @@ void Core::Entity::Player::updateSql()
|
||||||
|
|
||||||
stmt->setBinary( 34, { 0, 0, 0 } ); // FavoritePoint
|
stmt->setBinary( 34, { 0, 0, 0 } ); // FavoritePoint
|
||||||
stmt->setInt( 35, 0 ); // RestPoint
|
stmt->setInt( 35, 0 ); // RestPoint
|
||||||
stmt->setInt( 36, 0 ); // ActiveTitle
|
stmt->setInt( 36, m_activeTitle ); // ActiveTitle
|
||||||
|
|
||||||
std::vector< uint8_t > titleListVec( sizeof ( m_titleList ) );
|
std::vector< uint8_t > titleListVec( sizeof ( m_titleList ) );
|
||||||
stmt->setBinary( 37, titleListVec );
|
stmt->setBinary( 37, titleListVec );
|
||||||
|
|
Loading…
Add table
Reference in a new issue