Beispiel #1
0
 /// <summary>Called when a quest's active state has changed to add it to or remove it from the activeQuests list</summary>
 private void OnActiveStateChanged(Quest quest, bool value)
 {
     if (value)
     {
         ActiveQuests.Add(quest);
         MainCanvasManager.Instance.AddNotification(GameNotificationType.Quest);
     }
     else
     {
         ActiveQuests.Remove(quest);
     }
 }
    private void QuestComplete()
    {
        // The quest is no longer active
        ActiveQuests.Remove(Q.gameObject);
        // The Character is no longer on the quest
        m_GameManager.GuildScript.MembersOnQuest.Remove(C);
        // Finish the Quest
        Q.Finished();


        CheckSuccess();
    }
Beispiel #3
0
        public void FinishQuest(string name)
        {
            if (!IsQuestActive(name))
            {
                return;
            }
            var quest = Manager.GameData.Quests[Manager.GameData.IdToQuestType[name]];

            ActiveQuests.Remove(GetActiveQuest(name));
            FinishedQuests.Add(CreatePQuest(quest));
            client.SendPacket(new NotificationPacket
            {
                Color    = new ARGB(0x0094FF),
                ObjectId = Id,
                Text     = "Quest Finished: " + name
            });
        }
        public static void DeactivateQuest(Quest quest)
        {
            if (!quest.IsActive)
            {
                return;
            }
            if (!ActiveQuests.Contains(quest))
            {
                return;
            }

            ActiveQuests.Remove(quest);

            OnQuestDeactivate?.Invoke(quest);

            quest.ResetAllProgress();

            // set to not active.
            quest.IsActive = false;
        }
Beispiel #5
0
 public static void QuestCompleted(string questName)
 {
     ActiveQuests.Remove(questName);
     CompletedQuests.Add(questName);
 }