public int Compare(object x, object y) { SHQuest qFirst = (SHQuest)x; SHQuest qSecond = (SHQuest)y; return(qFirst.id.CompareTo(qSecond.id)); }
public void Add(SHQuest i) { dataList.Add(i); }
public void Assign(SHQuest srcQuest) { _title = srcQuest._title; _desc = srcQuest._desc; _category = srcQuest._category; _repeatable = srcQuest._repeatable; repeatableSpecified = srcQuest.repeatableSpecified; _dialog = srcQuest._dialog; dialogSpecified = srcQuest.dialogSpecified; _incomplete_dialog = srcQuest._incomplete_dialog; incomplete_dialogSpecified = srcQuest.incomplete_dialogSpecified; _level = srcQuest._level; levelSpecified = srcQuest.levelSpecified; _timelimit = srcQuest._timelimit; timelimitSpecified = srcQuest.timelimitSpecified; _condition = srcQuest._condition; conditionSpecified = srcQuest.conditionSpecified; _destroy_item = srcQuest._destroy_item; _share = srcQuest._share; shareSpecified = srcQuest.shareSpecified; _party_field = srcQuest._party_field; party_fieldSpecified = srcQuest.party_fieldSpecified; _party_sensor = srcQuest._party_sensor; party_sensorSpecified = srcQuest.party_sensorSpecified; _party_member_count = srcQuest._party_member_count; party_member_countSpecified = srcQuest.party_member_countSpecified; _cq_condition = srcQuest._cq_condition; cq_conditionSpecified = srcQuest.cq_conditionSpecified; _share_condition = srcQuest._share_condition; share_conditionSpecified = srcQuest.share_conditionSpecified; _players = srcQuest._players; playersSpecified = srcQuest.playersSpecified; _trialtype = srcQuest._trialtype; trialtypeSpecified = srcQuest.trialtypeSpecified; _field_group = srcQuest._field_group; field_groupSpecified = srcQuest.field_groupSpecified; _comment = srcQuest._comment; _validation = srcQuest._validation; validationSpecified = srcQuest.validationSpecified; if (srcQuest.Items == null) { this.Items = null; } else { this.Items = (SHItemAddRemove)srcQuest.Items.Clone(); } if (srcQuest.Objectives == null) { this.Objectives = null; } else { this.Objectives = (SHQuestObjectives)srcQuest.Objectives.Clone(); } if (srcQuest.Rewards == null) { this.Rewards = null; } else { this.Rewards = (SHQuestRewards)srcQuest.Rewards.Clone(); } }
private void VelixianObjBrowser_Load(object sender, EventArgs e) { ListViewItem lviSelected = null; switch (DataType) { case VOBType.Quest: for (int i = 0; i < SHXmlCore.CurrentCore.Quests.dataList.Count; i++) { SHQuest quest = (SHQuest)SHXmlCore.CurrentCore.Talents.dataList[i]; ListViewItem lvi = new ListViewItem(new string[] { quest.id.ToString(), quest.title }); if (SelectedTag == quest.id.ToString()) { lviSelected = lvi; } lvi.Tag = quest.title.ToString(); lvList.Items.Add(lvi); } break; case VOBType.Item: for (int i = 0; i < SHXmlCore.CurrentCore.Items.dataList.Count; i++) { SHItem item = (SHItem)SHXmlCore.CurrentCore.Items.dataList[i]; ListViewItem lvi = new ListViewItem(new string[] { item.id.ToString(), item.name }); if (SelectedTag == item.id.ToString()) { lviSelected = lvi; } lvi.Tag = item.id.ToString(); lvList.Items.Add(lvi); } break; case VOBType.Talent: for (int i = 0; i < SHXmlCore.CurrentCore.Talents.dataList.Count; i++) { SHTalent talent = (SHTalent)SHXmlCore.CurrentCore.Talents.dataList[i]; ListViewItem lvi = new ListViewItem(new string[] { talent.id.ToString(), talent.name }); if (SelectedTag == talent.id.ToString()) { lviSelected = lvi; } lvi.Tag = talent.id.ToString(); lvList.Items.Add(lvi); } break; case VOBType.String: for (int i = 0; i < SHXmlCore.CurrentCore.Strings.dataList.Count; i++) { SHString str = (SHString)SHXmlCore.CurrentCore.Strings.dataList[i]; ListViewItem lvi = new ListViewItem(new string[] { str.Key, str.String }); if (SelectedTag == str.Key) { lviSelected = lvi; } lvi.Tag = str.Key; lvList.Items.Add(lvi); } break; } if (lviSelected != null) { SHListViewUtil.SelectIndex(lvList, lviSelected.Index); } else { SHListViewUtil.SelectIndex(lvList, 0); } lvList.Select(); }