Click or drag to resize

HPluginCreateHPatchOperation Method (MethodBase, MethodInfo, HPatchLocation, Int32)

Creates a new patch operation using the supplied target method, stub method, and patch location.

Namespace:  com.tiberiumfusion.ttplugins.HarmonyPlugins
Assembly:  TTPlugins (in TTPlugins.dll) Version: 1.2.0.1 (1.2.0.1)
Syntax
protected void CreateHPatchOperation(
	MethodBase targetMethod,
	MethodInfo stubMethod,
	HPatchLocation patchLocation,
	int patchPriority = -1
)

Parameters

targetMethod
Type: System.ReflectionMethodBase
The target method (in Terraria) that will be patched.
stubMethod
Type: System.ReflectionMethodInfo
The stub method (in your plugin) that will be either prepended onto, appended onto, or transpiled with the target method. Must be a static method!
patchLocation
Type: com.tiberiumfusion.ttplugins.HarmonyPluginsHPatchLocation
Whether the stub method will be prepended as a prefix, appended as a postfix, or applied as a transpiler to the target method.
patchPriority (Optional)
Type: SystemInt32
The priority of this patch, as used by Harmony to order multiple patches on the same method. Patches with higher numbers go first. Set to -1 to use default priority (typically = 400).
See Also