mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
Merge remote-tracking branch 'upstream/native_scripting' into feature/nativescripting
This commit is contained in:
commit
c7ada57d45
3 changed files with 17 additions and 2 deletions
|
@ -801,8 +801,12 @@ void Core::Entity::Player::setLevel( uint8_t level )
|
|||
|
||||
void Core::Entity::Player::setLevelForClass( uint8_t level, Common::ClassJob classjob )
|
||||
{
|
||||
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( classjob )].exp_idx;
|
||||
m_classArray[classJobIndex] = level;
|
||||
uint8_t classJobIndex = g_exdData.m_classJobInfoMap[static_cast< uint8_t >( classjob )].exp_idx;
|
||||
|
||||
if( m_classArray[classJobIndex] == 0 )
|
||||
insertDbClass( classJobIndex );
|
||||
|
||||
m_classArray[classJobIndex] = level;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::sendModel()
|
||||
|
|
|
@ -534,6 +534,7 @@ public:
|
|||
void insertQuest( uint16_t questId, uint8_t index, uint8_t seq ) const;
|
||||
void updateDbSearchInfo() const;
|
||||
void updateDbClass() const;
|
||||
void insertDbClass( const uint8_t classJobIndex ) const;
|
||||
|
||||
void setMarkedForRemoval();
|
||||
bool isMarkedForRemoval() const;
|
||||
|
|
|
@ -437,6 +437,16 @@ void Core::Entity::Player::updateDbClass() const
|
|||
g_charaDb.execute( stmtS );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::insertDbClass( const uint8_t classJobIndex ) const
|
||||
{
|
||||
auto stmtClass = g_charaDb.getPreparedStatement( Db::CHARA_CLASS_INS );
|
||||
stmtClass->setInt( 1, getId() );
|
||||
stmtClass->setInt( 2, classJobIndex );
|
||||
stmtClass->setInt( 3, 0 );
|
||||
stmtClass->setInt( 4, 1 );
|
||||
g_charaDb.directExecute( stmtClass );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::updateDbSearchInfo() const
|
||||
{
|
||||
auto stmtS = g_charaDb.getPreparedStatement( Db::CHARA_SEARCHINFO_UP_SELECTCLASS );
|
||||
|
|
Loading…
Add table
Reference in a new issue