示例#1
0
 public static void Postfix(ui_MessageWindow __instance)
 {
     if (!Main.enabled || !Main.settings.showInGift)
     {
         return;
     }
     Changer.ChangeObjectsName(__instance.itemHolder, "ItemNumberText");
 }
示例#2
0
 private static void Postfix(ui_MessageWindow __instance)
 {
     if (!Main.on)
     {
         return;
     }
     Utils.ButtonConfirm(__instance.useItemButton);
     Utils.ButtonConfirm(__instance.useActorButton);
 }
示例#3
0
        private static Button GetSkipButtonFromComponets(ui_MessageWindow instance)
        {
            var skipBtn = instance.GetComponentsInChildren <Button>().FirstOrDefault(btn => btn.name == "Choose,11200002");

            if (skipBtn == null)
            {
                Main.Logger.Log("Could't find the skip choose!");
                return(null);
            }

            return(skipBtn);
        }
示例#4
0
        private static void Postfix(ui_MessageWindow __instance, int[] eventDate)
        {
            if (Main.Enabled && eventDate.Length == 4 && eventDate[2] == 112)
            {
                GameObject choose = UnityEngine.Object.Instantiate <GameObject>(__instance.massageChoose1, Vector3.zero, Quaternion.identity);
                choose.name = "Choose,11200002";
                choose.GetComponent <Button>().onClick.Invoke();
                UnityEngine.Object.Destroy(choose);

#if (DEBUG)
                Main.Logger.Log("Skip");
#endif
            }
        }
示例#5
0
        private static void Postfix(ui_MessageWindow __instance, int[] eventDate)
        {
            if (Main.Enabled && eventDate.Length == 4 && eventDate[2] == 112)
            {
                var skipBtn = __instance.GetComponentsInChildren <Button>().FirstOrDefault(btn => btn.name == "Choose,11200002");
                if (skipBtn == null)
                {
                    Main.Logger.Log("Could't find the skip choose!");
                    return;
                }
#if (DEBUG)
                Main.Logger.Log("Skip");
#endif
                skipBtn.onClick.Invoke();
            }
        }
示例#6
0
 private static void Postfix(ui_MessageWindow __instance)
 {
     if (!Main.on)
     {
         return;
     }
     __instance.gameObject.AddComponent <ActionsComponent>()
     .OnCheck(CHECK_TYPE.CLOSE)
     .OnCheck((_) => ui_MessageWindow.Exists)
     .OnCheck((_) => ui_MessageWindow.Instance.gameObject.activeInHierarchy)
     .AddAction(() => {
         var holder = __instance.chooseHolder;
         var count  = holder.childCount;
         var child  = holder.GetChild(count - 1);
         var button = child.gameObject.GetComponent <Button>();
         button.onClick.Invoke();
     });
 }
示例#7
0
 private static void Postfix(ui_MessageWindow __instance)
 {
     if (!Main.on)
     {
         return;
     }
     __instance.gameObject.AddComponent <ActionsComponent>()
     .OnCheck(CHECK_TYPE.CLOSE)
     .OnCheck((_) => ui_MessageWindow.Exists)
     .OnCheck((_) => ui_MessageWindow.Instance.gameObject.activeInHierarchy)
     .OnCheck((_) => UIManager.Instance.curState != UIState.ActorMenu)
     .OnCheck((_) => Utils.canClose)
     .AddAction(() => {
         var holder = __instance.chooseHolder;
         var count  = holder.childCount;
         var child  = holder.GetChild(count - 1);
         var button = child.gameObject.GetComponent <Button>();
         // 唯我选项
         if (button.name.EndsWith("20700007"))
         {
             return;
         }
         if (button.name.EndsWith("21000005"))
         {
             return;
         }
         if (button.name.EndsWith("21500006"))
         {
             return;
         }
         if (button.name.EndsWith("20300005"))
         {
             return;
         }
         if (button.name.EndsWith("22800005"))
         {
             return;
         }
         if (button.name.EndsWith("104600005"))
         {
             return;
         }
         if (button.name.EndsWith("105000005"))
         {
             return;
         }
         if (button.name.EndsWith("1700005"))
         {
             return;
         }
         if (button.name.EndsWith("106500005"))
         {
             return;
         }
         if (button.name.EndsWith("107600005"))
         {
             return;
         }
         if (button.name.EndsWith("210100005"))
         {
             return;
         }
         if (button.name.EndsWith("128200005"))
         {
             return;
         }
         if (button.name.EndsWith("25200005"))
         {
             return;
         }
         if (button.name.EndsWith("28000005"))
         {
             return;
         }
         if (button.name.EndsWith("1212000005"))
         {
             return;
         }
         if (button.name.EndsWith("000005"))
         {
             return;
         }
         button.onClick.Invoke();
     });
 }