Example #1
0
        private void SaveIndividualAttires(int num)
        {
            name = listBox1.SelectedItem.ToString();
            id   = listBox1.SelectedIndex;

            saveData = SaveData.inst;
            EditWrestlerData editDat = saveData.editWrestlerData[id];

            CostumeData[] cosDat = editDat.appearanceData.costumeData;

            if (cosDat[0].valid)
            {
                SaveFileDialog savefile = new SaveFileDialog();
                savefile.InitialDirectory = "./AceModsData/AttireExtension/";
                savefile.Filter           = "COSTUME Files (*.cos)|*.cos";
                savefile.FileName         = listBox1.SelectedItem.ToString() + "_";
                if (savefile.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        using (StreamWriter streamWriter = new StreamWriter(savefile.FileName))
                        {
                            for (int i = 0; i < 9; i++)
                            {
                                for (int j = 0; j < 16; j++)
                                {
                                    streamWriter.WriteLine(cosDat[num].layerTex[i, j]);
                                    streamWriter.WriteLine(cosDat[num].color[i, j].r);
                                    streamWriter.WriteLine(cosDat[num].color[i, j].g);
                                    streamWriter.WriteLine(cosDat[num].color[i, j].b);
                                    streamWriter.WriteLine(cosDat[num].color[i, j].a);
                                    streamWriter.WriteLine(cosDat[num].highlightIntensity[i, j]);
                                }
                                streamWriter.WriteLine(cosDat[num].partsScale[i]);
                            }
                            streamWriter.Dispose();
                            streamWriter.Close();
                        }
                    }
                    catch
                    {
                        MessageBox.Show("Couldn't save attire to './AceModsData/AttireExtension/" + name + ".cos'");
                    }
                }
            }
        }
Example #2
0
        private void SaveAllAttires()
        {
            name = listBox1.SelectedItem.ToString();
            id   = listBox1.SelectedIndex;

            saveData = SaveData.inst;
            EditWrestlerData editDat = saveData.editWrestlerData[id];

            CostumeData[] cosDat = editDat.appearanceData.costumeData;


            try
            {
                for (int a = 0; a < 4; a++)
                {
                    if (!cosDat[a].valid)
                    {
                        return;
                    }

                    using (StreamWriter streamWriter = new StreamWriter("./AceModsData/AttireExtension/" + name + "_" + (a + 1) + ".cos"))
                    {
                        for (int i = 0; i < 9; i++)
                        {
                            for (int j = 0; j < 16; j++)
                            {
                                streamWriter.WriteLine(cosDat[a].layerTex[i, j]);
                                streamWriter.WriteLine(cosDat[a].color[i, j].r);
                                streamWriter.WriteLine(cosDat[a].color[i, j].g);
                                streamWriter.WriteLine(cosDat[a].color[i, j].b);
                                streamWriter.WriteLine(cosDat[a].color[i, j].a);
                                streamWriter.WriteLine(cosDat[a].highlightIntensity[i, j]);
                            }
                            streamWriter.WriteLine(cosDat[a].partsScale[i]);
                        }
                        streamWriter.Dispose();
                        streamWriter.Close();
                    }
                }
            }
            catch
            {
                MessageBox.Show("Couldn't save attire to './AceModsData/AttireExtension/" + name + ".cos'");
            }
        }
        public static MatchWrestlerInfo CreateWrestlerInfo(int wID)
        {
            #region Variables
            int               num               = 0;
            SaveData          inst              = SaveData.inst;
            MatchSetting      matchSetting      = GlobalWork.inst.MatchSetting;
            MatchWrestlerInfo matchWrestlerInfo = new MatchWrestlerInfo();
            Player            plObj             = new Player();
            matchWrestlerInfo.entry           = true;
            matchWrestlerInfo.isSecond        = false;
            matchWrestlerInfo.isIntruder      = false;
            matchWrestlerInfo.assignedPad     = PadPort.Num;
            matchWrestlerInfo.wrestlerID      = (WrestlerID)wID;
            matchWrestlerInfo.InitialLifeRate = 1f;
            #endregion

            matchWrestlerInfo.editCtiticalMoveName = string.Empty;
            if (!GlobalParam.flg_IsOnline)
            {
                matchWrestlerInfo.param = DataBase.GetWrestlerParam(matchWrestlerInfo.wrestlerID);
                bool flag3 = matchWrestlerInfo.wrestlerID >= WrestlerID.EditWrestlerIDTop;
                if (flag3)
                {
                    EditWrestlerData       editWrestlerData       = SaveData.inst.GetEditWrestlerData(matchWrestlerInfo.wrestlerID);
                    WrestlerAppearanceData wrestlerAppearanceData = editWrestlerData.appearanceData;
                    matchWrestlerInfo.editCtiticalMoveName = editWrestlerData.criticalMoveName;
                }
                else
                {
                    WrestlerAppearanceData wrestlerAppearanceData = PresetWrestlerDataMan.inst.GetPresetAppearanceData(matchWrestlerInfo.wrestlerID);
                    PresetWrestlerData     presetWrestlerData     = PresetWrestlerDataMan.inst.GetPresetWrestlerData(matchWrestlerInfo.wrestlerID);
                    matchWrestlerInfo.editCtiticalMoveName = presetWrestlerData.criticalMoveName[(int)inst.optionSettings.language];
                }
            }
            else
            {
                int[] array = new int[8];
                MonoSingleton <Network> .instance.Online_Wrestler_CostumeSlot(array);

                Debug.Log(string.Concat(new object[]
                {
                    "table[i] ",
                    num,
                    " / ",
                    array[num]
                }));
                EditWrestlerData editWrestlerData2 = Online_WrestlerData.Online_EditWrestler[array[0]];
                matchWrestlerInfo.param = editWrestlerData2.wrestlerParam;
                WrestlerAppearanceData wrestlerAppearanceData = editWrestlerData2.appearanceData;
                matchWrestlerInfo.editCtiticalMoveName = editWrestlerData2.criticalMoveName;
            }
            matchWrestlerInfo.group = 0;
            bool flag4 = matchSetting.BattleRoyalKind == BattleRoyalKindEnum.Off;
            if (flag4)
            {
                matchWrestlerInfo.group = num;
            }
            else
            {
                matchWrestlerInfo.group = num;
            }
            matchWrestlerInfo.costume_no = 0;
            matchWrestlerInfo.alignment  = SaveData.inst.groupList[matchWrestlerInfo.param.groupID].alignment;
            bool flag5 = !matchSetting.isCarryOverHP;
            if (flag5)
            {
                matchWrestlerInfo.HP       = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.SP       = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Neck  = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Arm   = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Waist = 65535f * matchWrestlerInfo.InitialLifeRate;
                matchWrestlerInfo.HP_Leg   = 65535f * matchWrestlerInfo.InitialLifeRate;
            }

            return(matchWrestlerInfo);
        }