1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 14:37:44 +00:00

Add scroll item id to learnSong

This commit is contained in:
amibu 2017-10-09 20:17:43 +02:00
parent 4423bf4908
commit 332b9bf2e1
3 changed files with 5 additions and 5 deletions

View file

@ -608,7 +608,7 @@ void Core::Entity::Player::learnAction( uint8_t actionId )
queuePacket( ActorControlPacket143( getId(), ToggleActionUnlock, actionId, 1 ) ); queuePacket( ActorControlPacket143( getId(), ToggleActionUnlock, actionId, 1 ) );
} }
void Core::Entity::Player::learnSong( uint8_t songId ) void Core::Entity::Player::learnSong( uint8_t songId, uint32_t itemId )
{ {
uint16_t index; uint16_t index;
uint8_t value; uint8_t value;
@ -617,7 +617,7 @@ void Core::Entity::Player::learnSong( uint8_t songId )
m_orchestrion[index] |= value; m_orchestrion[index] |= value;
setSyncFlag( Unlocks ); setSyncFlag( Unlocks );
queuePacket( ActorControlPacket143( getId(), ToggleOrchestrionUnlock, songId, 1 ) ); queuePacket( ActorControlPacket143( getId(), ToggleOrchestrionUnlock, songId, 1, itemId ) );
} }
bool Core::Entity::Player::isActionLearned( uint8_t actionId ) const bool Core::Entity::Player::isActionLearned( uint8_t actionId ) const

View file

@ -374,7 +374,7 @@ public:
/*! learn an action / update the unlock bitmask. */ /*! learn an action / update the unlock bitmask. */
void learnAction( uint8_t actionId ); void learnAction( uint8_t actionId );
/*! learn a song / update the unlock bitmask. */ /*! learn a song / update the unlock bitmask. */
void learnSong( uint8_t songId ); void learnSong( uint8_t songId, uint32_t itemId );
/*! check if an action is already unlocked in the bitmask. */ /*! check if an action is already unlocked in the bitmask. */
bool isActionLearned( uint8_t actionId ) const; bool isActionLearned( uint8_t actionId ) const;
/*! return a const pointer to the unlock bitmask array */ /*! return a const pointer to the unlock bitmask array */

View file

@ -397,14 +397,14 @@ void Core::Network::GameConnection::gm1Handler( const Packets::GamePacket& inPac
if( param2 == 0 ) if( param2 == 0 )
{ {
for( uint8_t i = 0; i < 255; i++ ) for( uint8_t i = 0; i < 255; i++ )
targetActor->getAsPlayer()->learnSong( i ); targetActor->getAsPlayer()->learnSong( i, 0 );
pPlayer->sendNotice( "All Songs for " + targetPlayer->getName() + pPlayer->sendNotice( "All Songs for " + targetPlayer->getName() +
" were turned on." ); " were turned on." );
} }
else else
{ {
targetActor->getAsPlayer()->learnSong( param2 ); targetActor->getAsPlayer()->learnSong( param2, 0 );
pPlayer->sendNotice( "Song " + std::to_string( param2 ) + " for " + targetPlayer->getName() + pPlayer->sendNotice( "Song " + std::to_string( param2 ) + " for " + targetPlayer->getName() +
" was turned on." ); " was turned on." );
} }