Пример #1
0
        private void LootableDetail_ValueChanged(ListViewItem lvi)
        {
            if (lvi != null)
            {
                if (lvi.Tag.GetType() == typeof(SHLootSilver))
                {
                    SHLootSilver silver = (SHLootSilver)lvi.Tag;

                    silver.Compile();
                    silver.Build(xmlCore);

                    ProcessLootSilver(lvi, silver);
                }
                else if (lvi.Tag.GetType() == typeof(SHLootItem))
                {
                    SHLootItem item = (SHLootItem)lvi.Tag;

                    item.Compile();
                    item.Build(xmlCore);

                    ProcessLootItem(lvi, item);
                }
                else if (lvi.Tag.GetType() == typeof(SHLootSoul))
                {
                    SHLootSoul soul = (SHLootSoul)lvi.Tag;

                    soul.Compile();
                    soul.Build(xmlCore);

                    ProcessLootSoul(lvi, soul);
                }
            }

            Global._VelixianForms.FindForm("LOOTING").Touch();
        }
Пример #2
0
        private void subLootAddSoul_Click(object sender, EventArgs e)
        {
            SHLootSoul soul = new SHLootSoul();

            soul.min  = 0;
            soul.max  = 1;
            soul.rate = 10;
            soul.type = SHLootSoulType.C;

            if (lvLootList.Tag != null && lvLootList.Tag.GetType() == typeof(SHLoot))
            {
                soul.Compile();
                soul.Build(xmlCore);

                ((SHLoot)lvLootList.Tag).Add(soul);

                ListViewItem lvi = new ListViewItem();

                ProcessLootSoul(lvi, soul);

                lvLootList.Items.Add(lvi);
                SHListViewUtil.SelectIndex(lvLootList, lvi.Index);

                m_ListViewController.SetListText(pgLoot.Tag as ListViewItem, lvLootList.Tag as SHLoot);
            }

            Global._VelixianForms.FindForm("LOOTING").Touch();
        }