Skip to content

Commit

Permalink
Merge pull request #357 from Mixone-FinallyHere/patch-3
Browse files Browse the repository at this point in the history
Repair guardianSE stuff
  • Loading branch information
nxPublic authored Mar 13, 2021
2 parents aed708a + 6c401b1 commit b5077d1
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions ValheimPlus/GameClasses/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -502,21 +502,24 @@ public static void MessageNoop(Character _0, MessageHud.MessageType _1, string _
m_repair_count += repaired;
}
}

/// <summary>
/// Configures guardian buff duration and cooldown
/// </summary>
[HarmonyPatch(typeof(Player), "SetGuardianPower")]
public static class Player_SetGuardianPower_Patch
}

/// <summary>
/// Configures guardian buff duration and cooldown
/// </summary>
[HarmonyPatch(typeof(Player), "SetGuardianPower")]
public static class Player_SetGuardianPower_Patch
{
private static void Postfix(ref Player __instance)
{
private static void Postfix(ref Player __instance)
if (Configuration.Current.Player.IsEnabled)
{
if (Configuration.Current.Player.IsEnabled)
if(__instance.m_guardianSE)
{
__instance.m_guardianSE.m_ttl = Configuration.Current.Player.guardianBuffDuration;
__instance.m_guardianSE.m_cooldown = Configuration.Current.Player.guardianBuffCooldown;
}
}
}
}
}
}

0 comments on commit b5077d1

Please sign in to comment.