Skip to content

Commit

Permalink
Not a static field anymore (#1498)
Browse files Browse the repository at this point in the history
  • Loading branch information
iopietro authored Jan 13, 2023
1 parent 818ec81 commit 4a652aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Exiled.Events/Patches/Events/Map/ExplodingFlashGrenade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
new CodeInstruction[]
{
// list = ListPool<ReferenceHub>.Pool.Get();
new(OpCodes.Ldsfld, Field(typeof(ListPool<ReferenceHub>), nameof(ListPool<ReferenceHub>.Pool))),
new(OpCodes.Call, PropertyGetter(typeof(ListPool<ReferenceHub>), nameof(ListPool<ReferenceHub>.Pool))),
new(OpCodes.Callvirt, Method(typeof(ListPool<ReferenceHub>), nameof(ListPool<ReferenceHub>.Pool.Get))),
new(OpCodes.Stloc, list.LocalIndex),
});
Expand Down Expand Up @@ -113,7 +113,7 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
new(OpCodes.Call, Method(typeof(ExplodingFlashGrenade), nameof(ProcessPlayers))),

// ListPool<ReferenceHub>.Pool.Return(list);
new(OpCodes.Ldsfld, Field(typeof(ListPool<ReferenceHub>), nameof(ListPool<ReferenceHub>.Pool))),
new(OpCodes.Call, PropertyGetter(typeof(ListPool<ReferenceHub>), nameof(ListPool<ReferenceHub>.Pool))),
new(OpCodes.Ldloc, list.LocalIndex),
new(OpCodes.Callvirt, Method(typeof(ListPool<ReferenceHub>), nameof(ListPool<ReferenceHub>.Pool.Return))),

Expand Down

0 comments on commit 4a652aa

Please sign in to comment.