コード例 #1
0
        private void PuppetStyleCB_SelectedIndexChanged(object sender, EventArgs e)
        {
            var index       = PuppetStyleCB.SelectedIndex;
            var puppetindex = PuppetLB.SelectedIndex;

            if (index < 0 || puppetindex < 0)
            {
                return;
            }

            var puppetid = ((Tuple <string, uint>)PuppetLB.Items[puppetindex]).Item2;
            var puppet   = puppets_[puppetid];
            var style    = puppet.styles[index];

            PuppetStyleTypeCB.SelectedIndex = PuppetStyleTypeCB.FindStringExact(style.type);
            PuppetElement1CB.SelectedIndex  = PuppetElement1CB.FindStringExact(style.element1);
            PuppetElement2CB.SelectedIndex  = PuppetElement2CB.FindStringExact(style.element2);
            var ability = ability_names_.ContainsKey(style.abilities[0]) ? ability_names_[style.abilities[0]] : "None";

            PuppetAbility1CB.SelectedIndex = PuppetAbility1CB.FindStringExact(ability);
            ability = ability_names_.ContainsKey(style.abilities[1]) ? ability_names_[style.abilities[1]] : "None";
            PuppetAbility2CB.SelectedIndex = PuppetAbility2CB.FindStringExact(ability);

            SkillCardLB.ItemCheck -= SkillCardLB_ItemCheck;
            for (var i = 0; i < 128; ++i)
            {
                SkillCardLB.SetItemChecked(i, false);
            }
            foreach (var id in style.compatibility)
            {
                if (id < 385 || id > 512)
                {
                    continue;
                }
                var i = id - 385;
                SkillCardLB.SetItemChecked((int)i, true);
            }
            SkillCardLB.ItemCheck += SkillCardLB_ItemCheck;

            StatHPSC.Value  = style.base_stats[0];
            StatFASC.Value  = style.base_stats[1];
            StatFDSC.Value  = style.base_stats[2];
            StatSASC.Value  = style.base_stats[3];
            StatSDSC.Value  = style.base_stats[4];
            StatSPDSC.Value = style.base_stats[5];
        }
コード例 #2
0
        private void PuppetLB_SelectedIndexChanged(object sender, EventArgs e)
        {
            var index = PuppetLB.SelectedIndex;

            if (index < 0)
            {
                return;
            }

            var id     = ((Tuple <string, uint>)PuppetLB.Items[index]).Item2;
            var puppet = puppets_[id];

            PuppetIDSC.Value       = id;
            PuppetCostSC.Value     = puppet.cost;
            PuppetdexIndexSC.Value = puppet.puppetdex_index;

            PuppetStyleCB.SelectedIndex     = -1;
            PuppetStyleTypeCB.SelectedIndex = -1;
            PuppetAbility1CB.SelectedIndex  = -1;
            PuppetAbility2CB.SelectedIndex  = -1;
            PuppetElement1CB.SelectedIndex  = -1;
            PuppetElement2CB.SelectedIndex  = -1;
            for (var i = 0; i < 128; ++i)
            {
                SkillCardLB.SetItemChecked(i, false);
            }
            StatHPSC.Value  = 0;
            StatFASC.Value  = 0;
            StatFDSC.Value  = 0;
            StatSASC.Value  = 0;
            StatSDSC.Value  = 0;
            StatSPDSC.Value = 0;

            var itemid = puppet.item_drop_table[0];

            if (item_names_.ContainsKey(itemid))
            {
                Item1CB.SelectedIndex = Item1CB.FindStringExact(item_names_[itemid]);
            }
            else
            {
                Item1CB.SelectedIndex = 0;
            }

            itemid = puppet.item_drop_table[1];
            if (item_names_.ContainsKey(itemid))
            {
                Item2CB.SelectedIndex = Item2CB.FindStringExact(item_names_[itemid]);
            }
            else
            {
                Item2CB.SelectedIndex = 0;
            }

            itemid = puppet.item_drop_table[2];
            if (item_names_.ContainsKey(itemid))
            {
                Item3CB.SelectedIndex = Item3CB.FindStringExact(item_names_[itemid]);
            }
            else
            {
                Item3CB.SelectedIndex = 0;
            }

            itemid = puppet.item_drop_table[3];
            if (item_names_.ContainsKey(itemid))
            {
                Item4CB.SelectedIndex = Item4CB.FindStringExact(item_names_[itemid]);
            }
            else
            {
                Item4CB.SelectedIndex = 0;
            }
        }