Example #1
0
 private void SetParameter(GameCharaFileInfo _data)
 {
     if (this.cfWindow.windowType == 0)
     {
         this.SetPlayerParameter(_data);
     }
     else
     {
         this.SetFemaleParameter(_data);
     }
 }
Example #2
0
        public void SetData(int _index, GameCharaFileInfo _info, Action <bool> _onClickAction)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            GameCharaFileInfoComponent.\u003CSetData\u003Ec__AnonStorey0 dataCAnonStorey0 = new GameCharaFileInfoComponent.\u003CSetData\u003Ec__AnonStorey0();
            // ISSUE: reference to a compiler-generated field
            dataCAnonStorey0._onClickAction = _onClickAction;
            // ISSUE: reference to a compiler-generated field
            dataCAnonStorey0.\u0024this = this;
            bool active = _info != null;

            if (active)
            {
                active = _info.FullPath.IsNullOrEmpty() || !_info.FullPath.IsNullOrEmpty() && File.Exists(_info.FullPath) || _info.pngData != null;
            }
            ((Component)this.rows[_index].tgl).get_gameObject().SetActiveIfDifferent(active);
            ((UnityEventBase)this.rows[_index].tgl.onValueChanged).RemoveAllListeners();
            if (!active)
            {
                return;
            }
            ((UnityEventBase)this.rows[_index].tgl.onValueChanged).RemoveAllListeners();
            // ISSUE: method pointer
            ((UnityEvent <bool>) this.rows[_index].tgl.onValueChanged).AddListener(new UnityAction <bool>((object)dataCAnonStorey0, __methodptr(\u003C\u003Em__0)));
            this.rows[_index].tgl.SetIsOnWithoutCallback(false);
            ((Selectable)this.rows[_index].tgl).set_interactable(!_info.isInSaveData);
            this.rows[_index].objEntry.SetActiveIfDifferent(_info.isInSaveData);
            this.rows[_index].objNurturing.SetActiveIfDifferent(_info.gameRegistration);
            if (Object.op_Inequality((Object)this.rows[_index].imgThumb.get_texture(), (Object)null) && Object.op_Inequality((Object)this.rows[_index].imgThumb.get_texture(), (Object)this.texEmpty))
            {
                Object.Destroy((Object)this.rows[_index].imgThumb.get_texture());
                this.rows[_index].imgThumb.set_texture((Texture)null);
            }
            if (_info.pngData != null || !_info.FullPath.IsNullOrEmpty())
            {
                this.rows[_index].imgThumb.set_texture((Texture)PngAssist.ChangeTextureFromByte(_info.pngData ?? PngFile.LoadPngBytes(_info.FullPath), 0, 0, (TextureFormat)5, false));
            }
            else
            {
                this.rows[_index].imgThumb.set_texture((Texture)this.texEmpty);
            }
            this.rows[_index].objSelect.SetActiveIfDifferent(false);
            // ISSUE: reference to a compiler-generated field
            dataCAnonStorey0.sel = _index;
            // ISSUE: method pointer
            this.rows[_index].pointerAction.listActionEnter.Add(new UnityAction((object)dataCAnonStorey0, __methodptr(\u003C\u003Em__1)));
            // ISSUE: method pointer
            this.rows[_index].pointerAction.listActionExit.Add(new UnityAction((object)dataCAnonStorey0, __methodptr(\u003C\u003Em__2)));
            this.rows[_index].info = _info;
        }
Example #3
0
        private void SetPlayerParameter(GameCharaFileInfo _data)
        {
            this.objPlayerParameterWindow.SetActiveIfDifferent(true);
            this.txtPlayerCharaName.set_text(_data.name);
            this.riPlayerCard.set_texture((Texture)PngAssist.ChangeTextureFromByte(PngFile.LoadPngBytes(_data.FullPath), 0, 0, (TextureFormat)5, false));
            int           languageInt   = Singleton <GameSystem> .Instance.languageInt;
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(_data.sex != 0 ? this.localizeFemale[languageInt] : this.localizeMale[languageInt]);
            if (_data.sex == 1 && _data.futanari)
            {
                stringBuilder.Append(this.localizeFutanari[languageInt]);
            }
            this.txtPlayerSex.set_text(stringBuilder.ToString());
        }
