| r17 vs r18 | ||
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | ||
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | ||
| 14 | ||
| 15 | ||
| 16 | ||
| 17 | ||
| 18 | ||
| 19 | ||
| 20 | ||
| 21 | ||
| 22 | ||
| 23 | ||
| 24 | ||
| 25 | ||
| 26 | ||
| 27 | ||
| 28 | ||
| 29 | ||
| 30 | ||
| 31 | ||
| 32 | ||
| 33 | ||
| 34 | ||
| 35 | ||
| 36 | ||
| 37 | ||
| 38 | ||
| 39 | ||
| 40 | ||
| 41 | ||
| 42 | ||
| 43 | ||
| 44 | ||
| 45 | ||
| 46 | ||
| 47 | ||
| 48 | ||
| 49 | ||
| 50 | ||
| 51 | ||
| 52 | ||
| 53 | ||
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | ||
| 58 | ||
| 59 | ||
| 60 | ||
| 61 | ||
| 62 | ||
| 63 | ||
| 64 | ||
| 65 | ||
| 66 | ||
| 67 | ||
| 68 | ||
| 69 | ||
| 70 | ||
| 71 | ||
| 72 | ||
| 73 | ||
| 74 | ||
| 75 | ||
| 76 | ||
| 77 | ||
| 78 | ||
| 79 | ||
| 80 | ||
| 81 | ||
| 82 | ||
| 83 | ||
| 84 | ||
| 85 | ||
| 86 | ||
| 87 | ||
| 88 | ||
| 89 | ||
| 90 | ||
| 91 | ||
| 92 | ||
| 93 | ||
| 94 | ||
| 95 | ||
| 96 | ||
| 97 | ||
| 98 | ||
| 1 | public static void UIOriginCardSlot_SetData(UIOriginCardSlot __instance, DiceCardItemModel cardmodel, Image[] ___img_Frames, Image ___img_Artwork, ref Color ___colorFrame, ref Color ___colorLineardodge) | |
| 2 | { | |
| 3 | bool flag = cardmodel != null; | |
| 4 | if (flag) | |
| 5 | { | |
| 6 | bool flag2 = cardmodel.GetID().packageId == YisangInitializer.pid; | |
| 7 | if (flag2) | |
| 8 | { | |
| 9 | ___colorFrame = new Color(1f, 1f, 1f, 1f); | |
| 10 | ___colorLineardodge = new Color(1f, 1f, 1f, 0f); | |
| 11 | bool flag3 = YisangInitializer.uiinit2; | |
| 12 | if (flag3) | |
| 13 | { | |
| 14 | YisangInitializer.uiinit2 = false; | |
| 15 | YisangInitializer.sprites2.Add(___img_Frames[0].sprite); | |
| 16 | } | |
| 17 | bool flag4 = YisangInitializer.sprites2.Count == 1; | |
| 18 | if (flag4) | |
| 19 | { | |
| 20 | bool flag5 = __instance is UIDetailCardSlot; | |
| 21 | if (flag5) | |
| 22 | { | |
| 23 | Image component = __instance.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent<Image>(); | |
| 24 | YisangInitializer.sprites2.Add(component.sprite); | |
| 25 | } | |
| 26 | } | |
| 27 | ___img_Frames[0].sprite = YisangInitializer.ArtWorks["LeftPage_Base"]; | |
| 28 | ImgTranslator imgTranslator = ___img_Frames[0].gameObject.GetComponent<ImgTranslator>(); | |
| 29 | bool flag6 = imgTranslator == null; | |
| 30 | if (flag6) | |
| 31 | { | |
| 32 | imgTranslator = ___img_Frames[0].gameObject.AddComponent<ImgTranslator>(); | |
| 33 | } | |
| 34 | imgTranslator.image = ___img_Frames[0]; | |
| 35 | imgTranslator.active = true; | |
| 36 | imgTranslator.SpineUpdate("Spine2", "Front", 1f, 0.2f); | |
| 37 | bool flag7 = __instance is UIDetailCardSlot; | |
| 38 | if (flag7) | |
| 39 | { | |
| 40 | Image component2 = __instance.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent<Image>(); | |
| 41 | component2.sprite = YisangInitializer.ArtWorks["RightPage_Base"]; | |
| 42 | ImgTranslator imgTranslator2 = component2.gameObject.GetComponent<ImgTranslator>(); | |
| 43 | bool flag8 = imgTranslator2 == null; | |
| 44 | if (flag8) | |
| 45 | { | |
| 46 | imgTranslator2 = component2.gameObject.AddComponent<ImgTranslator>(); | |
| 47 | } | |
| 48 | imgTranslator2.image = component2; | |
| 49 | imgTranslator2.active = true; | |
| 50 | imgTranslator2.SpineUpdate("Spine", new List<string> | |
| 51 | { | |
| 52 | "Back_Aquila", | |
| 53 | "Back_Gemini", | |
| 54 | "Back_the Plough" | |
| 55 | }, 1f, 0.2f); | |
| 56 | } | |
| 57 | __instance.GetType().GetMethod("SetFrameColor", AccessTools.all).Invoke(__instance, new object[] | |
| 58 | { | |
| 59 | ___colorFrame | |
| 60 | }); | |
| 61 | __instance.GetType().GetMethod("SetLinearDodgeColor", AccessTools.all, null, new Type[] | |
| 62 | { | |
| 63 | typeof(Color) | |
| 64 | }, null).Invoke(__instance, new object[] | |
| 65 | { | |
| 66 | ___colorLineardodge | |
| 67 | }); | |
| 68 | } | |
| 69 | else | |
| 70 | { | |
| 71 | bool flag9 = !YisangInitializer.uiinit2; | |
| 72 | if (flag9) | |
| 73 | { | |
| 74 | ___img_Frames[0].sprite = YisangInitializer.sprites2[0]; | |
| 75 | ImgTranslator component3 = ___img_Frames[0].gameObject.GetComponent<ImgTranslator>(); | |
| 76 | bool flag10 = component3 != null; | |
| 77 | if (flag10) | |
| 78 | { | |
| 79 | component3.active = false; | |
| 80 | } | |
| 81 | bool flag11 = __instance is UIDetailCardSlot && YisangInitializer.sprites2.Count > 1; | |
| 82 | if (flag11) | |
| 83 | { | |
| 84 | Image component4 = __instance.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent<Image>(); | |
| 85 | component4.sprite = YisangInitializer.sprites2[1]; | |
| 86 | ImgTranslator component5 = component4.gameObject.GetComponent<ImgTranslator>(); | |
| 87 | bool flag12 = component5 != null; | |
| 88 | if (flag12) | |
| 89 | { | |
| 90 | component5.active = false; | |
| 91 | } | |
| 92 | } | |
| 93 | } | |
| 94 | } | |
| 95 | } | |
| 96 | } | |
| 99 | 97 | public class CardFrameInit : ModInitializer |
| 100 | 98 | { |
| 101 | 99 | public override void OnInitializeMod() |
| ... | ... |