Update Hooks.cs

This commit is contained in:
Jadis
2022-08-29 12:58:00 +03:00
committed by GitHub
parent 0f05ceb5b8
commit 1bd7799380

View File

@@ -5,6 +5,20 @@ namespace DevourClient.Hooks
{ {
public class Hooks public class Hooks
{ {
[HarmonyPatch(typeof(NolanBehaviour), "OnAttributeUpdateValue")]
static class NolanBehaviour_UV
{
[HarmonyPrefix]
static void Prefix(ref Opsive.UltimateCharacterController.Traits.Attribute attribute)
{
if (Load.unlimitedUV && attribute.m_Name == "Battery")
{
attribute.m_Value = 100.0f;
return;
}
}
}
[HarmonyPatch(typeof(RankHelpers))] [HarmonyPatch(typeof(RankHelpers))]
[HarmonyPatch(nameof(RankHelpers.CalculateExpGain))] //annotation boiler plate to tell Harmony what to patch. Refer to docs. [HarmonyPatch(nameof(RankHelpers.CalculateExpGain))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
static class RankHelpers_CalculateExpGain static class RankHelpers_CalculateExpGain