Ejemplo n.º 1
0
        private void MarkPlayerQuestCompleted(Quest quest)
        {
            PlayerQuest playerQuest = Quests.SingleOrDefault(pq => pq.Details.ID == quest.ID);

            if (playerQuest != null)
            {
                playerQuest.IsCompleted = true;
            }
        }
Ejemplo n.º 2
0
        public void MarkQuestComplete(Quest quest)
        {
            // mark quest as completed
            PlayerQuest playerQuest = Quests.SingleOrDefault(pq => pq.Details.ID == quest.ID);

            if (playerQuest != null)
            {
                playerQuest.IsCompleted = true;
            }
        }
Ejemplo n.º 3
0
        public void MarkQuestCompleted(Quest quest)
        {
            // Find the quest in the player's quest list
            PlayerQuest playerQuest = Quests.SingleOrDefault(pq => pq.Details.ID == quest.ID);

            if (playerQuest != null)
            {
                playerQuest.IsCompleted = true;
            }
        }
Ejemplo n.º 4
0
        public void MarkQuestCompleted(Quest quest)
        {
            // Обходи списъка с quests и намери quest-ът, който току що завърши
            PlayerQuest playerQuest = Quests.SingleOrDefault(pq => pq.Details.ID == quest.ID);

            if (playerQuest != null)
            {
                playerQuest.IsCompleted = true; // Отбележи го като completed
            }
        }
        public void MarkQuestCompleted(Quest quest)
        {
            // NOTE:  If the player does not have 'quest', this will do nothing

            // Find the quest in the player's quest list
            PlayerQuest playerQuest = Quests.SingleOrDefault(
                pq => pq.Details.ID == quest.ID);

            if (playerQuest != null)
            {
                // if we found the quest in player's quest list, complete it
                playerQuest.IsCompleted = true;
            }
        }
Ejemplo n.º 6
0
        public void UpdateQuest(int questID, int state)
        {
            PlayerQuest playerQuest = Quests.SingleOrDefault(
                pq => pq.ID == questID);

            if (playerQuest == null)
            {
                Quests.Add(new PlayerQuest(World.GetQuest(questID), state, false));
            }
            else
            {
                playerQuest.State = state;
            }
        }
Ejemplo n.º 7
0
        // mark the specified quest as completed and give the player the rewards
        public void CompleteQuest(int questID)
        {
            PlayerQuest playerQuest = Quests.SingleOrDefault(
                pq => pq.ID == questID);

            if (playerQuest != null)
            {
                foreach (var item in playerQuest.Data.RewardItems)
                {
                    AddItemToInventory(item.Data, item.Quantity);
                }
                AddCombatExperience(playerQuest.Data.RewardXP);
                Gold += playerQuest.Data.RewardGold;
                playerQuest.IsComplete = true;
            }
        }
Ejemplo n.º 8
0
 public void MarkQuestCompleted(Quest quest)
 {
     Quests.SingleOrDefault(a => a.Details.ID == quest.ID).IsCompleted = true;
 }
Ejemplo n.º 9
0
 public bool CompletedThisQuest(Quest quest)
 {
     return(Quests.SingleOrDefault(a => a.Details.ID == quest.ID).IsCompleted);
 }
Ejemplo n.º 10
0
 public static Quest QuestByID(int id)
 => Quests.SingleOrDefault(m => m.ID == id);