diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 847f39c54d..b25d277f45 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -3497,6 +3497,21 @@ public void AddAhp(float amount, float limit = 75f, float decay = 1.2f, float ef .ServerAddProcess(amount, limit, decay, efficacy, sustain, persistant); } + /// + /// Adds a new to the player. + /// + /// The delay before regeneration starts (in seconds). + /// Health points regenerated per second. + /// Total duration of the regeneration (in seconds). + /// How fast the regeneration progresses (default is 1.0). + /// Multiplier for HP amount being regenerated (default is 1.0). + public void AddRegeneration(float starttime = 0f, float rate = 1f, float duration = 1f, float speedMultiplier = 1f, float healthPointsMultiplier = 1f) + { + AnimationCurve regenCurve = AnimationCurve.Constant(starttime, duration, rate); + UsableItemsController.GetHandler(ReferenceHub) + .ActiveRegenerations.Add(new RegenerationProcess(regenCurve, speedMultiplier, healthPointsMultiplier)); + } + /// /// Reconnects the player to the server. Can be used to redirect them to another server on a different port but same IP. ///