-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPatch template.cs
43 lines (36 loc) · 1.11 KB
/
Patch template.cs
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
[HarmonyPatch(typeof(ClassName), nameof(ClassName.MethodName), new Type[] { typeof(GearItem), typeof(float), typeof(int), typeof(GearItem) })]
public static class ClassName_MethodName
{
public static bool Prefix(ClassName __instance)
{
}
public static void Postfix(ClassName __instance)
{
}
}
[HarmonyPatch(typeof(ClassName), nameof(ClassName.MethodName), new Type[] { typeof(GearItem), typeof(float), typeof(int), typeof(GearItem) })]
public static class ClassName_MethodName
{
[HarmonyPrefix]
public static bool Before(ClassName __instance)
{
}
[HarmonyPostfix]
public static void After(ClassName __instance)
{
}
}
[HarmonyPatch(typeof(ClassName))]
[HarmonyPatch(nameof(ClassName.MethodName))]
[HarmonyPatch([typeof(GearItem), typeof(float), typeof(int), typeof(GearItem)], [ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Normal, ArgumentType.Ref])]
public static class ClassName_MethodName
{
[HarmonyPrefix]
public static bool Before(ClassName __instance)
{
}
[HarmonyPostfix]
public static void After(ClassName __instance)
{
}
}