コード例 #1
0
        void UiCraftListRed(RedCharacter red)
        {
            for (int i = 0; i < 5; i++)
            {
                picList[i].Image    = null;
                picList[i].SizeMode = PictureBoxSizeMode.StretchImage;
                picList[i].Image    = Image.FromFile(mainForm.goldList[red.SсhemeCraft[i]].ImgUrl);

                nameList[i].Text            = mainForm.goldList[red.SсhemeCraft[i]].Name;
                countList[i].Text           = mainForm.goldList[red.SсhemeCraft[i]].Count.ToString();
                totalDifficultyList[i].Text = mainForm.goldList[red.SсhemeCraft[i]].TotalDifficulty.ToString();
                SearchList[i].Text          = SearchString(mainForm.goldList[red.SсhemeCraft[i]]);
            }
        }
コード例 #2
0
        public int tmpCount(RedCharacter redChamp)
        {
            bool flag = false;

            int tmp    = 5;
            int realId = -9;

            FakeCount(3);

            //Ищем "конкретного" перса в схеме крафта
            foreach (int tmpId in redChamp.SсhemeCraft)
            {
                if (tmpId != 0)
                {
                    realId = tmpId;
                    if (goldList[tmpId].FakeCount > 0)
                    {
                        //Минусуем фейковое значение САМОГО ПЕРСА
                        pinkList[tmpId].FakeCount--;
                        pinkList[0].FakeCount--;

                        //Минусуем колличество недостающих персов для крафта
                        tmp--;
                        flag = false;
                        break;
                    }
                    else
                    {
                        flag = true;
                    }
                }
            }

            for (int i = 0; i < 5; i++)
            {
                if (goldList[redChamp.SсhemeCraft[i]].Id == realId && !flag)
                {
                    flag = true;
                    continue;
                }

                if (goldList[redChamp.SсhemeCraft[i]].Id != 0)
                {
                    if (goldList[redChamp.SсhemeCraft[i]].FakeCount > 0)
                    {
                        goldList[redChamp.SсhemeCraft[i]].FakeCount--;
                        tmp--;
                        goldList[0].FakeCount--;
                    }
                }
                else
                {
                    if (goldList[redChamp.SсhemeCraft[i]].FakeCount > 0)
                    {
                        goldList[0].FakeCount--;
                        tmp--;
                    }
                }
            }
            return(tmp);
        }