mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 19:17:45 +00:00
auto skip quests without script
This commit is contained in:
parent
b42cc888a6
commit
f427e21942
2 changed files with 24 additions and 2 deletions
|
@ -1065,7 +1065,11 @@ bool Sapphire::Entity::Player::giveQuestRewards( uint32_t questId, uint32_t opti
|
||||||
{
|
{
|
||||||
for( uint32_t i = 0; i < rewardItemCount; i++ )
|
for( uint32_t i = 0; i < rewardItemCount; i++ )
|
||||||
{
|
{
|
||||||
addItem( questInfo->itemReward0.at( i ), questInfo->itemCountReward0.at( i ), false, false, true, true );
|
auto itemId = questInfo->itemReward0.at( i );
|
||||||
|
if( itemId > 0 )
|
||||||
|
{
|
||||||
|
addItem( itemId, questInfo->itemCountReward0.at( i ), false, false, true, true );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1074,7 +1078,7 @@ bool Sapphire::Entity::Player::giveQuestRewards( uint32_t questId, uint32_t opti
|
||||||
for( uint32_t i = 0; i < optionalItemCount; i++ )
|
for( uint32_t i = 0; i < optionalItemCount; i++ )
|
||||||
{
|
{
|
||||||
auto itemId = questInfo->itemReward1.at( i );
|
auto itemId = questInfo->itemReward1.at( i );
|
||||||
if( itemId == optionalChoice )
|
if( itemId > 0 && itemId == optionalChoice )
|
||||||
{
|
{
|
||||||
addItem( itemId, questInfo->itemCountReward1.at( i ), false, false, true, true );
|
addItem( itemId, questInfo->itemCountReward1.at( i ), false, false, true, true );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -64,7 +64,25 @@ void Sapphire::Network::GameConnection::eventHandlerTalk( const Packets::FFXIVAR
|
||||||
{
|
{
|
||||||
auto questInfo = exdData.get< Sapphire::Data::Quest >( eventId );
|
auto questInfo = exdData.get< Sapphire::Data::Quest >( eventId );
|
||||||
if( questInfo )
|
if( questInfo )
|
||||||
|
{
|
||||||
player.sendUrgent( "Quest not implemented: {0} ({1})", questInfo->name, questInfo->id );
|
player.sendUrgent( "Quest not implemented: {0} ({1})", questInfo->name, questInfo->id );
|
||||||
|
if( player.hasQuest( eventId ) )
|
||||||
|
{
|
||||||
|
player.giveQuestRewards( eventId, 0 );
|
||||||
|
player.finishQuest( eventId );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player.playScene( eventId, 0, 0,
|
||||||
|
[ eventId ]( Entity::Player& player, const Event::SceneResult& result )
|
||||||
|
{
|
||||||
|
if( result.param2 == 1 )
|
||||||
|
{
|
||||||
|
player.updateQuest( eventId, 255 );
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
player.checkEvent( eventId );
|
player.checkEvent( eventId );
|
||||||
|
|
Loading…
Add table
Reference in a new issue