Ejemplo n.º 1
0
        public bool IsLicensable(SHItemsXml Items, SHTalentsXml Talents)
        {
            foreach (SHItemString itemstring in dataList)
            {
                foreach (int itemID in itemstring.ItemIDList)
                {
                    if (Items.IsValid(itemID) == false)
                    {
                        continue;
                    }

                    SHItem item = Items[itemID];
                    if (item.usable_type == "talent_train")
                    {
                        int talentid = Convert.ToInt32(item.usable_param);
                        if (Talents.IsValid(talentid) == false)
                        {
                            continue;
                        }

                        SHTalent talentinfo = Talents[talentid];
                        if (talentinfo.style == "license")
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
 public void Add(SHItem i)
 {
     dataList.Add(i);
 }
Ejemplo n.º 3
0
        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();
        }