示例#1
0
        static void Postfix(WindowManage __instance, bool on, GameObject tips)
        {
            if (!Main.enabled || !Main.settings.mergeIcon)
            {
                return;
            }
            bool flag = false;

            if (tips == null)
            {
                __instance.anTips = flag;
            }
            else
            {
                if (on)
                {
                    flag = true;
                    int      num   = DateFile.instance.MianActorID();
                    string[] array = tips.name.Split(new char[]
                    {
                        ','
                    });
                    Changer changer = new Changer();

                    int num2 = (array.Length <= 1) ? 0 : int.Parse(array[1]);
                    if ((num2 == 634 || num2 == 635) && StartBattle.instance.startBattleWindow.activeSelf && StartBattle.instance.enemyTeamId == 4)
                    {
                        flag = false;
                    }
                    DateFile df  = DateFile.instance;
                    string   tag = tips.tag;
                    switch (tag)
                    {
                    case "TrunEventIcon":
                    {
                        int num27 = int.Parse(DateFile.instance.trunEventDate[num2][1]);
                        __instance.informationName.text = DateFile.instance.trunEventDate[num2][0];
                        switch (num27)
                        {
                        case 10:
                            string[] placeArray = changer.getPlaceIds().Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
                            string   placeNames = "";
                            for (int i = 0; i < placeArray.Length; i++)
                            {
                                string pid   = placeArray[i];
                                string pName = DateFile.instance.partWorldMapDate[int.Parse(pid)][0];
                                placeNames = (placeNames == "") ? pName : placeNames + "、" + pName;
                            }
                            string pre  = df.trunEventDate[num2][99].Split(new char[] { '|' })[0];
                            string post = df.trunEventDate[num2][99].Split(new char[] { '|' })[1];
                            __instance.informationMassage.text = string.Format("{0}{1}{2}\n", pre, df.SetColoer(10002, placeNames), post);
                            break;
                        }
                    }
                    break;
                    }
                }
            }
        }