示例#1
0
 static void Postfix(SetGongFaIcon __instance, int gongFaId, int actorId)
 {
     if (!Main.enabled)
     {
         return;
     }
     //功法所属门派
     if (Main.settings.showGongFaGang)
     {
         string gangName = Changer.GetGangName(gongFaId);
         __instance.gongFaSizeText.text = $"{gangName}\n{__instance.gongFaSizeText.text}";
     }
     //根据修习进度与心得变更颜色增加区分度
     if (Main.settings.showGongFaProgress)
     {
         int level    = DateFile.instance.GetGongFaLevel(actorId, gongFaId, 0);
         int colorFix = level / 10;
         __instance.gongFaLevelText.text = DateFile.instance.SetColoer(20001 + colorFix, __instance.gongFaLevelText.text);
         int bookLevel = DateFile.instance.GetGongFaFLevel(actorId, gongFaId, false);
         __instance.gongFaBookLevelText.text = DateFile.instance.SetColoer(20001 + bookLevel, __instance.gongFaBookLevelText.text);
     }
 }