コード例 #1
0
 private bool onQuestUpdated(QuestEvents.QuestUpdated evt)
 {
     if (evt.Quest.State == Quest.QuestState.Active && evt.Quest != ActiveQuest)
     {
         if (ActiveQuest != null)
         {
             deactivateQuest(Quest.QuestState.Suspended);
         }
         ActiveQuest = evt.Quest;
     }
     else if (evt.Quest.State == Quest.QuestState.Completed && evt.Quest == ActiveQuest && evt.Quest.TimesCompleted == 1)
     {
         if (evt.Quest.Definition.name == Service.Get <GameStateController>().FTUEConfig.FtueQuestId)
         {
             foreach (Quest value in availableQuests.Values)
             {
                 if (value.State == Quest.QuestState.Available)
                 {
                     Service.Get <NotificationBreadcrumbController>().AddPersistentBreadcrumb(breadcrumbType, value.Definition.name);
                     string breadcrumbId = $"{value.Definition.Mascot.AbbreviatedName}{value.Definition.ChapterNumber}";
                     if (Service.Get <NotificationBreadcrumbController>().GetBreadcrumbCount(breadcrumbId) == 0)
                     {
                         Service.Get <NotificationBreadcrumbController>().AddBreadcrumb(breadcrumbId);
                     }
                     string breadcrumbId2 = $"{value.Mascot.AbbreviatedName}Quest";
                     Service.Get <NotificationBreadcrumbController>().AddBreadcrumb(breadcrumbId2);
                 }
             }
         }
         else
         {
             bool   flag             = false;
             bool   flag2            = Service.Get <CPDataEntityCollection>().IsLocalPlayerMember();
             string name             = evt.Quest.Definition.Mascot.name;
             int    levelRequirement = evt.Quest.Definition.LevelRequirement;
             foreach (QuestDefinition value2 in knownQuests.Values)
             {
                 if (value2.Mascot.name == name && value2.ChapterNumber == evt.Quest.Definition.ChapterNumber + 1 && levelRequirement == value2.LevelRequirement && flag2)
                 {
                     Service.Get <NotificationBreadcrumbController>().AddPersistentBreadcrumb(breadcrumbType, value2.name);
                     string breadcrumbId = $"{value2.Mascot.AbbreviatedName}{value2.ChapterNumber}";
                     if (Service.Get <NotificationBreadcrumbController>().GetBreadcrumbCount(breadcrumbId) == 0)
                     {
                         Service.Get <NotificationBreadcrumbController>().AddBreadcrumb(breadcrumbId);
                     }
                     flag = true;
                 }
             }
             if (flag)
             {
                 Mascot mascot        = Service.Get <MascotService>().GetMascot(name);
                 string breadcrumbId2 = $"{mascot.AbbreviatedName}Quest";
                 Service.Get <NotificationBreadcrumbController>().AddBreadcrumb(breadcrumbId2);
             }
         }
     }
     return(false);
 }
コード例 #2
0
 private bool onQuestUpdated(QuestEvents.QuestUpdated evt)
 {
     if (evt.Quest.State != Quest.QuestState.Active)
     {
         playDialogAnimation(IdleAnimHash);
     }
     hasCheckedIndicator = false;
     return(false);
 }
コード例 #3
0
ファイル: QuestAudio.cs プロジェクト: smdx24/CPI-Source-Code
 private bool onQuestUpdated(QuestEvents.QuestUpdated evt)
 {
     if (evt.Quest.State != Quest.QuestState.Active && evt.Quest == Service.Get <QuestService>().ActiveQuest)
     {
         Service.Get <EventDispatcher>().RemoveListener <QuestEvents.QuestUpdated>(onQuestUpdated);
         Object.Destroy(base.gameObject);
     }
     return(false);
 }
コード例 #4
0
ファイル: QuestPlayer.cs プロジェクト: smdx24/CPI-Source-Code
 private bool onQuestUpdated(QuestEvents.QuestUpdated evt)
 {
     if (evt.Quest.State == Quest.QuestState.Active)
     {
         activeQuest = evt.Quest;
     }
     else if (evt.Quest == activeQuest)
     {
         activeQuest = null;
     }
     return(false);
 }
コード例 #5
0
 private bool onQuestUpdated(QuestEvents.QuestUpdated evt)
 {
     checkObjectiveState();
     return(false);
 }
コード例 #6
0
 private bool onQuestUpdated(QuestEvents.QuestUpdated evt)
 {
     removeListeners();
     Finish();
     return(false);
 }