Ejemplo n.º 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();
        }
Ejemplo n.º 2
0
        private void subLootAddItem_Click(object sender, EventArgs e)
        {
            SHLootItem item = new SHLootItem();

            item.min  = 0;
            item.max  = 1;
            item.rate = 20;
            item.id   = 0;

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

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

                ListViewItem lvi = new ListViewItem();

                ProcessLootItem(lvi, item);

                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();
        }