[주의!] 문서의 이전 버전(에 수정)을 보고 있습니다. 최신 버전으로 이동
이 사용자는 특수 권한을 가지고 있습니다.
public static void UIOriginCardSlot_SetData(UIOriginCardSlot __instance, DiceCardItemModel cardmodel, Image[] ___img_Frames, Image ___img_Artwork, ref Color ___colorFrame, ref Color ___colorLineardodge)
		{
			bool flag = cardmodel != null;
			if (flag)
			{
				bool flag2 = cardmodel.GetID().packageId == YisangInitializer.pid;
				if (flag2)
				{
					___colorFrame = new Color(1f, 1f, 1f, 1f);
					___colorLineardodge = new Color(1f, 1f, 1f, 0f);
					bool flag3 = YisangInitializer.uiinit2;
					if (flag3)
					{
						YisangInitializer.uiinit2 = false;
						YisangInitializer.sprites2.Add(___img_Frames[0].sprite);
					}
					bool flag4 = YisangInitializer.sprites2.Count == 1;
					if (flag4)
					{
						bool flag5 = __instance is UIDetailCardSlot;
						if (flag5)
						{
							Image component = __instance.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent<Image>();
							YisangInitializer.sprites2.Add(component.sprite);
						}
					}
					___img_Frames[0].sprite = YisangInitializer.ArtWorks["LeftPage_Base"];
					ImgTranslator imgTranslator = ___img_Frames[0].gameObject.GetComponent<ImgTranslator>();
					bool flag6 = imgTranslator == null;
					if (flag6)
					{
						imgTranslator = ___img_Frames[0].gameObject.AddComponent<ImgTranslator>();
					}
					imgTranslator.image = ___img_Frames[0];
					imgTranslator.active = true;
					imgTranslator.SpineUpdate("Spine2", "Front", 1f, 0.2f);
					bool flag7 = __instance is UIDetailCardSlot;
					if (flag7)
					{
						Image component2 = __instance.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent<Image>();
						component2.sprite = YisangInitializer.ArtWorks["RightPage_Base"];
						ImgTranslator imgTranslator2 = component2.gameObject.GetComponent<ImgTranslator>();
						bool flag8 = imgTranslator2 == null;
						if (flag8)
						{
							imgTranslator2 = component2.gameObject.AddComponent<ImgTranslator>();
						}
						imgTranslator2.image = component2;
						imgTranslator2.active = true;
						imgTranslator2.SpineUpdate("Spine", new List<string>
						{
							"Back_Aquila",
							"Back_Gemini",
							"Back_the Plough"
						}, 1f, 0.2f);
					}
					__instance.GetType().GetMethod("SetFrameColor", AccessTools.all).Invoke(__instance, new object[]
					{
						___colorFrame
					});
					__instance.GetType().GetMethod("SetLinearDodgeColor", AccessTools.all, null, new Type[]
					{
						typeof(Color)
					}, null).Invoke(__instance, new object[]
					{
						___colorLineardodge
					});
				}
				else
				{
					bool flag9 = !YisangInitializer.uiinit2;
					if (flag9)
					{
						___img_Frames[0].sprite = YisangInitializer.sprites2[0];
						ImgTranslator component3 = ___img_Frames[0].gameObject.GetComponent<ImgTranslator>();
						bool flag10 = component3 != null;
						if (flag10)
						{
							component3.active = false;
						}
						bool flag11 = __instance is UIDetailCardSlot && YisangInitializer.sprites2.Count > 1;
						if (flag11)
						{
							Image component4 = __instance.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent<Image>();
							component4.sprite = YisangInitializer.sprites2[1];
							ImgTranslator component5 = component4.gameObject.GetComponent<ImgTranslator>();
							bool flag12 = component5 != null;
							if (flag12)
							{
								component5.active = false;
							}
						}
					}
				}
			}
		}

public class CardFrameInit : ModInitializer
    {
        public override void OnInitializeMod()
        {
            Harmony harmony = new Harmony("LOR.CardFrameChangeMOD");
            MethodInfo method = typeof(CardFrameInit).GetMethod("SetCard");
            harmony.Patch(typeof(BattleDiceCardUI).GetMethod("SetCard", AccessTools.all),  null, new HarmonyMethod(method),null);
        }
        public static void SetCard(BattleDiceCardModel cardModel, BattleDiceCardUI __instance, ref Color ___colorFrame, ref Color ___colorLineardodge, params BattleDiceCardUI.Option[] options)
        {
            ___colorFrame = Color.black;
            ___colorLineardodge = Color.black;
            __instance.GetType().GetMethod("SetFrameColor", AccessTools.all).Invoke(__instance, new System.Object[] {___colorFrame});
            __instance.GetType().GetMethod("SetLinearDodgeColor", AccessTools.all).Invoke(__instance, new System.Object[] { ___colorLineardodge });
        }
    }