Beispiel #1
0
        private string CompileStats()
        {
            string chunk = "";

            if (cmbType.SelectedIndex > 4)              // kein Equip/Lapi/Lapisa/AP
            {
                return(chunk = (int)EStatusType.ItemIcon + ":" + (cmbItemIcon.Items[cmbItemIcon.SelectedIndex] as ImageComboItem).Text.Replace(".png", "") + ";");
            }

            if (cmbType.SelectedIndex == 2)                // Lapi
            {
                Lapi l = (cmbLapi.SelectedItem as ImageComboItem).Tag as Lapi;
                chunk = (int)l.ToImageIndex() + ":" + l.Level;
                return(chunk);
            }
            if (cmbType.SelectedIndex == 3)                // Lapisa
            {
                chunk = cmbLapisa.SelectedIndex.ToString();
                return(chunk);
            }
            if (cmbType.SelectedIndex == 4)                // APItem
            {
                chunk = (int)EStatusType.ItemIcon + ":" + (cmbItemIcon.Items[cmbItemIcon.SelectedIndex] as ImageComboItem).Text.Replace(".png", "") + ";";
                return(chunk);
            }

            chunk  = (int)EStatusType.Quality + ":" + cmbQuality.SelectedIndex + ";";
            chunk += (int)EStatusType.MinAngOrDef + ":" + txtANG1.Text + ";";
            if (cmbType.SelectedIndex == 0)                // Waffe
            {
                chunk += (int)EStatusType.MaxAng + ":" + txtANG2.Text + ";";
                chunk += (int)EStatusType.AspdOrResist + ":" + cmbASPD.SelectedIndex + ";";
            }
            else               // Rüstung
            {
                chunk += (int)EStatusType.AspdOrResist + ":" + txtResistenz.Text + ";";
            }
            chunk += (int)EStatusType.Haltbar + ":" + txtHaltbarkeit.Text + ";";
            chunk += (int)EStatusType.MaxLP + ":" + txtLP.Text + ";";
            chunk += (int)EStatusType.MaxMP + ":" + txtMP.Text + ";";
            chunk += (int)EStatusType.MaxAP + ":" + txtAP.Text + ";";
            chunk += (int)EStatusType.STR + ":" + txtSTR.Text + ";";
            chunk += (int)EStatusType.ABW + ":" + txtABW.Text + ";";
            chunk += (int)EStatusType.WEI + ":" + txtWEI.Text + ";";
            chunk += (int)EStatusType.INT + ":" + txtINT.Text + ";";
            chunk += (int)EStatusType.GES + ":" + txtGES.Text + ";";
            chunk += (int)EStatusType.GLÜ + ":" + txtGLÜ.Text + ";";
            chunk += (int)EStatusType.ItemIcon + ":" + (cmbItemIcon.Items[cmbItemIcon.SelectedIndex] as ImageComboItem).Text.Replace(".png", "") + ";";
            chunk += (int)EStatusType.MaxLPEP4 + ":" + txtLPEP4.Text + ";";
            chunk += (int)EStatusType.MaxMPEP4 + ":" + txtMPEP4.Text + ";";
            chunk += (int)EStatusType.MaxAPEP4 + ":" + txtAPEP4.Text + ";";
            chunk += (int)EStatusType.STREP4 + ":" + txtSTREP4.Text + ";";
            chunk += (int)EStatusType.ABWEP4 + ":" + txtABWEP4.Text + ";";
            chunk += (int)EStatusType.WEIEP4 + ":" + txtWEIEP4.Text + ";";
            chunk += (int)EStatusType.INTEP4 + ":" + txtINTEP4.Text + ";";
            chunk += (int)EStatusType.GESEP4 + ":" + txtGESEP4.Text + ";";
            chunk += (int)EStatusType.GLÜEP4 + ":" + txtGLÜEP4.Text + ";";

            return(chunk);
        }
Beispiel #2
0
        private string CompileLapis()
        {
            string chunk = "";

            for (int i = 1; i < cmbQuality.Items.Count; i++)
            {
                LapiImageComboBox cmb  = Controls["cmbSockel" + i] as LapiImageComboBox;
                ImageComboItem    item = (cmb.Items[cmb.SelectedIndex] as ImageComboItem);
                if (item == null)
                {
                    chunk += "-1:-1;";
                    continue;
                }

                Lapi lapi = item.Tag as Lapi;
                if (lapi != null)
                {
                    chunk += lapi.ToImageIndex() + ":" + lapi.Level + ";";
                }
                else                 // empty slot = type -1
                {
                    chunk += "-1:0;";
                }
            }

            return(chunk);
        }
Beispiel #3
0
        private ToolStripMenuItem TemplateItem_OnAdd(ITemplate Template, ToolStripMenuItem Item)
        {
            EItemType type = (EItemType)Template.cmbType;

            if (type != EItemType.Lapis && type != EItemType.Lapisa)
            {
                Item.Image = GetTemplateItemImage(type, Template.cmbItemIcon);
            }
            else if (type == EItemType.Lapis)
            {
                Lapi l = new Lapi(Template.LapisType, Template.LapisLevel);
                Item.Image = GetTemplateItemImage(type, l.ToImageIndex() + 1);                   // 0 = free slot
            }
            else if (type == EItemType.Lapisa)
            {
                Item.Image = GetTemplateItemImage(type, Template.cmbLapisa);
            }
            return(Item);
        }