mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
Add support for unlocking gear sets
This commit is contained in:
parent
df58683c6f
commit
d449c97a9f
4 changed files with 28 additions and 1 deletions
|
@ -30,6 +30,8 @@ namespace Sapphire::Network::ActorControl
|
||||||
DefeatMsg = 0x06,
|
DefeatMsg = 0x06,
|
||||||
GainExpMsg = 0x07,
|
GainExpMsg = 0x07,
|
||||||
|
|
||||||
|
ClassJobUpdate = 0x9,
|
||||||
|
|
||||||
LevelUpEffect = 0x0A,
|
LevelUpEffect = 0x0A,
|
||||||
|
|
||||||
ExpChainMsg = 0x0C,
|
ExpChainMsg = 0x0C,
|
||||||
|
|
|
@ -922,6 +922,8 @@ void Sapphire::Entity::Player::setLevelForClass( uint8_t level, Common::ClassJob
|
||||||
insertDbClass( classJobIndex, level );
|
insertDbClass( classJobIndex, level );
|
||||||
|
|
||||||
m_classArray[ classJobIndex ] = level;
|
m_classArray[ classJobIndex ] = level;
|
||||||
|
|
||||||
|
queuePacket( makeActorControlSelf( getId(), Network::ActorControl::ClassJobUpdate, static_cast< uint8_t >( classjob ), level ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::Entity::Player::sendModel()
|
void Sapphire::Entity::Player::sendModel()
|
||||||
|
@ -1427,6 +1429,18 @@ void Sapphire::Entity::Player::setTitle( uint16_t titleId )
|
||||||
sendToInRangeSet( makeActorControl( getId(), SetTitle, titleId ), true );
|
sendToInRangeSet( makeActorControl( getId(), SetTitle, titleId ), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sapphire::Entity::Player::setMaxGearSets( uint8_t amount )
|
||||||
|
{
|
||||||
|
m_equippedMannequin = amount;
|
||||||
|
|
||||||
|
queuePacket( makeActorControlSelf( getId(), SetMaxGearSets, m_equippedMannequin ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t Sapphire::Entity::Player::getMaxGearSets() const
|
||||||
|
{
|
||||||
|
return m_equippedMannequin;
|
||||||
|
}
|
||||||
|
|
||||||
void Sapphire::Entity::Player::setEquipDisplayFlags( uint16_t state )
|
void Sapphire::Entity::Player::setEquipDisplayFlags( uint16_t state )
|
||||||
{
|
{
|
||||||
m_equipDisplayFlags = static_cast< uint8_t >( state );
|
m_equipDisplayFlags = static_cast< uint8_t >( state );
|
||||||
|
@ -1601,6 +1615,7 @@ void Sapphire::Entity::Player::sendZonePackets()
|
||||||
if( isLogin() )
|
if( isLogin() )
|
||||||
{
|
{
|
||||||
queuePacket( makeActorControlSelf( getId(), SetCharaGearParamUI, m_equipDisplayFlags, 1 ) );
|
queuePacket( makeActorControlSelf( getId(), SetCharaGearParamUI, m_equipDisplayFlags, 1 ) );
|
||||||
|
queuePacket( makeActorControlSelf( getId(), SetMaxGearSets, m_equippedMannequin ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// set flags, will be reset automatically by zoning ( only on client side though )
|
// set flags, will be reset automatically by zoning ( only on client side though )
|
||||||
|
|
|
@ -396,6 +396,12 @@ namespace Sapphire::Entity
|
||||||
/*! send the players title list */
|
/*! send the players title list */
|
||||||
void sendTitleList();
|
void sendTitleList();
|
||||||
|
|
||||||
|
/*! set number of gear sets */
|
||||||
|
void setMaxGearSets( uint8_t amount );
|
||||||
|
|
||||||
|
/*! get number of gear sets */
|
||||||
|
uint8_t getMaxGearSets() const;
|
||||||
|
|
||||||
/*! change gear param state */
|
/*! change gear param state */
|
||||||
void setEquipDisplayFlags( uint16_t state );
|
void setEquipDisplayFlags( uint16_t state );
|
||||||
|
|
||||||
|
@ -866,6 +872,8 @@ namespace Sapphire::Entity
|
||||||
|
|
||||||
uint8_t m_voice{};
|
uint8_t m_voice{};
|
||||||
|
|
||||||
|
uint8_t m_equippedMannequin;
|
||||||
|
|
||||||
uint64_t m_modelMainWeapon;
|
uint64_t m_modelMainWeapon;
|
||||||
uint64_t m_modelSubWeapon;
|
uint64_t m_modelSubWeapon;
|
||||||
uint64_t m_modelSystemWeapon{};
|
uint64_t m_modelSystemWeapon{};
|
||||||
|
|
|
@ -102,6 +102,8 @@ bool Sapphire::Entity::Player::loadFromDb( uint64_t characterId )
|
||||||
|
|
||||||
m_gmRank = res->getUInt8( "GMRank" );
|
m_gmRank = res->getUInt8( "GMRank" );
|
||||||
|
|
||||||
|
m_equippedMannequin = res->getUInt8( "EquippedMannequin" );
|
||||||
|
|
||||||
m_equipDisplayFlags = res->getUInt8( "EquipDisplayFlags" );
|
m_equipDisplayFlags = res->getUInt8( "EquipDisplayFlags" );
|
||||||
|
|
||||||
m_pose = res->getUInt8( "Pose" );
|
m_pose = res->getUInt8( "Pose" );
|
||||||
|
@ -395,7 +397,7 @@ void Sapphire::Entity::Player::updateDbChara() const
|
||||||
memcpy( orchestrionVec.data(), m_orchestrion.data(), m_orchestrion.size() );
|
memcpy( orchestrionVec.data(), m_orchestrion.data(), m_orchestrion.size() );
|
||||||
stmt->setBinary( 42, mountsVec );
|
stmt->setBinary( 42, mountsVec );
|
||||||
|
|
||||||
stmt->setInt( 44, 0 ); // EquippedMannequin
|
stmt->setInt( 44, m_equippedMannequin ); // EquippedMannequin
|
||||||
|
|
||||||
stmt->setInt( 45, 0 ); // DisplayFlags
|
stmt->setInt( 45, 0 ); // DisplayFlags
|
||||||
std::vector< uint8_t > questCompleteVec( m_questCompleteFlags.size() );
|
std::vector< uint8_t > questCompleteVec( m_questCompleteFlags.size() );
|
||||||
|
|
Loading…
Add table
Reference in a new issue