public void CreateEmptyQuestFromPickUp(PickUp pickUp) { bool found = false; var emptyQuest = new Quester.Profile.Quest { Id = (int)pickUp.QuestId, Name = pickUp.QuestName }; if (pickUp.GiverType == "Item") { emptyQuest.ItemPickUp = (int)pickUp.GiverId; } else { emptyQuest.PickUp = (int)pickUp.GiverId; } for (int i = 0; i < _tnbProfile.Quests.Count; i++) { Quester.Profile.Quest q = _tnbProfile.Quests[i]; if (q.Id == pickUp.QuestId) { found = true; break; } } if (!found) { _tnbProfile.Quests.Add(emptyQuest); } }
public void CreateEmptyQuestFromTurnIn(TurnIn turnin) { bool found = false; var emptyQuest = new Quester.Profile.Quest { Id = (int)turnin.QuestId, Name = turnin.QuestName, TurnIn = (int)turnin.TurnInId }; for (int i = 0; i < _tnbProfile.Quests.Count; i++) { Quester.Profile.Quest q = _tnbProfile.Quests[i]; if (q.Id == turnin.QuestId) { found = true; break; } } if (!found) { _tnbProfile.Quests.Add(emptyQuest); } }