1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-05 10:17:46 +00:00

implement unlocking orchestrion roll

This commit is contained in:
Pinapelz 2024-01-10 20:35:02 -08:00
parent 96c1c4c042
commit 90354e82f4
3 changed files with 18 additions and 0 deletions

View file

@ -1023,6 +1023,7 @@ namespace Sapphire::Common
ItemActionCompanion = 853,
ItemActionVFX2 = 944,
ItemActionMount = 1322,
ItemActionSong = 5845,
};
enum ActionEffectDisplayType : uint8_t

View file

@ -67,6 +67,13 @@ void ItemAction::execute()
break;
}
case Common::ItemActionType::ItemActionSong:
{
handleSongItem();
break;
}
}
}
@ -103,3 +110,11 @@ void ItemAction::handleMountItem()
player->unlockMount( m_itemAction->data().Calcu0Arg[ 0 ] );
player->dropInventoryItem( static_cast< Common::InventoryType >( m_itemSourceContainer ), static_cast< uint8_t >( m_itemSourceSlot ) );
}
void ItemAction::handleSongItem()
{
auto player = getSourceChara()->getAsPlayer();
player->learnSong( m_itemAction->data().Calcu0Arg[ 0 ], m_id );
player->dropInventoryItem( static_cast< Common::InventoryType >( m_itemSourceContainer ), static_cast< uint8_t >( m_itemSourceSlot ) );
}

View file

@ -31,6 +31,8 @@ namespace Sapphire::World::Action
void handleMountItem();
void handleSongItem();
private:
std::shared_ptr< Excel::ExcelStruct< Excel::ItemAction > > m_itemAction;