[HarmonyPatch(typeof(ScheduleScene), "SetNoonWorkSlot_Safe")] //, MethodType.Constructor
        public static void ScheduleScenePatch(ILContext ctx, MethodBase orig)
        {
            MyLog.LogMessage(
                "ScheduleScenePatch"
                );

            ILCursor c = new ILCursor(ctx);

            for (int i = 0; i < 4; i++)
            {
                if (c.TryGotoNext(MoveType.Before,
                                  x => x.MatchLdcI4(40)
                                  ))
                {
                    c.Remove();
                    c.Emit(Mono.Cecil.Cil.OpCodes.Ldc_I4, maxSlot);
                }
                else
                {
                    MyLog.LogWarning(
                        "ScheduleScenePatch"
                        , orig.Name
                        , i
                        , c.ToString()
                        );
                    break;
                }
            }
        }
 public static void SetWorkId(ScheduleTaskCtrl __instance
                              , ScheduleMgr.ScheduleTime workTime
                              , int taskId
                              , ScheduleCtrl ___m_scheduleCtrl
                              )
 {
     if (workTime == ScheduleMgr.ScheduleTime.DayTime)
     {
         MyLog.LogMessage(
             "ScheduleTaskCtrl.SetWorkId"
             , workTime
             , taskId
             , ___m_scheduleCtrl.SelectedMaid.status.noonWorkId
             );
     }
     else if (workTime == ScheduleMgr.ScheduleTime.Night)
     {
         MyLog.LogMessage(
             "ScheduleTaskCtrl.SetWorkId"
             , workTime
             , taskId
             , ___m_scheduleCtrl.SelectedMaid.status.nightWorkId
             );
     }
 }
コード例 #3
0
        /// <summary>
        /// 4. 게임 실행중 한번만 실행됨
        /// </summary>
        public void Start()
        {
            MyLog.LogMessage("Start", string.Format("{0:0.000} ", stopwatch.Elapsed.ToString()));
#if DebugLilly
            GUIInfo.GetGameInfo();
#endif
        }
コード例 #4
0
        public static void ScheduleCtrlPatchC(
            ScheduleCtrl __instance
            , ref Dictionary <string, ScheduleCtrl.MaidStatusAndTaskUnit> ___m_dicMaidStatusAndTask
            , ref string ___m_deleteSlotNo
            , ref ScheduleMgr ___m_scheduleMgr
            , ref ScheduleScene ___m_scheduleApi
            , ref CharacterSelectManager ___m_charSelMgr
            , ref ScheduleCtrl.ExclusiveViewer ___m_currentActiveViewer
            )
        {
            MyLog.LogMessage(
                "ScheduleCtrlPatchC"
                );

            instance     = __instance;
            hGetMaidName = AccessTools.Method(typeof(ScheduleCtrl), "GetMaidName"); // 이건 잘됨
            //hGetMaidBySlotNo = AccessTools.Method(typeof(ScheduleCtrl), "GetMaidBySlotNo"); // 이건 잘됨
            //hSetViewerActive = AccessTools.Method(typeof(ScheduleCtrl), "SetViewerActive"); // 이건 잘됨
            //hSetSelectedRowActive = AccessTools.Method(typeof(ScheduleCtrl), "SetSelectedRowActive"); // 이건 잘됨
            m_dicMaidStatusAndTask = ___m_dicMaidStatusAndTask;
            m_deleteSlotNo         = ___m_deleteSlotNo;
            m_scheduleMgr          = ___m_scheduleMgr;
            m_scheduleApi          = ___m_scheduleApi;
            m_charSelMgr           = ___m_charSelMgr;
            m_currentActiveViewer  = ___m_currentActiveViewer;
        }
 public static void ScheduleTaskCtrlCtor(ScheduleTaskCtrl __instance)
 {
     MyLog.LogMessage(
         "ScheduleTaskCtrl.Ctor"
         );
     instance = __instance;
 }
