Skip to content

Commit

Permalink
Removed "useless" constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxWorn3365 committed Aug 1, 2024
1 parent 711d32e commit d2fd8be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
11 changes: 1 addition & 10 deletions EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,13 @@ namespace Exiled.Events.EventArgs.Scp079
/// </summary>
public class RecontainingEventArgs : IDeniableEvent
{
/// <summary>
/// Initializes a new instance of the <see cref="RecontainingEventArgs" /> class.
/// </summary>
/// <param name="recontainer">The player that triggered the SCP-079 recontaining event.</param>
public RecontainingEventArgs(ReferenceHub recontainer)
{
Recontainer = Player.Get(recontainer);
}

/// <summary>
/// Initializes a new instance of the <see cref="RecontainingEventArgs" /> class.
/// </summary>
/// <param name="recontainer">The <see cref="BreakableWindow"/> istance.</param>
public RecontainingEventArgs(BreakableWindow recontainer)
: this(recontainer.LastAttacker.Hub)
{
Recontainer = Player.Get(recontainer?.LastAttacker.Hub);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion EXILED/Exiled.Events/Patches/Events/Scp079/Recontaining.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
// RecontainingEventArgs ev = new(ReferenceHub "attacker")
new(OpCodes.Ldarg_0),
new(OpCodes.Ldfld, PropertyGetter(typeof(Scp079Recontainer), nameof(Scp079Recontainer._activatorGlass))),
new(OpCodes.Newobj, GetDeclaredConstructors(typeof(RecontainingEventArgs))[1]),
new(OpCodes.Newobj, GetDeclaredConstructors(typeof(RecontainingEventArgs))[0]),
new(OpCodes.Starg_S, ev.LocalIndex),

// Call event
Expand Down

0 comments on commit d2fd8be

Please sign in to comment.