diff --git a/EXILED/Exiled.Events/EventArgs/Player/EscapedEventArgs.cs b/EXILED/Exiled.Events/EventArgs/Player/EscapedEventArgs.cs index aaaaf1ffb..0dcecd1b8 100644 --- a/EXILED/Exiled.Events/EventArgs/Player/EscapedEventArgs.cs +++ b/EXILED/Exiled.Events/EventArgs/Player/EscapedEventArgs.cs @@ -7,9 +7,13 @@ namespace Exiled.Events.EventArgs.Player { + using System; + using Exiled.API.Enums; using Exiled.API.Features; using Exiled.Events.EventArgs.Interfaces; + using PlayerRoles; + using Respawning; /// /// Contains all information after player has escaped. @@ -25,6 +29,10 @@ public EscapedEventArgs(Player player, EscapeScenario escapeScenario) { Player = player; EscapeScenario = escapeScenario; + Team = EscapeScenario is EscapeScenario.Scientist or EscapeScenario.CuffedClassD ? SpawnableTeamType.NineTailedFox : SpawnableTeamType.ChaosInsurgency; + Tickets = Team == SpawnableTeamType.ChaosInsurgency ? 4 : 3; + OldRole = EscapeScenario is EscapeScenario.Scientist or EscapeScenario.CuffedScientist ? RoleTypeId.Scientist : RoleTypeId.ClassD; + EscapeTime = (int)Math.Ceiling(player.Role.ActiveTime.TotalSeconds); } /// @@ -34,5 +42,25 @@ public EscapedEventArgs(Player player, EscapeScenario escapeScenario) /// Gets the type of escape. /// public EscapeScenario EscapeScenario { get; } + + /// + /// Gets the that gained tickets for this escape. + /// + public SpawnableTeamType Team { get; } + + /// + /// Gets the amount of tickets gained for this escape. + /// + public int Tickets { get; } + + /// + /// Gets the previous role for this player. + /// + public RoleTypeId OldRole { get; } + + /// + /// Gets the time in seconds since round started. + /// + public int EscapeTime { get; } } } \ No newline at end of file diff --git a/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs b/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs index 019f20f45..80142a639 100644 --- a/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs +++ b/EXILED/Exiled.Events/Patches/Events/Player/EscapingAndEscaped.cs @@ -104,15 +104,12 @@ private static IEnumerable Transpiler(IEnumerable