コード例 #6
0
        internal static void RandPreset(Maid m_maid = null, ListType listType = ListType.All)
        {
            if (configEntryUtill["RandPreset", false])
            {
                MyLog.LogDebug("RandPreset");
            }

            if (m_maid == null)
            {
                m_maid = GameMain.Instance.CharacterMgr.GetMaid(0);
                if (m_maid == null)
                {
                    //MyLog.LogWarning("RandPreset maid null");
                    return;
                }
            }
            MyLog.LogMessage("RandPreset", MyUtill.GetMaidFullName(m_maid));

            List <string> list = lists;

            list = GetList(listType, list);

            if (list.Count == 0)
            {
                MyLog.LogWarning("RandPreset No list");
                return;
            }

            string file = list[rand.Next(list.Count)];

            SetMaidPreset(m_maid, file);
        }
コード例 #7
0
 public static void Awake()
 {
     if (configEntryUtill["Awake"])
     {
         MyLog.LogMessage("SceneEdit.Awake");
     }
 }
コード例 #8
0
        /// <summary>
        /// 정상 처리된듯?
        /// </summary>
        internal static void LoadList()
        {
            if (configEntryUtill["LoadList", false])
            {
                MyLog.LogMessage("LoadList Preset", Environment.CurrentDirectory);
            }

            listWear.Clear();
            listBody.Clear();
            listAll.Clear();
            lists.Clear();

            // 하위경로포함
            foreach (string f_strFileName in Directory.GetFiles(Path.Combine(Environment.CurrentDirectory, "Preset"), "*.preset", SearchOption.AllDirectories))
            {
                //jUnityEngine.Debug.Log("RandPreset load : " + f_strFileName);

                FileStream fileStream = new FileStream(f_strFileName, FileMode.Open);
                if (fileStream == null)
                {
                    continue;
                }
                byte[] buffer = new byte[fileStream.Length];
                fileStream.Read(buffer, 0, (int)fileStream.Length);
                fileStream.Close();
                fileStream.Dispose();
                BinaryReader binaryReader = new BinaryReader(new MemoryStream(buffer));

                string a = binaryReader.ReadString();
                if (a != "CM3D2_PRESET")
                {
                    binaryReader.Close();
                    continue;
                }
                binaryReader.ReadInt32();
                switch ((CharacterMgr.PresetType)binaryReader.ReadInt32())
                {
                case CharacterMgr.PresetType.Wear:
                    listWear.Add(f_strFileName);
                    break;

                case CharacterMgr.PresetType.Body:
                    listBody.Add(f_strFileName);
                    break;

                case CharacterMgr.PresetType.All:
                    listAll.Add(f_strFileName);
                    break;

                default:
                    break;
                }
                binaryReader.Close();
            }

            lists.AddRange(listWear);
            lists.AddRange(listBody);
            lists.AddRange(listAll);
        }
コード例 #9
0
        public void Awake()
        {
            System.Version version  = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            DateTime       dateTime = new DateTime(2000, 1, 1).AddDays(version.Build).AddSeconds(version.Revision * 2);

            MyLog.LogMessage("LullySub.Awake", dateTime.ToString("u"));
            MyLog.LogMessage("LullySub", string.Format("{0:0.000} ", Lilly.stopwatch.Elapsed.ToString()));
        }
コード例 #10
0
        /// <summary>
        /// 3.
        /// </summary>
        public void OnEnable()
        {
            MyLog.LogMessage("OnEnable", string.Format("{0:0.000} ", stopwatch.Elapsed.ToString()));

            SceneManager.sceneLoaded += this.OnSceneLoaded;

            GUIHarmony.SetHarmonyPatchAll();
        }
コード例 #11
0
 public static void SceneEditCtor()//SceneEdit __Instance  // Constructor에서는 안먹힘 생성도 안됐기때문?
 {
     if (configEntryUtill["Constructor", false])
     {
         MyLog.LogMessage("SceneEdit.Constructor");
     }
     //Instance = __Instance;
     //Instance = SceneEdit.Instance;
 }
