From 7ce3eb956aa9fe768c94c5cec1a638860b73b999 Mon Sep 17 00:00:00 2001 From: a4plane Date: Tue, 27 May 2025 13:52:46 +0900 Subject: [PATCH] =?UTF-8?q?=EB=90=A8=20todo=20ui=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8F=84=20=EC=B4=88=EC=A7=91=EC=A4=91=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=9A=94=EC=86=8C=20=EB=82=A0=EB=A6=AC=EA=B8=B0=20=ED=95=84?= =?UTF-8?q?=EC=9A=94=EC=97=86=EB=8A=94=20=EC=9A=94=EC=86=8C=EC=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- psycastDontNeedPsyfocus/HarmonyPatch.cs | 40 +++++++++++++------------ 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/psycastDontNeedPsyfocus/HarmonyPatch.cs b/psycastDontNeedPsyfocus/HarmonyPatch.cs index 1bdc6f1..a109427 100644 --- a/psycastDontNeedPsyfocus/HarmonyPatch.cs +++ b/psycastDontNeedPsyfocus/HarmonyPatch.cs @@ -14,27 +14,29 @@ namespace psycastDontNeedPsyfocus harmony.PatchAll(Assembly.GetExecutingAssembly()); } } - - //패치안됨 postfix해서 값 긴빠이해서 수정해서 넘기게 해봐야할듯 - - //초집중 계산 부분 다른곳에 있는 듯 - - //패치할 후보들 - //abilityDef클래스에서 xml로 부터 값을 얻어서 값을 반환하는 psyfocusCost속성이 있음 코드가 매우 간결해서 인라인 처리됬을수도 아닐수도 - //FinalPsyfocusCost메서드에서 위의 속성을 참조함 그외에 따로 psyfocusCostfortarget을 참조하는데 이건 위의 저 속성 참조안하고 그냥 0을 반환함(???) - //abilityDef클래스에서 위의 속성을 참조하는데 코드보면 퍼센트 표시해서 ui출력으로 쓰는것 같으므로 무시 - //psycast클래스의 activate메서드에서 위의 속성을 참조해 시전가능한지 체크하고있음 => 이제보니까 제가 찾던 메서드 여기있네요 - //CanCast속성도 한번 보면 좋을듯? - - //def읽을때 focuscost부분을 0으로 고정시키게 해야겠음 아마 comp쪽에서 읽는듯 - [HarmonyPatch(typeof(Verb_CastPsycast), nameof(Verb_CastPsycast.ValidateTarget))] - public static class ValidateTarget_ValidateTarget_Patch + + //def에서 초집중 값 읽어오는 부분 패치해서 됨 + //todo ui에서 초집중 요소 날리기 + [HarmonyPatch] + class Patcher { - static void postfix(ref bool __result/*,ref Ability ability*/) + public static MethodBase TargetMethod() { - Log.Message("aaa"); - __result = true; + return typeof(AbilityDef).GetProperty(nameof(AbilityDef.PsyfocusCost)).GetGetMethod(); } + + public static void Postfix(ref float __result) + { + //Log.Message("qewqwe"); + __result = 0f; + } + //public static class ValidateTarget_ValidateTarget_Patch + //{ + // static void postfix(ref bool __result/*,ref Ability ability*/) + // { + // Log.Message("aaa"); + // __result = true; + // } + //} } - }