Exemple #1
0
        public static void Postfix(GameObject resource)
        {
            if (!Main.enabled || !Main.settings.ShowHomeMassageAtTop || DateFile.instance.gameLine < 10 || ActorMenu.instance == null || resource == null)
            {
                return;
            }
            int    num  = DateFile.instance.MianActorID();
            string text = WindowManage.instance.informationName.text;

            string[] array = resource.name.Split(',');
            int      num2  = (array.Length <= 1) ? (-1) : int.Parse(array[1]);

            if (num2 == -1)
            {
                return;
            }
            float[] taiwuIncome = ShowMeMore_WindowManage_WindowSwitch_Patch.GetTaiwuIncome();
            float[] array2      = new float[2];
            if (taiwuIncome[0] == array2[0])
            {
                return;
            }
            switch (num2)
            {
            case 5:
            {
                string text3 = "";
                text3 = text3 + "\n" + DateFile.instance.SetColoer(20008, "+ " + $"{taiwuIncome[0]:F1}".ToString()) + DateFile.instance.SetColoer(20011, " / 年(期望)") + "来自" + DateFile.instance.SetColoer(10002, "太吾村建筑") + "\n";
                Text informationMassage2 = WindowManage.instance.informationMassage;
                informationMassage2.text = informationMassage2.text + text3;
                break;
            }

            case 6:
            {
                string text2 = "";
                int    taiwuCiTangPrestige = ShowMeMore_WindowManage_WindowSwitch_Patch.GetTaiwuCiTangPrestige();
                int    allQuquPrestige     = QuquBox.instance.GetAllQuquPrestige();
                text2 = text2 + "\n" + DateFile.instance.SetColoer(20007, "+ " + $"{taiwuIncome[1]:F1}".ToString()) + DateFile.instance.SetColoer(20011, " / 年(期望)") + "来自" + DateFile.instance.SetColoer(10002, "太吾村经营建筑") + "\n";
                if (taiwuCiTangPrestige != 0)
                {
                    text2 = text2 + DateFile.instance.SetColoer(20007, "+ " + taiwuCiTangPrestige.ToString() + " 威望") + " / " + DateFile.instance.SetColoer(20008, "「立春」") + "来自" + DateFile.instance.SetColoer(20009, "太吾氏祠堂") + "\n";
                }
                if (allQuquPrestige > 0)
                {
                    text2 = text2 + DateFile.instance.SetColoer(20007, "+ " + allQuquPrestige.ToString() + " 威望") + " / " + DateFile.instance.SetColoer(20008, "「立秋」") + "来自" + DateFile.instance.SetColoer(20009, "太吾村") + "陈列的促织\n";
                }
                Text informationMassage = WindowManage.instance.informationMassage;
                informationMassage.text = informationMassage.text + text2;
                break;
            }
            }
        }
        // Token: 0x06000009 RID: 9 RVA: 0x00002590 File Offset: 0x00000790
        public static void Postfix(GameObject resource)
        {
            bool flag = Main.enabled && Main.settings.ShowHomeMassageAtTop && DateFile.instance.gameLine >= 10 && ActorMenu.instance != null && resource != null;

            if (flag)
            {
                int    num       = DateFile.instance.MianActorID();
                string text      = WindowManage.instance.informationName.text;
                char[] separator = new char[]
                {
                    ','
                };
                string[] array = resource.name.Split(separator);
                int      num2  = (array.Length <= 1) ? -1 : int.Parse(array[1]);
                bool     flag2 = num2 != -1;
                if (flag2)
                {
                    float[] taiwuIncome = ShowMeMore_WindowManage_WindowSwitch_Patch.GetTaiwuIncome();
                    float[] array2      = new float[2];
                    bool    flag3       = taiwuIncome[0] != array2[0];
                    if (flag3)
                    {
                        int num3 = num2;
                        int num4 = num3;
                        if (num4 != 5)
                        {
                            if (num4 == 6)
                            {
                                string   text2 = "";
                                int      taiwuCiTangPrestige = ShowMeMore_WindowManage_WindowSwitch_Patch.GetTaiwuCiTangPrestige();
                                int      allQuquPrestige     = DateFile.instance.GetAllQuquPrestige();
                                string[] values = new string[]
                                {
                                    text2,
                                    "\n",
                                    DateFile.instance.SetColoer(20007, "+ " + string.Format("{0:F1}", taiwuIncome[1]).ToString(), false),
                                    DateFile.instance.SetColoer(20011, " / 年(期望)", false),
                                    "来自",
                                    DateFile.instance.SetColoer(10002, "太吾村经营建筑", false),
                                    "\n"
                                };
                                text2 = string.Concat(values);
                                bool flag4 = taiwuCiTangPrestige != 0;
                                if (flag4)
                                {
                                    string[] values2 = new string[]
                                    {
                                        text2,
                                        DateFile.instance.SetColoer(20007, "+ " + taiwuCiTangPrestige.ToString() + " 威望", false),
                                        " / ",
                                        DateFile.instance.SetColoer(20008, "「立春」", false),
                                        "来自",
                                        DateFile.instance.SetColoer(20009, "太吾氏祠堂", false),
                                        "\n"
                                    };
                                    text2 = string.Concat(values2);
                                }
                                bool flag5 = allQuquPrestige > 0;
                                if (flag5)
                                {
                                    string[] values3 = new string[]
                                    {
                                        text2,
                                        DateFile.instance.SetColoer(20007, "+ " + allQuquPrestige.ToString() + " 威望", false),
                                        " / ",
                                        DateFile.instance.SetColoer(20008, "「立秋」", false),
                                        "来自",
                                        DateFile.instance.SetColoer(20009, "太吾村", false),
                                        "陈列的促织\n"
                                    };
                                    text2 = string.Concat(values3);
                                }
                                WindowManage.instance.informationMassage.text = WindowManage.instance.informationMassage.text + text2;
                            }
                        }
                        else
                        {
                            string   text3   = "";
                            string[] values4 = new string[]
                            {
                                text3,
                                "\n",
                                DateFile.instance.SetColoer(20008, "+ " + string.Format("{0:F1}", taiwuIncome[0]).ToString(), false),
                                DateFile.instance.SetColoer(20011, " / 年(期望)", false),
                                "来自",
                                DateFile.instance.SetColoer(10002, "太吾村建筑", false),
                                "\n"
                            };
                            text3 = string.Concat(values4);
                            WindowManage.instance.informationMassage.text = WindowManage.instance.informationMassage.text + text3;
                        }
                    }
                }
            }
        }
        // Token: 0x06000014 RID: 20 RVA: 0x000045E4 File Offset: 0x000027E4
        public static void Postfix(bool on, GameObject tips, ref Text ___itemMoneyText, ref Text ___itemLevelText, ref Text ___informationMassage, ref Text ___informationName, ref bool ___anTips, ref int ___tipsW, ref int ___tipsH)
        {
            bool flag = Main.enabled && (on && Main.enabled && ActorMenu.instance != null) && tips != null;

            if (flag)
            {
                int    id        = DateFile.instance.MianActorID();
                string text      = ___informationMassage.text;
                char[] separator = new char[]
                {
                    ','
                };
                string[] array = tips.name.Split(separator);
                int      num   = (array.Length <= 1) ? 0 : int.Parse(array[1]);
                bool     flag2 = num == 713 && Main.settings.ShowQiRate;
                if (flag2)
                {
                    int[] array2 = new int[]
                    {
                        20003,
                        20008,
                        20007,
                        20006,
                        20010,
                        20004
                    };
                    int[] actorAllTrueQi  = ShowMeMore_WindowManage_WindowSwitch_Patch.GetActorAllTrueQi(id, false);
                    int[] actorAllTrueQi2 = ShowMeMore_WindowManage_WindowSwitch_Patch.GetActorAllTrueQi(id, true);
                    text += DateFile.instance.SetColoer(10002, "\n【修习进度】\n", false);
                    for (int i = 0; i < actorAllTrueQi.Length; i++)
                    {
                        object[] array3 = new object[4];
                        array3[0] = WindowManage.instance.Dit();
                        char[] separator2 = new char[]
                        {
                            '|'
                        };
                        array3[1] = DateFile.instance.massageDate[2004][0].Split(separator2)[i];
                        array3[2] = DateFile.instance.SetColoer(array2[i], actorAllTrueQi[i].ToString(), false);
                        array3[3] = DateFile.instance.SetColoer(array2[i], actorAllTrueQi2[i].ToString(), false);
                        text     += string.Format("{0}{1}: {2} / {3}\n", array3);
                    }
                    ___informationMassage.text = text;
                }
                else
                {
                    bool flag3 = tips.tag == "PlaceMassage" && Main.settings.ShowHomeMassage;
                    if (flag3)
                    {
                        int  choosePartId  = WorldMapSystem.instance.choosePartId;
                        int  choosePlaceId = WorldMapSystem.instance.choosePlaceId;
                        bool flag4         = choosePartId == int.Parse(DateFile.instance.GetGangDate(16, 3)) && choosePlaceId == int.Parse(DateFile.instance.GetGangDate(16, 4));
                        if (flag4)
                        {
                            string  text2       = "";
                            float[] taiwuIncome = ShowMeMore_WindowManage_WindowSwitch_Patch.GetTaiwuIncome();
                            int[]   array4      = new int[]
                            {
                                ShowMeMore_WindowManage_WindowSwitch_Patch.GetPlaceMark(3605),
                                ShowMeMore_WindowManage_WindowSwitch_Patch.GetPlaceMark(3602),
                                ShowMeMore_WindowManage_WindowSwitch_Patch.GetPlaceMark(2030)
                            };
                            text2 = string.Concat(new string[]
                            {
                                text2,
                                "\n年均期望银钱收入:",
                                DateFile.instance.SetColoer(20008, string.Format("{0:F1}", taiwuIncome[0]).ToString(), false),
                                "\n年均期望威望收入:",
                                DateFile.instance.SetColoer(20007, string.Format("{0:F1}", taiwuIncome[1]).ToString(), false),
                                "\n\n当前已开通驿站地区平均影响率(不计低于50%的):\n文化正相关:",
                                DateFile.instance.SetColoer(20005, array4[0].ToString(), false),
                                "%\n安定正相关:",
                                DateFile.instance.SetColoer(20004, array4[1].ToString(), false),
                                "%\n安定负相关:",
                                DateFile.instance.SetColoer(20010, array4[2].ToString(), false),
                                "%\n"
                            });
                            WindowManage.instance.informationMassage.text = WindowManage.instance.informationMassage.text + text2;
                        }
                    }
                }
            }
        }