コード例 #1
0
        private static void EndRound()
        {
            //Force game transition to the post match screen in order to reload wrestlers
            MatchMain main = MatchMain.inst;

            main.isMatchEnd = true;
            MatchSetting settings = GlobalWork.GetInst().MatchSetting;

            main.isInterruptedMatch = false;

            //Determine if full HP regen rule is in effect
            if (isRegen)
            {
                RefreshPlayer(0);
                if (isTag)
                {
                    RefreshPlayer(1);
                }
            }

            //Ensure the 3 Game Rule Doesn't Force Match to End
            settings.MatchCnt                     = 0;
            settings.is3GameMatch                 = true;
            global::GlobalParam.is3GamesMatch     = true;
            global::GlobalParam.m_MacthCount      = 0;
            global::GlobalParam.flg_MacthForceEnd = false;
            //global::GlobalParam.flg_MacthCount = true;

            //Update Game Details
            if (!endRound)
            {
                UpdateDetails();
                endRound = true;
            }
        }
コード例 #2
0
        public static void UnlockAbilities()
        {
            MatchSetting settings = GlobalWork.GetInst().MatchSetting;

            //Enable Top Rope Throw
            if (QoL_Form.form.au_overTopRope.Checked && GlobalWork.inst.MatchSetting.BattleRoyalKind == BattleRoyalKindEnum.Off)
            {
                enableTopRopeThrow = true;
            }
            else
            {
                enableTopRopeThrow = false;
            }
        }
コード例 #3
0
        private static void EndMatch()
        {
            //Ensure this isn't executed multiple times
            if (!endMatch)
            {
                MatchSetting settings = GlobalWork.GetInst().MatchSetting;

                //Ensure that we reset the 3 Game Match settings
                settings.is3GameMatch                 = false;
                global::GlobalParam.is3GamesMatch     = false;
                global::GlobalParam.flg_MacthForceEnd = true;
                endRound = false;
                endMatch = true;
                UpdateDetails();
            }
        }
