diff --git a/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs index 71cd25905..47b568d66 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/SavingByAntiScp207EventArgs.cs @@ -31,8 +31,6 @@ public SavingByAntiScp207EventArgs(ReferenceHub player, float damageAmount, Dama Handler = handler; HitboxType = hitboxType; DamageAmount = damageAmount; - DamageMultiplier = (Player.Health + Player.ArtificialHealth - AntiScp207.DeathSaveHealth) / damageAmount; - IsAllowed = true; } /// @@ -46,14 +44,9 @@ public SavingByAntiScp207EventArgs(ReferenceHub player, float damageAmount, Dama public float DamageAmount { get; } /// - /// Gets or sets the multiplier for the damage that is applied when the event is allowed. + /// Gets or sets the health amount the player will have after being saved from death. /// - public float DamageMultiplier { get; set; } - - /// - /// Gets or sets the multiplier for the damage that if event denied. - /// - public float DeniedDamageMultiplier { get; set; } = 1; + public float DeathSaveHealth { get; set; } = AntiScp207.DeathSaveHealth; /// /// Gets the damage handler that describes the incoming damage. @@ -69,6 +62,6 @@ public SavingByAntiScp207EventArgs(ReferenceHub player, float damageAmount, Dama /// Gets or sets a value indicating whether the event is allowed. /// If set to false, the event will be denied. /// - public bool IsAllowed { get; set; } + public bool IsAllowed { get; set; } = true; } } diff --git a/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs b/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs index ac4157b7c..daa9f0c6f 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/SavingByAntiScp207.cs @@ -31,19 +31,19 @@ private static IEnumerable Transpiler(IEnumerable newInstructions = ListPool.Pool.Get(instructions); + Label skipLabel = generator.DefineLabel(); LocalBuilder ev = generator.DeclareLocal(typeof(SavingByAntiScp207EventArgs)); int index = newInstructions.FindLastIndex(x => x.opcode == OpCodes.Ldloc_1); - Label skipLabel = generator.DefineLabel(); - Label gotoEventLabel = newInstructions[index].labels[0]; + List