Skip to content

Commit

Permalink
Fixed constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxWorn3365 committed Aug 1, 2024
1 parent 2e9f87f commit f3b17ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions EXILED/Exiled.Events/EventArgs/Scp079/RecontainingEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ public class RecontainingEventArgs : IDeniableEvent
/// <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)
/// <param name="recontainer">The player that triggered the SCP-079 recontaining event.</param>
public RecontainingEventArgs(ReferenceHub recontainer)
{
Recontainer = Player.Get(recontainer.LastAttacker);
Recontainer = Player.Get(recontainer);
}

/// <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)
/// <param name="recontainer">The <see cref="BreakableWindow"/> istance.</param>
public RecontainingEventArgs(BreakableWindow recontainer)
: this(recontainer.LastAttacker.Hub)
{
Recontainer = Player.Get(recontainer);
}

/// <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 @@ -42,7 +42,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))[0]),
new(OpCodes.Newobj, GetDeclaredConstructors(typeof(RecontainingEventArgs))[1]),
new(OpCodes.Starg_S, ev.LocalIndex),

// Call event
Expand Down

0 comments on commit f3b17ea

Please sign in to comment.