Example #4
0
        public void SortName(bool ascend)
        {
            if (this.lstFileInfo.Count == 0)
            {
                return;
            }
            GameCharaFileInfo gameCharaFileInfo = this.lstFileInfo.Find((Predicate <GameCharaFileInfo>)(i => i.personality == "不明"));

            if (gameCharaFileInfo != null)
            {
                this.lstFileInfo.Remove(gameCharaFileInfo);
            }
            using (new GameSystem.CultureScope())
                this.lstFileInfo = !ascend?this.lstFileInfo.OrderByDescending <GameCharaFileInfo, string>((Func <GameCharaFileInfo, string>)(n => n.name)).ThenByDescending <GameCharaFileInfo, DateTime>((Func <GameCharaFileInfo, DateTime>)(n => n.time)).ThenByDescending <GameCharaFileInfo, string>((Func <GameCharaFileInfo, string>)(n => n.personality)).ToList <GameCharaFileInfo>() : this.lstFileInfo.OrderBy <GameCharaFileInfo, string>((Func <GameCharaFileInfo, string>)(n => n.name)).ThenBy <GameCharaFileInfo, DateTime>((Func <GameCharaFileInfo, DateTime>)(n => n.time)).ThenBy <GameCharaFileInfo, string>((Func <GameCharaFileInfo, string>)(n => n.personality)).ToList <GameCharaFileInfo>();
            if (gameCharaFileInfo == null)
            {
                return;
            }
            this.lstFileInfo.Insert(0, gameCharaFileInfo);
        }