コード例 #4
0
        public static void LoadAttire()
        {
            GlobalWork gw       = GlobalWork.inst;
            PlayerMan  pm       = PlayerMan.inst;
            SaveData   saveData = SaveData.inst;

            for (int pl = 0; pl < 8; pl++)
            {
                needsToChangeToMatchAttire[pl] = false;

                if (gw.MatchSetting.matchWrestlerInfo[pl].entry)
                {
                    plObj = pm.GetPlObj(pl);
                    //string[] list = Directory.GetFiles("./AceModsData/AttireExtension/", DataBase.GetWrestlerFullName(plObj.WresParam) + "*.*");
                    DirectoryInfo di    = new DirectoryInfo("./AceModsData/AttireExtension/");
                    FileInfo[]    files = di.GetFiles(DataBase.GetWrestlerFullName(plObj.WresParam) + "*.cos");
                    if (files.Length > 0)
                    {
                        //MessageBox.Show(files.Length.ToString());

                        Attire_Select attireSelect = new Attire_Select(files, pl);
                        attireSelect.ShowDialog();

                        if (File.Exists("./AceModsData/AttireExtension/" + DataBase.GetWrestlerFullName(plObj.WresParam) + attireSelect.chosenAttire + ".cos"))
                        {
                            StreamReader cdReader          = new StreamReader("./AceModsData/AttireExtension/" + DataBase.GetWrestlerFullName(plObj.WresParam) + attireSelect.chosenAttire + ".cos");
                            CostumeData  loadedCostumeData = new CostumeData();
                            while (cdReader.Peek() != -1)
                            {
                                loadedCostumeData.valid = true;
                                for (int i = 0; i < 9; i++)
                                {
                                    for (int j = 0; j < 16; j++)
                                    {
                                        loadedCostumeData.layerTex[i, j]           = cdReader.ReadLine();
                                        loadedCostumeData.color[i, j].r            = float.Parse(cdReader.ReadLine());
                                        loadedCostumeData.color[i, j].g            = float.Parse(cdReader.ReadLine());
                                        loadedCostumeData.color[i, j].b            = float.Parse(cdReader.ReadLine());
                                        loadedCostumeData.color[i, j].a            = float.Parse(cdReader.ReadLine());
                                        loadedCostumeData.highlightIntensity[i, j] = float.Parse(cdReader.ReadLine());
                                    }
                                    loadedCostumeData.partsScale[i] = float.Parse(cdReader.ReadLine());
                                }
                                entAttire = cdReader.ReadLine();
                            }
                            cdReader.Dispose();
                            cdReader.Close();

                            bool check = false;

                            if (!String.IsNullOrEmpty(entAttire))
                            {
                                if (gw.MatchSetting.BattleRoyalKind != BattleRoyalKindEnum.RoyalRumble)
                                {
                                    if (!gw.MatchSetting.isSkipEntranceScene)
                                    {
                                        if (gw.MatchSetting.arena != VenueEnum.BarbedWire && gw.MatchSetting.arena != VenueEnum.Cage && gw.MatchSetting.arena != VenueEnum.Dodecagon && gw.MatchSetting.arena != VenueEnum.Dojo && gw.MatchSetting.arena != VenueEnum.LandMine_BarbedWire && gw.MatchSetting.arena != VenueEnum.LandMine_FluorescentLamp && gw.MatchSetting.arena != VenueEnum.YurakuenHall)
                                        {
                                            check = true;
                                        }
                                    }
                                }
                            }

                            if (check)
                            {
                                needsToChangeToMatchAttire[pl] = true;
                                StreamReader cdReader2            = new StreamReader("./AceModsData/AttireExtension/" + entAttire + ".cos");
                                CostumeData  loadedCostumeDataEnt = new CostumeData();
                                while (cdReader2.Peek() != -1)
                                {
                                    loadedCostumeDataEnt.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            loadedCostumeDataEnt.layerTex[i, j]           = cdReader2.ReadLine();
                                            loadedCostumeDataEnt.color[i, j].r            = float.Parse(cdReader2.ReadLine());
                                            loadedCostumeDataEnt.color[i, j].g            = float.Parse(cdReader2.ReadLine());
                                            loadedCostumeDataEnt.color[i, j].b            = float.Parse(cdReader2.ReadLine());
                                            loadedCostumeDataEnt.color[i, j].a            = float.Parse(cdReader2.ReadLine());
                                            loadedCostumeDataEnt.highlightIntensity[i, j] = float.Parse(cdReader2.ReadLine());
                                        }
                                        loadedCostumeDataEnt.partsScale[i] = float.Parse(cdReader2.ReadLine());
                                    }
                                }

                                try
                                {
                                    plObj.FormRen.DestroySprite();
                                    plObj.FormRen.InitTexture(loadedCostumeDataEnt);
                                    for (int i = 0; i < 9; i++)
                                    {
                                        plObj.FormRen.partsScale[i] = loadedCostumeDataEnt.partsScale[i];
                                    }
                                    plObj.FormRen.InitSprite(false);
                                    L.D("ATTIRE EXTENSION: ATTIRE CHANGED TO ENTRANCE ATTIRE");
                                }
                                catch
                                {
                                    L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED TO ENTRANCE ATTIRE");
                                    MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx];
                                    plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]);
                                    plObj.FormRen.InitSprite(false);
                                    needsToChangeToMatchAttire[pl] = false;
                                }

                                if (pl == 0)
                                {
                                    cosDat1.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat1.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat1.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat1.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat1.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat1.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat1.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat1.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 1)
                                {
                                    cosDat2.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat2.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat2.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat2.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat2.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat2.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat2.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat2.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 2)
                                {
                                    cosDat3.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat3.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat3.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat3.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat3.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat3.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat3.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat3.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 3)
                                {
                                    cosDat4.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat4.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat4.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat4.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat4.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat4.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat4.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat4.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 4)
                                {
                                    cosDat5.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat5.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat5.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat5.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat5.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat5.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat5.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat5.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 5)
                                {
                                    cosDat6.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat6.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat6.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat6.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat6.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat6.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat6.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat6.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 6)
                                {
                                    cosDat7.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat7.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat7.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat7.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat7.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat7.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat7.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat7.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                                else if (pl == 7)
                                {
                                    cosDat8.valid = true;
                                    for (int i = 0; i < 9; i++)
                                    {
                                        for (int j = 0; j < 16; j++)
                                        {
                                            cosDat8.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                            cosDat8.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                            cosDat8.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                            cosDat8.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                            cosDat8.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                            cosDat8.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                                        }
                                        cosDat8.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                }
                            }
                            else
                            {
                                try
                                {
                                    plObj.FormRen.DestroySprite();
                                    plObj.FormRen.InitTexture(loadedCostumeData);
                                    for (int i = 0; i < 9; i++)
                                    {
                                        plObj.FormRen.partsScale[i] = loadedCostumeData.partsScale[i];
                                    }
                                    plObj.FormRen.InitSprite(false);
                                    L.D("ATTIRE EXTENSION: ATTIRE CHANGED");
                                }
                                catch
                                {
                                    L.D("ATTIRE EXTENSION: ATTIRE NOT CHANGED");
                                    MatchWrestlerInfo w = GlobalWork.inst.MatchSetting.matchWrestlerInfo[plObj.PlIdx];
                                    plObj.FormRen.InitTexture(SaveData.GetInst().GetEditWrestlerData(w.wrestlerID).appearanceData.costumeData[w.costume_no]);
                                    plObj.FormRen.InitSprite(false);
                                }
                            }
                        }
                        attireSelect.Dispose();
                    }
                }
            }
        }
コード例 #5
0
        public static void SetEmployees()
        {
            ringName  = "";
            promotion = null;
            playerNum = GetPlayerCount();
            MatchSetting settings = GlobalWork.GetInst().MatchSetting;

            fpwEnable = War_Form.form.fpw_Enable.Checked;
            if (fpwEnable)
            {
                try
                {
                    if ((int)settings.ringID < (int)RingID.EditRingIDTop)
                    {
                        ringName += settings.ringID;
                    }
                    else if ((int)settings.ringID >= (int)RingID.EditRingIDTop)
                    {
                        ringName = global::SaveData.GetInst().GetEditRingData(settings.ringID).name.Replace(War_Form.listSeparator, ' ');
                    }
                }
                catch (ArgumentOutOfRangeException e)
                {
                    ringName = "none";
                }

                promotion = War_Form.form.GetRingPromotion(ringName);
                if (promotion != null)
                {
                    employeeData = new Employee[8];
                    for (int i = 0; i < 8; i++)
                    {
                        Player plObj = PlayerMan.inst.GetPlObj(i);

                        if (!plObj)
                        {
                            continue;
                        }

                        employeeData[i] = promotion.GetEmployeeData(DataBase.GetWrestlerFullName(plObj.WresParam));
                    }
                }

                //Get team names
                teamNames = new String[2];
                List <String> members = new List <String>();

                //Get Blue Team Name
                for (int i = 0; i < 4; i++)
                {
                    Player player = PlayerMan.inst.GetPlObj(i);
                    if (!player)
                    {
                        continue;
                    }

                    if (player.isSecond || player.isIntruder)
                    {
                        continue;
                    }

                    members.Add(DataBase.GetWrestlerFullName(player.WresParam));
                }

                GetTeamName(members, out teamNames[0]);

                //Get Red Team Name
                members.Clear();
                for (int i = 4; i < 8; i++)
                {
                    Player player = PlayerMan.inst.GetPlObj(i);
                    if (!player)
                    {
                        continue;
                    }

                    if (player.isSecond || player.isIntruder)
                    {
                        continue;
                    }

                    members.Add(DataBase.GetWrestlerFullName(player.WresParam));
                }

                GetTeamName(members, out teamNames[1]);

                //Check for champions in a non-title match
                titleData = new TitleMatch_Data[8];
                hasChamp  = false;
                try
                {
                    if (GlobalParam.TitleMatch_BeltData == null)
                    {
                        for (int i = 0; i < 8; i++)
                        {
                            Player player = PlayerMan.inst.GetPlObj(i);
                            if (!player)
                            {
                                continue;
                            }

                            if (player.isSecond || player.isIntruder)
                            {
                                continue;
                            }

                            foreach (var item in SaveData.inst.titleMatch_Data)
                            {
                                String currentChamp = item.GetCurrentTitleHolderName();
                                if (currentChamp.Equals(DataBase.GetWrestlerFullName(player.WresParam)))
                                {
                                    hasChamp     = true;
                                    titleData[i] = item;
                                    break;
                                }
                                else
                                {
                                    if (i < 4)
                                    {
                                        if (!teamNames[0].Equals(String.Empty) && teamNames[0].Equals(currentChamp))
                                        {
                                            hasChamp     = true;
                                            titleData[i] = item;
                                            break;
                                        }
                                    }
                                    else
                                    {
                                        if (!teamNames[1].Equals(String.Empty) && teamNames[1].Equals(currentChamp))
                                        {
                                            hasChamp     = true;
                                            titleData[i] = item;
                                            break;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    L.D("SetEmployees-NonTitleMatchException: " + ex);
                }

                if (teamNames[0] != String.Empty)
                {
                    L.D("Blue Team: " + teamNames[0]);
                }

                if (teamNames[1] != String.Empty)
                {
                    L.D("Red Team: " + teamNames[1]);
                }
            }
        }
コード例 #6
0
 private void Awake()
 {
     gWork = SingletonMonoBehaviour <GlobalWork> .Instance;
     //gMan = SingletonMonoBehaviour<GlobalManager>.Instance;
     //input = SingletonMonoBehaviour<InputController>.Instance;
 }
コード例 #7
0
        private void sr_start_Click(object sender, EventArgs e)
        {
            if (!ValidateMatch())
            {
                return;
            }

            if (MoreMatchTypes_Form.SurvivalRoadData.InProgress)
            {
                ShowError("Please end the current Survival Road session first.");
            }

            #region Variables
            MatchSetting            settings = GlobalWork.GetInst().MatchSetting;
            MatchConfig.WresIDGroup player   = (MatchConfig.WresIDGroup)sr_wrestler.SelectedItem;
            MatchConfig.WresIDGroup second   = (MatchConfig.WresIDGroup)sr_second.SelectedItem;
            String     selectedType          = sr_matchType.SelectedItem.ToString();
            WrestlerID wrestlerNo            = WrestlerID.AbbieJones;
            bool       isSecond    = true;
            bool       controlBoth = false;
            bool       validEntry  = false;
            int        control     = 0;
            int        oppCount    = sr_teamList.Items.Count;
            #endregion

            try
            {
                settings = SetMatchConfig("Survival", settings);
                sr_progress.Clear();
                //Set-up player team
                for (int i = 0; i < 4; i++)
                {
                    //Handling the first player
                    if (i == 0)
                    {
                        wrestlerNo = (WrestlerID)player.ID;
                        isSecond   = false;
                        control    = 1;
                        validEntry = true;
                    }
                    else if (i == 1)
                    {
                        if (second != null)
                        {
                            validEntry = true;
                            wrestlerNo = (WrestlerID)second.ID;
                            if (sr_tag.Checked)
                            {
                                isSecond = false;
                                if (sr_controlBoth.Checked)
                                {
                                    control = 1;
                                }
                                else
                                {
                                    control = 0;
                                }
                            }
                            else if (!sr_tag.Checked)
                            {
                                isSecond = true;
                            }

                            //Ensure we handle cases where a second isn't allowed, and a tag match hasn't been selected.
                            if (!sr_tag.Checked && (!selectedType.Equals("Normal")))
                            {
                                validEntry = false;
                            }
                        }
                        else
                        {
                            validEntry = false;
                        }
                    }
                    else if (i > 1)
                    {
                        validEntry = false;
                    }

                    //Determine if this is a simulation
                    if (sr_simulate.Checked)
                    {
                        control = 0;
                        if (sr_simSecond.Checked && i == 1 && selectedType.Equals("Normal"))
                        {
                            control = 1;
                        }
                    }

                    settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i, control, isSecond, 0, settings);
                }

                //Set-up opponents
                MatchConfig.WresIDGroup opponent;
                int opponentCount = sr_teamList.Items.Count;
                for (int i = 4; i < 8; i++)
                {
                    if (i > 5)
                    {
                        validEntry = false;
                    }
                    else
                    {
                        validEntry = true;
                        int searchIndex;
                        //Get Random opponent
                        if (sr_random.Checked)
                        {
                            searchIndex = UnityEngine.Random.Range(0, opponentCount);
                        }
                        else
                        {
                            searchIndex = 0;
                        }

                        //Determine if we're creating a tag team or single competitor
                        if (opponentCount == 1)
                        {
                            opponent            = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex];
                            wrestlerNo          = MatchConfiguration.GetWrestlerNo(opponent);
                            initialOpponents[0] = opponent;
                        }
                        else if (i == 4)
                        {
                            opponent            = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex];
                            wrestlerNo          = MatchConfiguration.GetWrestlerNo(opponent);
                            initialOpponents[0] = opponent;
                        }
                        else if (sr_tag.Checked && i == 5)
                        {
                            opponent   = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex];
                            wrestlerNo = MatchConfiguration.GetWrestlerNo(opponent);

                            //Ensure that we aren't fielding duplicate wrestlers
                            while (initialOpponents[0].ID == (int)wrestlerNo)
                            {
                                searchIndex = UnityEngine.Random.Range(0, opponentCount);
                                opponent    = (MatchConfig.WresIDGroup)sr_teamList.Items[searchIndex];
                                wrestlerNo  = MatchConfiguration.GetWrestlerNo(opponent);
                            }

                            initialOpponents[1] = opponent;
                        }
                        else if (!sr_tag.Checked && i == 5)
                        {
                            validEntry = false;
                        }
                    }

                    settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i, 0, false, 0, settings);
                }

                StartMatch();
            }
            catch (Exception ex)
            {
                ShowError("An error has occured.");
                L.D("ValidateSurvivalMatchError: " + ex);
            }
        }
コード例 #8
0
        private void btn_matchStart_Click(object sender, EventArgs e)
        {
            if (!ValidateMatch())
            {
                return;
            }

            if (MoreMatchTypes_Form.ExEliminationData.InProgress)
            {
                ShowError("Please end the current Extended Elimination Match first.");
                return;
            }

            #region Variables
            MatchSetting settings    = GlobalWork.GetInst().MatchSetting;
            WrestlerID   wrestlerNo  = WrestlerID.AbbieJones;
            bool         isSecond    = true;
            bool         controlBoth = false;
            bool         validEntry  = false;
            int          control     = 0;
            #endregion

            //Adding initial teams
            try
            {
                settings = SetMatchConfig(settings);

                //Set-up Blue team
                for (int i = 0; i < 4; i++)
                {
                    if (i >= el_blueList.Items.Count)
                    {
                        break;
                    }

                    //Prepare wrestler
                    wrestlerNo = (WrestlerID)((MatchConfig.WresIDGroup)el_blueList.Items[i]).ID;
                    validEntry = true;
                    if (i == 0)
                    {
                        isSecond = false;

                        if (el_blueControl.Checked)
                        {
                            control = 1;
                        }
                        else
                        {
                            control = 0;
                        }
                    }
                    else
                    {
                        isSecond = true;
                    }

                    settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i, control, isSecond, 0, settings);
                }

                //Set-up Red team
                for (int i = 0; i < 4; i++)
                {
                    if (i >= el_redList.Items.Count)
                    {
                        break;
                    }

                    //Prepare wrestler
                    wrestlerNo = (WrestlerID)((MatchConfig.WresIDGroup)el_redList.Items[i]).ID;
                    validEntry = true;
                    if (i == 4)
                    {
                        isSecond = false;

                        if (el_redControl.Checked)
                        {
                            control = 1;
                        }
                        else
                        {
                            control = 0;
                        }
                    }
                    else
                    {
                        isSecond = true;
                    }

                    settings = MatchConfiguration.AddPlayers(validEntry, wrestlerNo, i + 4, control, isSecond, 0, settings);
                }

                StartMatch();
            }
            catch (Exception ex)
            {
                ShowError("An error has occured.");
                L.D("ValidateExElimMatch: " + ex);
            }
        }
コード例 #9
0
        private void ImportAttire(int cos)
        {
            GlobalWork gw = GlobalWork.inst;
            PlayerMan  pm = PlayerMan.inst;

            saveData = SaveData.inst;
            int         id        = listBox1.SelectedIndex;
            string      plObjname = DataBase.GetWrestlerFullName(saveData.editWrestlerData[listBox1.SelectedIndex].wrestlerParam);
            CostumeData plObjCos  = saveData.editWrestlerData[listBox1.SelectedIndex].appearanceData.costumeData[cos];

            OpenFileDialog fileDialog = new OpenFileDialog();

            fileDialog.Filter           = "COSTUME Files (*.cos)|*.cos";
            fileDialog.InitialDirectory = "./AceModsData/AttireExtension/";


            if (fileDialog.ShowDialog() == DialogResult.OK)
            {
                DialogResult dialogResult = MessageBox.Show("Overwrite in-game attire " + (cos + 1) + " with " + fileDialog.FileName + "? Are you certain? There is no undoing this.", "Please confirm your action.", MessageBoxButtons.YesNo);
                if (dialogResult == DialogResult.Yes)
                {
                    StreamReader cdReader          = new StreamReader(fileDialog.FileName);
                    CostumeData  loadedCostumeData = new CostumeData();
                    while (cdReader.Peek() != -1)
                    {
                        loadedCostumeData.valid = true;
                        for (int i = 0; i < 9; i++)
                        {
                            for (int j = 0; j < 16; j++)
                            {
                                loadedCostumeData.layerTex[i, j]           = cdReader.ReadLine();
                                loadedCostumeData.color[i, j].r            = float.Parse(cdReader.ReadLine());
                                loadedCostumeData.color[i, j].g            = float.Parse(cdReader.ReadLine());
                                loadedCostumeData.color[i, j].b            = float.Parse(cdReader.ReadLine());
                                loadedCostumeData.color[i, j].a            = float.Parse(cdReader.ReadLine());
                                loadedCostumeData.highlightIntensity[i, j] = float.Parse(cdReader.ReadLine());
                            }
                            loadedCostumeData.partsScale[i] = float.Parse(cdReader.ReadLine());
                        }
                        string test = cdReader.ReadLine();
                    }

                    try
                    {
                        plObjCos.valid = true;
                        for (int i = 0; i < 9; i++)
                        {
                            for (int j = 0; j < 16; j++)
                            {
                                plObjCos.layerTex[i, j]           = loadedCostumeData.layerTex[i, j];
                                plObjCos.color[i, j].r            = loadedCostumeData.color[i, j].r;
                                plObjCos.color[i, j].g            = loadedCostumeData.color[i, j].g;
                                plObjCos.color[i, j].b            = loadedCostumeData.color[i, j].b;
                                plObjCos.color[i, j].a            = loadedCostumeData.color[i, j].a;
                                plObjCos.highlightIntensity[i, j] = loadedCostumeData.highlightIntensity[i, j];
                            }
                            plObjCos.partsScale[i] = loadedCostumeData.partsScale[i];
                        }

                        //plObjCos = loadedCostumeData;
                        L.D("ATTIRE EXTENSION: ATTIRE IMPORTED TO ATTIRE SLOT " + cos);
                    }
                    catch
                    {
                        L.D("ATTIRE EXTENSION: ATTIRE NOT IMPORTED");
                    }


                    cdReader.Dispose();
                    cdReader.Close();
                }
                else
                {
                    return;
                }
            }
        }
