mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Merge pull request #175 from GokuWeedLord/feature/mounts
fix mounting & mount persistance
This commit is contained in:
commit
7aee3d416b
4 changed files with 14 additions and 13 deletions
|
@ -72,7 +72,8 @@ Core::Entity::Player::Player() :
|
|||
m_bMarkedForZoning( false ),
|
||||
m_zoningType( Common::ZoneingType::None ),
|
||||
m_bAutoattack( false ),
|
||||
m_markedForRemoval( false )
|
||||
m_markedForRemoval( false ),
|
||||
m_mount( 0 )
|
||||
{
|
||||
m_id = 0;
|
||||
m_type = ActorType::Player;
|
||||
|
@ -1448,29 +1449,25 @@ uint8_t Core::Entity::Player::getEquipDisplayFlags() const
|
|||
|
||||
void Core::Entity::Player::mount( uint32_t id )
|
||||
{
|
||||
// TODO: Fix me for SQL rewrite
|
||||
/* m_mount = id;
|
||||
m_mount = id;
|
||||
sendToInRangeSet( ActorControlPacket142( getId(), ActorControlType::SetStatus, static_cast< uint8_t >( Entity::Actor::ActorStatus::Mounted )), true );
|
||||
sendToInRangeSet( ActorControlPacket143( getId(), 0x39e, 12 ), true ); //?
|
||||
|
||||
GamePacketNew< FFXIVIpcMount, ServerZoneIpcType > mountPacket( getId() );
|
||||
mountPacket.data().id = m_mount;
|
||||
sendToInRangeSet( mountPacket, true );*/
|
||||
mountPacket.data().id = id;
|
||||
sendToInRangeSet( mountPacket, true );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::dismount()
|
||||
{
|
||||
// TODO: Fix me for SQL rewrite
|
||||
/* sendToInRangeSet( ActorControlPacket142( getId(), ActorControlType::SetStatus, static_cast< uint8_t >( Entity::Actor::ActorStatus::Idle )), true );
|
||||
sendToInRangeSet( ActorControlPacket142( getId(), ActorControlType::SetStatus, static_cast< uint8_t >( Entity::Actor::ActorStatus::Idle )), true );
|
||||
sendToInRangeSet( ActorControlPacket143( getId(), ActorControlType::Dismount, 1 ), true );
|
||||
m_mount = 0;*/
|
||||
m_mount = 0;
|
||||
}
|
||||
|
||||
uint8_t Core::Entity::Player::getCurrentMount() const
|
||||
{
|
||||
// TODO: Fix me for SQL rewrite
|
||||
// return m_mount;
|
||||
return 0;
|
||||
return m_mount;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::autoAttack( ActorPtr pTarget )
|
||||
|
|
|
@ -629,6 +629,8 @@ private:
|
|||
|
||||
// content finder info
|
||||
uint32_t m_cfPenaltyUntil; // unix time
|
||||
|
||||
uint8_t m_mount;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -166,6 +166,8 @@ bool Core::Entity::Player::load( uint32_t charId, Core::SessionPtr pSession )
|
|||
m_maxHp = getMaxHp();
|
||||
m_maxMp = getMaxMp();
|
||||
|
||||
m_mount = res->getUInt8( "Mount" );
|
||||
|
||||
m_modelSubWeapon = 0;
|
||||
m_lastTickTime = 0;
|
||||
|
||||
|
@ -305,7 +307,7 @@ void Core::Entity::Player::updateSql()
|
|||
stmt->setInt( 3, 0 ); // TP
|
||||
stmt->setInt( 4, 0 ); // GP
|
||||
stmt->setInt( 5, 0 ); // Mode
|
||||
stmt->setInt( 6, 0 ); // Mount
|
||||
stmt->setInt( 6, m_mount ); // Mount
|
||||
stmt->setInt( 7, 0 ); // InvicibleGM
|
||||
stmt->setInt( 8, m_voice );
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ namespace Server {
|
|||
|
||||
m_data.title = pPlayer->getTitle();
|
||||
m_data.voice = pPlayer->getVoiceId();
|
||||
m_data.currentMount = 0;
|
||||
m_data.currentMount = pPlayer->getCurrentMount();
|
||||
|
||||
m_data.onlineStatus = static_cast< uint8_t >( pPlayer->getOnlineStatus() );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue