private void MarkPlayerQuestCompleted(Quest quest) { PlayerQuest playerQuest = Quests.SingleOrDefault(pq => pq.Details.ID == quest.ID); if (playerQuest != null) { playerQuest.IsCompleted = true; } }
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; } }
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; } }
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; } }
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; } }
// 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; } }
public void MarkQuestCompleted(Quest quest) { Quests.SingleOrDefault(a => a.Details.ID == quest.ID).IsCompleted = true; }
public bool CompletedThisQuest(Quest quest) { return(Quests.SingleOrDefault(a => a.Details.ID == quest.ID).IsCompleted); }
public static Quest QuestByID(int id) => Quests.SingleOrDefault(m => m.ID == id);