mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-24 21:57:44 +00:00
Player title prototype;
This commit is contained in:
parent
d28c023456
commit
d08e43d564
3 changed files with 16 additions and 0 deletions
|
@ -1415,6 +1415,12 @@ void Core::Entity::Player::setIsLogin( bool bIsLogin )
|
|||
m_bIsLogin = bIsLogin;
|
||||
}
|
||||
|
||||
void Core::Entity::Player::setTitle( uint8_t titleId )
|
||||
{
|
||||
m_title = titleId;
|
||||
sendToInRangeSet( ActorControlPacket142( getId(), SetTitle, titleId ), true );
|
||||
}
|
||||
|
||||
void Core::Entity::Player::autoAttack( ActorPtr pTarget )
|
||||
{
|
||||
|
||||
|
|
|
@ -328,6 +328,8 @@ public:
|
|||
void teleport( uint16_t aetheryteId, uint8_t type = 1 );
|
||||
/*! prepares zoning / fades out the screen */
|
||||
void prepareZoning( uint16_t targetZone, bool fadeOut, uint8_t fadoutTime = 0, uint16_t animation = 0 );
|
||||
/*! change player's title */
|
||||
void setTitle( uint8_t titleId );
|
||||
|
||||
void calculateStats() override;
|
||||
void sendStats();
|
||||
|
@ -565,6 +567,7 @@ private:
|
|||
uint8_t status;
|
||||
} m_retainerInfo[8];
|
||||
|
||||
uint8_t m_title;
|
||||
uint8_t m_titleList[32];
|
||||
uint8_t m_achievement[16];
|
||||
uint8_t m_howTo[33];
|
||||
|
|
|
@ -257,6 +257,13 @@ void Core::DebugCommandHandler::set( char * data, Core::Entity::PlayerPtr pPlaye
|
|||
pPlayer->sendModel();
|
||||
pPlayer->sendDebug( "Model updated" );
|
||||
}
|
||||
else if ( subCommand == "title" )
|
||||
{
|
||||
uint32_t titleId;
|
||||
sscanf( params.c_str(), "%d", &titleId );
|
||||
|
||||
pPlayer->setTitle( titleId );
|
||||
}
|
||||
else
|
||||
{
|
||||
pPlayer->sendUrgent( subCommand + " is not a valid SET command." );
|
||||
|
|
Loading…
Add table
Reference in a new issue