됨
todo ui에서도 초집중관련 요소 날리기 필요없는 요소임
This commit is contained in:
@@ -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;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user