@jadis0x added Unlimited UV

Update Hooks.cs
This commit was merged in pull request #16.
This commit is contained in:
ALittlePatate
2022-08-29 12:00:09 +02:00
committed by GitHub

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