File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -580,6 +580,28 @@ NPCKnowledgeAboutItem GetNPCKnowledgeAboutItem(ListItem listItem)
580580 return NPCKnowledgeAboutItem . KnowsAboutItem ;
581581 }
582582
583+ // Fixed from classic: an NPC who is no aware of the location of a quest building
584+ // where a quest person is located obviously can't know the person location
585+ if ( listItem . questionType == QuestionType . Person && currentKeySubjectBuildingKey != - 1 )
586+ {
587+ foreach ( ListItem buildingGroupListItem in listTopicLocation )
588+ {
589+ ListItem buildingListItem = buildingGroupListItem . listChildItems . Find ( x => x . buildingKey == currentKeySubjectBuildingKey ) ;
590+ if ( buildingListItem != null )
591+ {
592+ // Set the NPC knowledge about the building if it has not been set yet
593+ if ( buildingListItem . npcKnowledgeAboutItem == NPCKnowledgeAboutItem . NotSet )
594+ buildingListItem . npcKnowledgeAboutItem = GetNPCKnowledgeAboutItem ( buildingListItem ) ;
595+
596+ if ( buildingListItem . npcKnowledgeAboutItem == NPCKnowledgeAboutItem . DoesNotKnowAboutItem )
597+ return NPCKnowledgeAboutItem . DoesNotKnowAboutItem ;
598+
599+ // Found the building, no need to continue
600+ break ;
601+ }
602+ }
603+ }
604+
583605 // Make roll result be the same every time for a given NPC
584606 if ( currentNPCType == NPCType . Mobile )
585607 DFRandom . Seed = ( uint ) lastTargetMobileNPC . GetHashCode ( ) ;
You can’t perform that action at this time.
0 commit comments