mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
Merge pull request #725 from Taezen/develop-map
fix for previous quest and quest lock check
This commit is contained in:
commit
7ccab5b7c2
1 changed files with 8 additions and 8 deletions
|
@ -437,31 +437,31 @@ bool Sapphire::World::Manager::MapMgr::isQuestVisible( Entity::Player& player, u
|
|||
}
|
||||
else if( questPtr->previousQuestJoin == 2 )
|
||||
{
|
||||
for( int32_t i = 0; i < 3; i++ )
|
||||
for( int32_t i = 0; i <= 3; i++ )
|
||||
{
|
||||
if( i == 3 )
|
||||
return false;
|
||||
|
||||
if( questPtr->previousQuest[ i ] == 0 )
|
||||
continue;
|
||||
|
||||
if( player.isQuestCompleted( questPtr->previousQuest[ i ] ) )
|
||||
break;
|
||||
|
||||
if( i == 2 )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if( questPtr->questLockJoin == 1 )
|
||||
{
|
||||
for( int32_t i = 0; i < 2; i++ )
|
||||
for( int32_t i = 0; i <= 2; i++ )
|
||||
{
|
||||
if( i == 2 )
|
||||
return false;
|
||||
|
||||
if( questPtr->questLock[ i ] == 0 )
|
||||
continue;
|
||||
|
||||
if( !player.isQuestCompleted( questPtr->questLock[ i ] ) && !player.hasQuest( questPtr->questLock[ i ] ) )
|
||||
break;
|
||||
|
||||
if( i == 1 )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if( questPtr->questLockJoin == 2 )
|
||||
|
|
Loading…
Add table
Reference in a new issue