Example #5
0
        private static void AddList(
            List <GameCharaFileInfo> _list,
            string path,
            byte sex,
            bool useMyData,
            bool useDownload,
            bool preset,
            bool _isFindSaveData,
            bool firstEmpty,
            ref int idx)
        {
            string[] searchPattern = new string[1] {
                "*.png"
            };
            HashSet <string> stringSet = new HashSet <string>();

            if (_isFindSaveData)
            {
                WorldData autoData = Singleton <Game> .Instance.Data.AutoData;
                if (autoData != null)
                {
                    stringSet.Add(autoData.PlayerData.CharaFileName);
                    foreach (KeyValuePair <int, AgentData> keyValuePair in autoData.AgentTable)
                    {
                        stringSet.Add(keyValuePair.Value.CharaFileName);
                    }
                }
                foreach (KeyValuePair <int, WorldData> world in Singleton <Game> .Instance.Data.WorldList)
                {
                    if (Singleton <Game> .Instance.WorldData == null || !Singleton <MapScene> .IsInstance() || world.Value.WorldID != Singleton <Game> .Instance.WorldData.WorldID)
                    {
                        stringSet.Add(world.Value.PlayerData.CharaFileName);
                        foreach (KeyValuePair <int, AgentData> keyValuePair in world.Value.AgentTable)
                        {
                            stringSet.Add(keyValuePair.Value.CharaFileName);
                        }
                    }
                }
                if (Singleton <Game> .Instance.WorldData != null)
                {
                    stringSet.Add(Singleton <Game> .Instance.WorldData.PlayerData.CharaFileName);
                    foreach (KeyValuePair <int, AgentData> keyValuePair in Singleton <Game> .Instance.WorldData.AgentTable)
                    {
                        stringSet.Add(keyValuePair.Value.CharaFileName);
                    }
                }
            }
            string       userUuid      = Singleton <GameSystem> .Instance.UserUUID;
            CategoryKind categoryKind1 = sex != (byte)0 ? CategoryKind.Female : CategoryKind.Male;

            if (preset)
            {
                categoryKind1 |= CategoryKind.Preset;
            }
            FolderAssist folderAssist = new FolderAssist();

            folderAssist.CreateFolderInfoEx(path, searchPattern, true);
            int fileCount = folderAssist.GetFileCount();

            if (firstEmpty)
            {
                List <GameCharaFileInfo> gameCharaFileInfoList = _list;
                GameCharaFileInfo        gameCharaFileInfo1    = new GameCharaFileInfo();
                GameCharaFileInfo        gameCharaFileInfo2    = gameCharaFileInfo1;
                int num1;
                idx = (num1 = idx) + 1;
                int num2 = num1;
                gameCharaFileInfo2.index            = num2;
                gameCharaFileInfo1.name             = (string)null;
                gameCharaFileInfo1.personality      = "不明";
                gameCharaFileInfo1.voice            = 0;
                gameCharaFileInfo1.hair             = 0;
                gameCharaFileInfo1.birthMonth       = 0;
                gameCharaFileInfo1.birthDay         = 0;
                gameCharaFileInfo1.strBirthDay      = string.Empty;
                gameCharaFileInfo1.sex              = 1;
                gameCharaFileInfo1.FullPath         = (string)null;
                gameCharaFileInfo1.FileName         = (string)null;
                gameCharaFileInfo1.time             = DateTime.MinValue;
                gameCharaFileInfo1.gameRegistration = false;
                gameCharaFileInfo1.flavorState      = (Dictionary <int, int>)null;
                gameCharaFileInfo1.phase            = 0;
                gameCharaFileInfo1.normalSkill      = (Dictionary <int, int>)null;
                gameCharaFileInfo1.hSkill           = (Dictionary <int, int>)null;
                gameCharaFileInfo1.favoritePlace    = 0;
                gameCharaFileInfo1.futanari         = false;
                gameCharaFileInfo1.lifeStyle        = -1;
                gameCharaFileInfo1.cateKind         = categoryKind1;
                gameCharaFileInfo1.data_uuid        = string.Empty;
                gameCharaFileInfo1.isInSaveData     = false;
                GameCharaFileInfo gameCharaFileInfo3 = gameCharaFileInfo1;
                gameCharaFileInfoList.Add(gameCharaFileInfo3);
            }
            for (int index = 0; index < fileCount; ++index)
            {
                ChaFileControl chaFileControl = new ChaFileControl();
                if (!chaFileControl.LoadCharaFile(folderAssist.lstFile[index].FullPath, byte.MaxValue, false, true))
                {
                    Debug.LogFormat("キャラファイル読込みエラー:Code {0}", new object[1]
                    {
                        (object)chaFileControl.GetLastErrorCode()
                    });
                }
                else if ((int)chaFileControl.parameter.sex == (int)sex)
                {
                    CategoryKind categoryKind2 = (CategoryKind)0;
                    if (!preset)
                    {
                        if (userUuid == chaFileControl.userID || chaFileControl.userID == "illusion-2019-1025-xxxx-aisyoujyocha")
                        {
                            if (useMyData)
                            {
                                categoryKind2 = CategoryKind.MyData;
                            }
                            else
                            {
                                continue;
                            }
                        }
                        else if (useDownload)
                        {
                            categoryKind2 = CategoryKind.Download;
                        }
                        else
                        {
                            continue;
                        }
                    }
                    string                   empty = string.Empty;
                    VoiceInfo.Param          obj;
                    string                   str = sex == (byte)0 ? string.Empty : (Singleton <Manager.Voice> .Instance.voiceInfoDic.TryGetValue(chaFileControl.parameter.personality, out obj) ? obj.Personality : "不明");
                    List <GameCharaFileInfo> gameCharaFileInfoList = _list;
                    GameCharaFileInfo        gameCharaFileInfo1    = new GameCharaFileInfo();
                    GameCharaFileInfo        gameCharaFileInfo2    = gameCharaFileInfo1;
                    int num1;
                    idx = (num1 = idx) + 1;
                    int num2 = num1;
                    gameCharaFileInfo2.index            = num2;
                    gameCharaFileInfo1.name             = chaFileControl.parameter.fullname;
                    gameCharaFileInfo1.personality      = str;
                    gameCharaFileInfo1.voice            = chaFileControl.parameter.personality;
                    gameCharaFileInfo1.hair             = chaFileControl.custom.hair.kind;
                    gameCharaFileInfo1.birthMonth       = (int)chaFileControl.parameter.birthMonth;
                    gameCharaFileInfo1.birthDay         = (int)chaFileControl.parameter.birthDay;
                    gameCharaFileInfo1.strBirthDay      = chaFileControl.parameter.strBirthDay;
                    gameCharaFileInfo1.sex              = (int)chaFileControl.parameter.sex;
                    gameCharaFileInfo1.FullPath         = folderAssist.lstFile[index].FullPath;
                    gameCharaFileInfo1.FileName         = folderAssist.lstFile[index].FileName;
                    gameCharaFileInfo1.time             = folderAssist.lstFile[index].time;
                    gameCharaFileInfo1.gameRegistration = chaFileControl.gameinfo.gameRegistration;
                    gameCharaFileInfo1.flavorState      = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.flavorState);
                    gameCharaFileInfo1.phase            = chaFileControl.gameinfo.phase;
                    gameCharaFileInfo1.normalSkill      = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.normalSkill);
                    gameCharaFileInfo1.hSkill           = new Dictionary <int, int>((IDictionary <int, int>)chaFileControl.gameinfo.hSkill);
                    gameCharaFileInfo1.favoritePlace    = chaFileControl.gameinfo.favoritePlace;
                    gameCharaFileInfo1.futanari         = chaFileControl.parameter.futanari;
                    gameCharaFileInfo1.lifeStyle        = chaFileControl.gameinfo.lifestyle;
                    gameCharaFileInfo1.cateKind         = categoryKind1 | categoryKind2;
                    gameCharaFileInfo1.data_uuid        = chaFileControl.dataID;
                    gameCharaFileInfo1.isInSaveData     = stringSet.Contains(Path.GetFileNameWithoutExtension(chaFileControl.charaFileName));
                    GameCharaFileInfo gameCharaFileInfo3 = gameCharaFileInfo1;
                    gameCharaFileInfoList.Add(gameCharaFileInfo3);
                }
            }
        }
Example #6
0
 public void SetListInfo(int _index, GameCharaFileInfo _info)
 {
     this.rows[_index].info = _info;
 }
 private bool IsNowSelectInfo(GameCharaFileInfo _info)
 {
     return(_info != null && this.selectInfo != null && this.selectInfo.info.FullPath == _info.FullPath);
 }
Example #8
0
 private void SetFemaleParameter(GameCharaFileInfo _data)
 {
     if (!_data.FullPath.IsNullOrEmpty())
     {
         bool activeSelf = this.objFemaleParameterWindow.get_activeSelf();
         this.objFemaleParameterWindow.SetActiveIfDifferent(true);
         if (!activeSelf)
         {
             this.femaleParameterSelectNum = 0;
             this.tglFemaleStateSelects[0].SetIsOnWithoutCallback(true);
             for (int index = 0; index < this.objFemalParameterRoots.Length; ++index)
             {
                 this.objFemalParameterRoots[index].SetActiveIfDifferent(index == 0);
             }
         }
         this.txtFemaleCharaName.set_text(_data.name);
         this.riFemaleCard.set_texture((Texture)PngAssist.ChangeTextureFromByte(PngFile.LoadPngBytes(_data.FullPath), 0, 0, (TextureFormat)5, false));
         for (int index = 0; index < this.sccStateOfProgress.Length; ++index)
         {
             this.sccStateOfProgress[index].OnChangeValue(_data.phase >= index ? 1 : 0);
         }
         string empty = string.Empty;
         this.txtLifeStyle.set_text(!Lifestyle.LifestyleName.TryGetValue(_data.lifeStyle, out empty) ? "--------------------" : (_data.lifeStyle != 4 ? empty : "E・シーカー"));
         string str1 = "--------";
         this.txtGirlPower.set_text(!_data.gameRegistration ? str1 : _data.flavorState[0].ToString());
         this.txtTrust.set_text(!_data.gameRegistration ? str1 : _data.flavorState[1].ToString());
         this.txtHumanNature.set_text(!_data.gameRegistration ? str1 : _data.flavorState[2].ToString());
         this.txtInstinct.set_text(!_data.gameRegistration ? str1 : _data.flavorState[3].ToString());
         this.txtHentai.set_text(!_data.gameRegistration ? str1 : _data.flavorState[4].ToString());
         this.txtVigilance.set_text(!_data.gameRegistration ? str1 : _data.flavorState[5].ToString());
         this.txtSocial.set_text(!_data.gameRegistration ? str1 : _data.flavorState[7].ToString());
         this.txtDarkness.set_text(!_data.gameRegistration ? str1 : _data.flavorState[6].ToString());
         int           languageInt = Singleton <GameSystem> .Instance.languageInt;
         List <string> stringList;
         for (int key = 0; key < this.txtNormalSkillSlots.Length; ++key)
         {
             string str2 = "--------------------";
             if (_data.normalSkill.ContainsKey(key))
             {
                 str2 = !this.dicSkill.TryGetValue(_data.normalSkill[key], out stringList) ? "--------------------" : stringList[languageInt];
             }
             this.txtNormalSkillSlots[key].set_text(str2);
         }
         for (int key = 0; key < this.txtHSkillSlots.Length; ++key)
         {
             string str2 = "--------------------";
             if (_data.hSkill.ContainsKey(key))
             {
                 str2 = !this.dicHSkill.TryGetValue(_data.hSkill[key], out stringList) ? "--------------------" : stringList[languageInt];
             }
             this.txtHSkillSlots[key].set_text(str2);
         }
     }
     else
     {
         this.txtFemaleCharaName.set_text(string.Empty);
         this.riFemaleCard.set_texture((Texture)this.texEmpty);
         for (int index = 0; index < this.sccStateOfProgress.Length; ++index)
         {
             this.sccStateOfProgress[index].OnChangeValue(_data.phase >= index ? 1 : 0);
         }
         this.txtLifeStyle.set_text(string.Empty);
         this.txtGirlPower.set_text(string.Empty);
         this.txtTrust.set_text(string.Empty);
         this.txtHumanNature.set_text(string.Empty);
         this.txtInstinct.set_text(string.Empty);
         this.txtHentai.set_text(string.Empty);
         this.txtVigilance.set_text(string.Empty);
         this.txtSocial.set_text(string.Empty);
         this.txtDarkness.set_text(string.Empty);
         for (int index = 0; index < this.txtNormalSkillSlots.Length; ++index)
         {
             string str = "--------------------";
             this.txtNormalSkillSlots[index].set_text(str);
         }
         for (int index = 0; index < this.txtHSkillSlots.Length; ++index)
         {
             string str = "--------------------";
             this.txtHSkillSlots[index].set_text(str);
         }
     }
 }