Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix IL ERROR #2166

Merged
merged 2 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading