private void ValidateTeam(QuestParam quest, List <PartyEditData> teams, int maxTeamCount)
        {
            bool flag = false;

            if (teams.Count > maxTeamCount)
            {
                teams = teams.Take <PartyEditData>(maxTeamCount).ToList <PartyEditData>();
                flag  = true;
            }
            else if (teams.Count < maxTeamCount)
            {
                for (int count = teams.Count; count < maxTeamCount; ++count)
                {
                    PartyData party = new PartyData(PlayerPartyTypes.Ordeal);
                    teams.Add(new PartyEditData(PartyUtility.CreateOrdealPartyNameFromIndex(count), party));
                }
                flag = true;
            }
            if (!(flag | !PartyUtility.ResetToDefaultTeamIfNeededForOrdealQuest(quest, teams)))
            {
                return;
            }
            PartyUtility.SaveTeamPresets(PartyWindow2.EditPartyTypes.Ordeal, 0, teams, false);
        }