Example #1
0
 private static void Postfix(WindowManage __instance, int skillId, int skillTyp, int levelTyp, int actorId, Toggle toggle, ref Text ___informationMassage, ref string ___baseGongFaMassage)
 {
     if (Main.enabled && skillTyp != 0 && skillTyp == 1)
     {
         actorId = ((actorId != -1) ? actorId : ((!ActorMenu.instance.actorMenu.activeInHierarchy) ? DateFile.instance.MianActorID() : ActorMenu.instance.actorId));
         int num        = (levelTyp != -1 && levelTyp != 0) ? 10 : ((skillId != 0) ? DateFile.instance.GetGongFaFLevel(actorId, skillId, false) : 0);
         int gongFaFTyp = DateFile.instance.GetGongFaFTyp(actorId, skillId);
         int num2       = int.Parse(DateFile.instance.gongFaDate[skillId][103]);
         if (num2 > 0)
         {
             int num3 = int.Parse(DateFile.instance.gongFaDate[skillId][104]);
             WindowManage_ShowGongFaMassage_Patch.str.Clear();
             WindowManage_ShowGongFaMassage_Patch.str.Append(___baseGongFaMassage);
             if (num < 5 || gongFaFTyp == 2)
             {
                 WindowManage_ShowGongFaMassage_Patch.str.Append(DateFile.instance.SetColoer(20004, "  如果正练\n", false)).Append(__instance.SetMassageTitle(8007, 3, 11, 20010)).Append(__instance.Dit()).Append(DateFile.instance.SetColoer(20002, DateFile.instance.gongFaFPowerDate[num2][99] + ((DateFile.instance.gongFaFPowerDate[num2][98] == "") ? "" : DateFile.instance.massageDate[5001][4]) + DateFile.instance.gongFaFPowerDate[num2][98] + DateFile.instance.massageDate[5001][5], false)).Append("\n\n");
                 WindowManage_ShowGongFaMassage_Patch.str.Append(DateFile.instance.SetColoer(20004, "  如果逆练\n", false)).Append(__instance.SetMassageTitle(8007, 3, 12, 20005)).Append(__instance.Dit()).Append(DateFile.instance.SetColoer(20002, DateFile.instance.gongFaFPowerDate[num3][99] + ((DateFile.instance.gongFaFPowerDate[num3][98] == "") ? "" : DateFile.instance.massageDate[5001][4]) + DateFile.instance.gongFaFPowerDate[num3][98] + DateFile.instance.massageDate[5001][5], false)).Append("\n\n");
             }
             else
             {
                 bool flag = gongFaFTyp == 0;
                 int  key  = flag ? num3 : num2;
                 WindowManage_ShowGongFaMassage_Patch.str.Append(DateFile.instance.SetColoer(20004, "  如果" + (flag ? "逆" : "正") + "练\n", false)).Append(__instance.SetMassageTitle(8007, 3, flag ? 12 : 11, flag ? 20010 : 20005)).Append(__instance.Dit()).Append(DateFile.instance.SetColoer(20002, DateFile.instance.gongFaFPowerDate[key][99] + ((DateFile.instance.gongFaFPowerDate[key][98] == "") ? "" : DateFile.instance.massageDate[5001][4]) + DateFile.instance.gongFaFPowerDate[key][98] + DateFile.instance.massageDate[5001][5], false)).Append("\n\n");
             }
             Text   text = ___informationMassage;
             string text2;
             ___baseGongFaMassage = (text2 = WindowManage_ShowGongFaMassage_Patch.str.ToString());
             text.text            = text2;
         }
     }
 }
Example #2
0
 private static void Postfix(WindowManage __instance, int skillId, int skillTyp, int levelTyp, int actorId, Toggle toggle, ref Text ___informationMassage, ref string ___baseGongFaMassage)
 {
     if (Main.enabled && skillTyp != 0 && skillTyp == 1)
     {
         int.Parse(DateFile.instance.gongFaDate[skillId][103]);//Get_activeInHierarchy
         int    actorId2   = (actorId != -1) ? actorId : (!ActorMenu.instance.actorMenu.activeInHierarchy ? DateFile.instance.MianActorID() : ActorMenu.instance.acotrId);
         int    num        = (levelTyp != -1 && levelTyp != 0) ? 10 : ((skillId != 0) ? DateFile.instance.GetGongFaFLevel(actorId2, skillId) : 0);
         string str        = ___baseGongFaMassage;
         string text       = "";
         string str2       = "";
         int    gongFaFTyp = DateFile.instance.GetGongFaFTyp(actorId2, skillId);
         int    num2       = int.Parse(DateFile.instance.gongFaDate[skillId][103 + ((gongFaFTyp != 0) ? 1 : 0)]);
         int    key        = num2 + ((gongFaFTyp == 0) ? 1 : (-1)) * 5000;
         if (num2 > 0)
         {
             int num3 = (gongFaFTyp != 0) ? 1 : 0;
             str2 = string.Format("{0}{1}{2}\n\n", __instance.SetMassageTitle(8007, 3, 11 + num3, (num3 != 0) ? 20010 : 20005), __instance.Dit(), DateFile.instance.SetColoer(20002, string.Format("{0}{1}{2}{3}", DateFile.instance.gongFaFPowerDate[num2][99], (!(DateFile.instance.gongFaFPowerDate[num2][98] != "")) ? "" : DateFile.instance.massageDate[5001][4], DateFile.instance.gongFaFPowerDate[num2][98], DateFile.instance.massageDate[5001][5])));
             str2 = DateFile.instance.SetColoer(20004, string.Format("  如果{0}练\n", (num3 == 0) ? "正" : "逆")) + str2;
             text = string.Format("{0}{1}{2}\n\n", __instance.SetMassageTitle(8007, 3, 11 + Math.Abs(num3 - 1), (num3 != 0) ? 20005 : 20010), __instance.Dit(), DateFile.instance.SetColoer(20002, string.Format("{0}{1}\n{2}", new object[3]
             {
                 DateFile.instance.gongFaFPowerDate[key][99],
                 (!(DateFile.instance.gongFaFPowerDate[key][98] != "") || Math.Abs(num3 - 1) == 0) ? "" : DateFile.instance.massageDate[5001][4],
                 DateFile.instance.gongFaFPowerDate[key][98]
             })));
             text = DateFile.instance.SetColoer(20004, string.Format("  如果{0}练\n", (num3 == 0) ? "逆" : "正")) + text;
         }
         str = (___baseGongFaMassage = ((num < 5 || gongFaFTyp == 2) ? (str + str2 + text) : (str + text)));
         ___informationMassage.text = str;
     }
 }