mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-09 04:07:46 +00:00
Set FirstClass properly
This commit is contained in:
parent
595795d3b0
commit
5f04ef60ef
4 changed files with 12 additions and 1 deletions
|
@ -690,6 +690,11 @@ uint8_t Player::getLevelForClass( Common::ClassJob pClass ) const
|
||||||
return static_cast< uint8_t >( m_classArray[ classJobIndex ] );
|
return static_cast< uint8_t >( m_classArray[ classJobIndex ] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::ClassJob Player::getFirstClass() const
|
||||||
|
{
|
||||||
|
return m_firstClass;
|
||||||
|
}
|
||||||
|
|
||||||
bool Player::isClassJobUnlocked( Common::ClassJob classJob ) const
|
bool Player::isClassJobUnlocked( Common::ClassJob classJob ) const
|
||||||
{
|
{
|
||||||
// todo: need to properly check if a job is unlocked, at the moment we just check the class array which will return true for every job if the base class is unlocked
|
// todo: need to properly check if a job is unlocked, at the moment we just check the class array which will return true for every job if the base class is unlocked
|
||||||
|
|
|
@ -214,6 +214,9 @@ namespace Sapphire::Entity
|
||||||
/*! returns the level of the provided class / job */
|
/*! returns the level of the provided class / job */
|
||||||
uint8_t getLevelForClass( Common::ClassJob pClass ) const;
|
uint8_t getLevelForClass( Common::ClassJob pClass ) const;
|
||||||
|
|
||||||
|
/*! \return the first class of the player */
|
||||||
|
Common::ClassJob getFirstClass() const;
|
||||||
|
|
||||||
/*! returns if the classjob is unlocked */
|
/*! returns if the classjob is unlocked */
|
||||||
bool isClassJobUnlocked( Common::ClassJob classJob ) const;
|
bool isClassJobUnlocked( Common::ClassJob classJob ) const;
|
||||||
|
|
||||||
|
@ -901,6 +904,8 @@ namespace Sapphire::Entity
|
||||||
ExpList m_expArray{};
|
ExpList m_expArray{};
|
||||||
StateFlags m_stateFlags{};
|
StateFlags m_stateFlags{};
|
||||||
|
|
||||||
|
Common::ClassJob m_firstClass{};
|
||||||
|
|
||||||
uint8_t m_homePoint;
|
uint8_t m_homePoint;
|
||||||
uint8_t m_startTown;
|
uint8_t m_startTown;
|
||||||
uint16_t m_townWarpFstFlags;
|
uint16_t m_townWarpFstFlags;
|
||||||
|
|
|
@ -78,6 +78,7 @@ bool Sapphire::Entity::Player::loadFromDb( uint64_t characterId )
|
||||||
|
|
||||||
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" );
|
||||||
|
m_firstClass = static_cast< ClassJob >( res->getUInt( "FirstClass" ) );
|
||||||
|
|
||||||
// Additional data
|
// Additional data
|
||||||
m_voice = res->getUInt8( "Voice" );
|
m_voice = res->getUInt8( "Voice" );
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||||
m_data.Tribe = player.getLookAt( Common::CharaLook::Tribe );
|
m_data.Tribe = player.getLookAt( Common::CharaLook::Tribe );
|
||||||
m_data.Sex = player.getLookAt( Common::CharaLook::Gender );
|
m_data.Sex = player.getLookAt( Common::CharaLook::Gender );
|
||||||
m_data.ClassJob = static_cast< uint8_t >( player.getClass() );
|
m_data.ClassJob = static_cast< uint8_t >( player.getClass() );
|
||||||
m_data.FirstClass = static_cast< uint8_t >( player.getClass() );
|
m_data.FirstClass = static_cast< uint8_t >( player.getFirstClass() );
|
||||||
//m_data.maxLevel = player.getLevel();
|
//m_data.maxLevel = player.getLevel();
|
||||||
m_data.GuardianDeity = static_cast< uint8_t >( player.getGuardianDeity() );
|
m_data.GuardianDeity = static_cast< uint8_t >( player.getGuardianDeity() );
|
||||||
m_data.BirthMonth = player.getBirthMonth();
|
m_data.BirthMonth = player.getBirthMonth();
|
||||||
|
|
Loading…
Add table
Reference in a new issue