コード例 #10
0
        private void ImportRefAttire()
        {
            GlobalWork inst  = GlobalWork.inst;
            RefereeMan inst2 = RefereeMan.inst;

            AttireExtensionForm.saveData = SaveData.inst;
            int            num            = AttireExtensionForm.refIDList[this.refereeList.SelectedIndex];
            string         text           = AttireExtensionForm.saveData.GetEditRefereeData((RefereeID)num).Prm.name;
            CostumeData    costumeData    = AttireExtensionForm.saveData.GetEditRefereeData((RefereeID)num).appearanceData.costumeData[0];
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.Filter           = "COSTUME Files (*.cos)|*.cos|MCD Files (*.mcd)|*.mcd)";
            openFileDialog.InitialDirectory = "./EGOData/RefereeCostumes";
            bool flag = openFileDialog.ShowDialog() == DialogResult.OK;

            if (flag)
            {
                DialogResult dialogResult = MessageBox.Show("Overwrite in-game referee attire with " + openFileDialog.FileName + "? Are you certain? There is no undoing this.", "Please confirm your action.", MessageBoxButtons.YesNo);
                bool         flag2        = dialogResult == DialogResult.Yes;
                if (flag2)
                {
                    StreamReader streamReader = new StreamReader(openFileDialog.FileName);
                    CostumeData  costumeData2 = new CostumeData();
                    while (streamReader.Peek() != -1)
                    {
                        costumeData2.valid = true;
                        for (int i = 0; i < 9; i++)
                        {
                            for (int j = 0; j < 16; j++)
                            {
                                costumeData2.layerTex[i, j]           = streamReader.ReadLine();
                                costumeData2.color[i, j].r            = float.Parse(streamReader.ReadLine());
                                costumeData2.color[i, j].g            = float.Parse(streamReader.ReadLine());
                                costumeData2.color[i, j].b            = float.Parse(streamReader.ReadLine());
                                costumeData2.color[i, j].a            = float.Parse(streamReader.ReadLine());
                                costumeData2.highlightIntensity[i, j] = float.Parse(streamReader.ReadLine());
                            }
                            costumeData2.partsScale[i] = float.Parse(streamReader.ReadLine());
                        }
                        string text2 = streamReader.ReadLine();
                    }
                    try
                    {
                        costumeData.valid = true;
                        for (int k = 0; k < 9; k++)
                        {
                            for (int l = 0; l < 16; l++)
                            {
                                costumeData.layerTex[k, l]           = costumeData2.layerTex[k, l];
                                costumeData.color[k, l].r            = costumeData2.color[k, l].r;
                                costumeData.color[k, l].g            = costumeData2.color[k, l].g;
                                costumeData.color[k, l].b            = costumeData2.color[k, l].b;
                                costumeData.color[k, l].a            = costumeData2.color[k, l].a;
                                costumeData.highlightIntensity[k, l] = costumeData2.highlightIntensity[k, l];
                            }
                            costumeData.partsScale[k] = costumeData2.partsScale[k];
                        }
                        L.D("ATTIRE EXTENSION: REFEREE ATTIRE IMPORTED", new object[0]);
                    }
                    catch
                    {
                        L.D("ATTIRE EXTENSION: REFEREE ATTIRE NOT IMPORTED", new object[0]);
                    }
                    streamReader.Dispose();
                    streamReader.Close();
                }
            }
        }