コード例 #12
0
 public static void OnCharaLoadCompleted()
 {
     if (configEntryUtill["OnCharaLoadCompleted", false])
     {
         MyLog.LogMessage("SceneEdit.OnCharaLoadCompleted"
                          //, EasyUtill._GP01FBFaceEyeRandomOnOff.Value
                          //, EasyUtill._SetMaidStatusOnOff.Value
                          );
     }
 }
 // public void ScenarioPlay(List<Maid> maid_list)
 // AddEventMaid
 //[HarmonyPatch(typeof(ScenarioData), "ScenarioPlay")]
 //[HarmonyPostfix]
 private static void ScenarioPlay()
 {
     // !maid.status.GetEventEndFlag(this.ID)
     MyLog.LogMessage("ScenarioPlay");
     //for (int j = 0; j < GameMain.Instance.CharacterMgr.GetStockMaidCount(); j++)
     //{
     //    Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(j);
     //
     //}
 }
コード例 #14
0
 public static void Init(ProfileCtrl __instance, Dictionary <string, Personal.Data> ___m_dicPersonal)
 {
     MyLog.LogMessage("ProfileCtrl.Init", ___m_dicPersonal.Count);
     m_dicPersonal = ___m_dicPersonal;
     personals     = ___m_dicPersonal.Values.ToList();
     foreach (KeyValuePair <string, Personal.Data> keyValuePair in ProfileCtrlPatch.m_dicPersonal)
     {
         MyLog.LogMessage("ProfileCtrl.Init", keyValuePair.Key, keyValuePair.Value.id);
     }
 }
コード例 #15
0
        public void OnDisable()
        {
            MyLog.LogMessage("OnDisable");

            //GUIVirtualMgr.SetGuiOffAll();

            SceneManager.sceneLoaded -= this.OnSceneLoaded;

            GUIHarmony.SetHarmonyUnPatchAll();
        }
コード例 #16
0
        private static void YotogiClass_Data_level(ClassData <YotogiClass.Data> __instance, ref int __result) // string __m_BGMName 못가져옴
        {
            int l = __instance.expSystem.GetMaxLevel();

            __instance.expSystem.SetLevel(l);
            MyLog.LogMessage("ClassData.YotogiClass.level"
                             , __result
                             , l
                             );
            __result = l;
        }
コード例 #17
0
 public static Personal.Data SetPersonal(Maid maid, int index)
 {
     Personal.Data data = GetPersonalData(index);
     maid.status.SetPersonal(data);
     maid.status.firstName = data.uniqueName;
     MyLog.LogMessage(
         "PersonalUtill.SetPersonal"
         , MyUtill.GetMaidFullName(maid)
         );
     return(data);
 }
コード例 #18
0
        public static void RemoveEventEndFlagAll()
        {
            Action <Maid> action = delegate(Maid maid) {
                maid.status.RemoveEventEndFlagAll();
            };

            for (int j = 0; j < characterMgr.GetStockMaidCount(); j++)
            {
                Maid stockMaid = characterMgr.GetStockMaid(j);
                MyLog.LogMessage(".RemoveEventEndFlagAll:" + stockMaid.status.fullNameJpStyle);;
                action(stockMaid);
            }
        }
コード例 #19
0
        public static int SetPersonalRandom(Maid maid)
        {
            int a = UnityEngine.Random.Range(0, GetPersonalData().Count);

            Personal.Data data = GetPersonalData(a);
            maid.status.SetPersonal(data);
            maid.status.firstName = data.uniqueName;
            MyLog.LogMessage(
                "PersonalUtill.SetPersonalRandom"
                , MyUtill.GetMaidFullName(maid)
                );
            return(a);
        }
コード例 #20
0
 public static void SetPersonalCare(Maid maid)
 {
     MyLog.LogMessage(
         "PersonalUtill.SetPersonalCare"
         , MyUtill.GetMaidFullName(maid)
         , (maid.status.OldStatus != null)
         );
     maid.status.SetPersonal(maid.status.personal);
     MyLog.LogMessage(
         "PersonalUtill.SetPersonalCare"
         , MyUtill.GetMaidFullName(maid)
         , (maid.status.OldStatus != null)
         );
 }
