mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
Play the sound effect when buying items from shop.
When selling the sound effect is also played (and shop switch to buy back tab as well) but the selling logic code is not there so...
This commit is contained in:
parent
ca06cd4e35
commit
08704ffe88
3 changed files with 6 additions and 4 deletions
|
@ -43,7 +43,7 @@ private:
|
|||
|
||||
}
|
||||
|
||||
player.playGilShop( result.eventId, SCENE_FLAGS, std::bind( &GilShop::shopInteractionCallback, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
player.playGilShop( result.eventId, SCENE_FLAGS, result.param2 == 1 ? 3 : 2, std::bind( &GilShop::shopInteractionCallback, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ private:
|
|||
|
||||
void shopCallback( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.playGilShop( result.eventId, SCENE_FLAGS, std::bind( &GilShop::shopInteractionCallback, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
player.playGilShop( result.eventId, SCENE_FLAGS, 0, std::bind( &GilShop::shopInteractionCallback, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace Sapphire::Entity
|
|||
/*! play a subevent */
|
||||
void playScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam2, uint32_t eventParam3 );
|
||||
|
||||
void playGilShop( uint32_t eventId, uint32_t flags,
|
||||
void playGilShop( uint32_t eventId, uint32_t flags, uint32_t param1,
|
||||
Event::EventHandler::SceneReturnCallback eventCallback );
|
||||
|
||||
void directorPlayScene( uint32_t eventId, uint32_t scene, uint32_t flags, uint32_t eventParam3,
|
||||
|
|
|
@ -130,7 +130,7 @@ void Sapphire::Entity::Player::playScene( uint32_t eventId, uint32_t scene,
|
|||
playScene( eventId, scene, flags, eventParam2, eventParam3, 0, eventCallback );
|
||||
}
|
||||
|
||||
void Sapphire::Entity::Player::playGilShop( uint32_t eventId, uint32_t flags,
|
||||
void Sapphire::Entity::Player::playGilShop( uint32_t eventId, uint32_t flags, uint32_t param,
|
||||
Event::EventHandler::SceneReturnCallback eventCallback )
|
||||
{
|
||||
auto pEvent = bootstrapSceneEvent( eventId, flags );
|
||||
|
@ -145,6 +145,8 @@ void Sapphire::Entity::Player::playGilShop( uint32_t eventId, uint32_t flags,
|
|||
openGilShopPacket->data().eventId = eventId;
|
||||
openGilShopPacket->data().sceneFlags = flags;
|
||||
openGilShopPacket->data().actorId = getId();
|
||||
openGilShopPacket->data().params[ 0 ] = 1;
|
||||
openGilShopPacket->data().params[ 1 ] = param;
|
||||
|
||||
openGilShopPacket->data().scene = 10;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue