From 71b459ba6273e2fddc5f92ad4fb8e4c4c803a708 Mon Sep 17 00:00:00 2001 From: Taezen <86413840+Taezen@users.noreply.github.com> Date: Sat, 11 Sep 2021 14:00:04 +0200 Subject: [PATCH] fix for previous quest and quest lock check --- src/world/Manager/MapMgr.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/world/Manager/MapMgr.cpp b/src/world/Manager/MapMgr.cpp index 462f9b3d..34c3fd58 100644 --- a/src/world/Manager/MapMgr.cpp +++ b/src/world/Manager/MapMgr.cpp @@ -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 )