コード例 #21
0
        public static void Start() // Maid ___m_maid,SceneEdit __instance
        {
            Maid ___m_maid = SceneEdit.Instance.maid;

            if (___m_maid == null)
            {
                MyLog.LogError("SceneEdit.Start:null");
                return;
            }
            if (configEntryUtill["Start", false])
            {
                MyLog.LogMessage("SceneEdit.Start:" + ___m_maid.status.charaName.name1 + " , " + ___m_maid.status.charaName.name2);
            }
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="__instance"></param>
 /// <param name="test"></param>
 private static void SetMethod(SceneFreeModeSelectManager __instance, string test)
 {
     MyLog.LogMessage("CreateItemEverydayList:" + test);
     try
     {
         GameObject childObject = UTY.GetChildObject(__instance.gameObject.transform.parent.gameObject, test, false);
         childObject.SetActive(true);
         childObject.GetComponent <UIButton>().isEnabled = true;
     }
     catch (Exception)
     {
         MyLog.LogError("CreateItemEverydayList:" + test);
     }
 }
コード例 #23
0
 private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
 {
     // SceneManager.GetActiveScene().name
     Lilly.scene = scene;
     //if (configEntryUtill["OnSceneLoaded"])
     MyLog.LogMessage("OnSceneLoaded"
                      , scene.buildIndex
                      , scene.rootCount
                      , scene.name
                      , scene.isLoaded
                      , scene.isDirty
                      , scene.IsValid()
                      , scene.path
                      , mode
                      , string.Format("{0:0.000} ", stopwatch.Elapsed.ToString())
                      );
 }
コード例 #24
0
        public static void OnSelectChara(Maid ___select_maid_, Dictionary <string, UIButton> ___button_dic_, MaidManagementMain __instance)
        {
            // 현제 선택한 메이드 표시
            MyLog.LogMessage("MaidManagementMain.OnSelectChara:" + ___select_maid_.status.charaName.name1 + " , " + ___select_maid_.status.charaName.name2);
            MaidManagementMainPatch.___select_maid_ = ___select_maid_;

            // MaidStatusUtill.SetMaidStatus(___select_maid_);
            //___m_maid.status.base = 9999;
            //___m_maid.status.base = 9999;

            /*
             * foreach (var item in ___button_dic_)
             * {
             *  item.Value.isEnabled = true;
             * }
             */
        }
コード例 #25
0
 private void Update()
 {
     if (!configEntryUtill["Update"])
     {
         return;
     }
     if (ShowCounter.Value.IsDown())
     {
         MyLog.LogMessage("IsDown", ShowCounter.Value.Modifiers, ShowCounter.Value.MainKey);
     }
     if (ShowCounter.Value.IsPressed())
     {
         MyLog.LogMessage("IsPressed", ShowCounter.Value.Modifiers, ShowCounter.Value.MainKey);
     }
     if (ShowCounter.Value.IsUp())
     {
         MyLog.LogMessage("IsUp", ShowCounter.Value.Modifiers, ShowCounter.Value.MainKey);
     }
 }
コード例 #26
0
        /// <summary>
        /// 2.한번만 실행됨
        /// 단순 참조는 위에서 처리하고
        /// 초기화 같은건 이걸 이용하자
        /// </summary>
        public void Awake()
        {
            System.Version version  = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            DateTime       dateTime = new DateTime(2000, 1, 1).AddDays(version.Build).AddSeconds(version.Revision * 2);

            MyLog.LogMessage("Lully.Awake", dateTime.ToString("u"));



            //GameObjectMgr.Install(gameObject);
            //GameObjectMgr.instance.enabled = configEntryUtill["GameObjectMgr", false];

            guiVirtualMgr = GUIMgr.GUIMgr.Install(gameObject);

            if (actionsAwake.GetLength() > 0)
            {
                actionsAwake();
            }
        }
コード例 #27
0
 public static void LoadBody_R(string f_strModelFileName, Maid f_maid)
 {
     MyLog.LogMessage("TBody.LoadBody_R"
                      , MyUtill.GetMaidFullName(f_maid)
                      , f_strModelFileName
                      );
     MyLog.LogMessage("LoadBody_R", f_maid.body0 == null, (f_maid.body0).m_Bones == null, (f_maid.body0).Face == null, !f_maid.body0.isLoadedBody);
     MyLog.LogMessage("LoadBody_R", f_maid.IsCrcBody, f_maid.boMAN, MaidControlleUtill.Count);
     try
     {
         if (!f_maid.boMAN)
         {
             MaidControlleUtill.GetVMDAC(f_maid);
         }
     }
     catch (Exception e)
     {
         MyLog.LogError(e);
     }
 }
コード例 #28
0
        internal static void SetAllPlayerStatus()
        {
            MyLog.LogDarkBlue("SetAllPlayerStatus st");

            PlayerStatus.Status status = GameMain.Instance.CharacterMgr.status;
            status.casinoCoin = 999999L;
            status.clubGauge  = 100;
            status.clubGrade  = 5;
            status.money      = 9999999999L;

            ScheduleCSVData.vipFullOpenDay = 0;

            try
            {
                foreach (Trophy.Data item in Trophy.GetAllDatas(false))
                {
                    if (GameMain.Instance.CharacterMgr.status.IsHaveTrophy(item.id))
                    {
                        continue;
                    }

                    MyLog.LogMessage("Trophy"
                                     , item.id
                                     , item.name
                                     , item.type
                                     , item.rarity
                                     , item.maidPoint
                                     , item.infoText
                                     , item.bonusText
                                     );
                    GameMain.Instance.CharacterMgr.status.AddHaveTrophy(item.id);
                }
            }
            catch (Exception e)
            {
                MyLog.LogError("Trophy:" + e.ToString());
            }


            MyLog.LogDarkBlue("SetAllPlayerStatus ed");
        }
コード例 #29
0
        public Lilly()
        {
            Instance  = this;
            name      = "COM3D2.Lilly.Plugin";
            MyLog.log = BepInEx.Logging.Logger.CreateLogSource("Lilly");

            MyLog.LogDarkBlue("https://github.com/customordermaid3d2/COM3D2.Lilly.BepInExPlugin");

            stopwatch.Start(); // 시간측정 시작
            MyLog.LogMessage("Lilly", string.Format("{0:0.000} ", stopwatch.Elapsed.ToString()));
            MyLog.LogMessage("Lilly", DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss"));

            customFile  = Config;
            ShowCounter = Config.Bind("KeyboardShortcut", "KeyboardShortcut0", new BepInEx.Configuration.KeyboardShortcut(KeyCode.Alpha0, KeyCode.LeftControl));
            ConfigEntryUtill.init(Config);


            //GearMenu.SetButton();
            GUIHarmony.init();
            GUIMgr.GUIMgr.init();
#if PresetUtill
            PresetUtill.init();
#endif

            MyLog.LogMessage("ConfigFilePath", customFile.ConfigFilePath);

            // 성능이 너무 나쁨. 하모니가 괜히 클래스 지정한게 아닌듯
            //InvokeInit.Invoke();
            //InvokeAwake.Invoke();
            if (actionsInit.GetLength() > 0)
            {
                actionsInit();
            }

            configEntryUtill = ConfigEntryUtill.Create(
                "Lilly"
                , "OnSceneLoaded"
                , "GameObjectMgr" //configEntryUtill["GameObjectMgr"]
                );
        }
        public static void OutMsg(string s)
        {
            MyLog.LogMessage("OutMsg:" + s);
            return;

            /*
             * MyLog.LogMessage("OutMsg:" + s
             * , __instance.item_id
             * , __instance.is_enabled
             * , __instance.play_file_name
             * , __instance.title
             * , __instance.text
             * , __instance.type
             * , MyUtill.Join(" | ", GetEnabledIdList())
             * , MyUtill.Join(" | ", GetEnabledOldIdList())
             * , MyUtill.Join(" | ", __instance.condition_texts)
             * , __instance.titleTerm
             * , __instance.textTerm
             * , MyUtill.Join(" | ", __instance.condition_text_terms)
             * );
             */
        }