Code: Select all
public int GetNumOfferableQuests(QuestGiver questGiver)
{
QuestJournal playerQuestJournal = QuestMachine.GetQuestJournal();
int count = 0;
foreach (Quest quest in questGiver.questList)
{
if ((quest.GetState() == QuestState.WaitingToStart) &&
(playerQuestJournal.FindQuest(quest.id) == null))
{
count++;
}
}
return count;
}