Skip to content

Commit

Permalink
Fix IL ERROR (#2166)
Browse files Browse the repository at this point in the history
* Fix ILError

* Fix Skill Issue from someone else

- /* */ will need to be removed when the other method will be deleted
  • Loading branch information
louis1706 authored Oct 24, 2023
1 parent 7e3da46 commit 1407b75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Exiled.API/Features/Toys/Primitive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static Primitive Create(PrimitiveType primitiveType = PrimitiveType.Spher
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <param name="color">The color of the <see cref="Primitive"/>.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true, Color? color = null)
public static Primitive Create(Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/)
{
Primitive primitive = new(Object.Instantiate(ToysHelper.PrimitiveBaseObject));

Expand All @@ -134,7 +134,7 @@ public static Primitive Create(Vector3? position = null, Vector3? rotation = nul
/// <param name="spawn">Whether or not the <see cref="Primitive"/> should be initially spawned.</param>
/// <param name="color">The color of the <see cref="Primitive"/>.</param>
/// <returns>The new <see cref="Primitive"/>.</returns>
public static Primitive Create(PrimitiveType primitiveType = PrimitiveType.Sphere, Vector3? position = null, Vector3? rotation = null, Vector3? scale = null, bool spawn = true, Color? color = null)
public static Primitive Create(PrimitiveType primitiveType /*= PrimitiveType.Sphere*/, Vector3? position /*= null*/, Vector3? rotation /*= null*/, Vector3? scale /*= null*/, bool spawn /*= true*/, Color? color /*= null*/)
{
Primitive primitive = new(Object.Instantiate(ToysHelper.PrimitiveBaseObject));

Expand Down
4 changes: 2 additions & 2 deletions Exiled.Events/Patches/Events/Player/Kicking.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
new(OpCodes.Call, Method(typeof(Player), nameof(Player.Get), new[] { typeof(ReferenceHub) })),

// reason
new(OpCodes.Ldarg_3),
new(OpCodes.Ldarg_2),

// kick start message
new(OpCodes.Ldstr, newInstructions.Find(x => x.opcode == OpCodes.Ldstr).operand),
Expand All @@ -71,7 +71,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi

new(OpCodes.Ldloc_S, ev.LocalIndex),
new(OpCodes.Callvirt, PropertyGetter(typeof(BanningEventArgs), nameof(BanningEventArgs.Reason))),
new(OpCodes.Starg_S, 3),
new(OpCodes.Starg_S, 2),

new(OpCodes.Ldloc_S, ev.LocalIndex),
new(OpCodes.Callvirt, PropertyGetter(typeof(BanningEventArgs), nameof(BanningEventArgs.Target))),
Expand Down

0 comments on commit 1407b75

Please sign in to comment.