Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
joker-119 committed Oct 3, 2023
1 parent 78477ec commit c22c0c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Exiled.Events/Patches/Fixes/NpcPlayerCountFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructi
// list[s] = newString;
new(OpCodes.Callvirt, Method(typeof(List<string>), "set_Item")),

// nop with a label to skip straight to basegame code if our list doesn't have a line with players= in it.
new CodeInstruction(OpCodes.Nop).WithLabels(skip2),
new(OpCodes.Call, PropertyGetter(typeof(ListPool<string>), nameof(ListPool<string>.Pool))),
// ListPool<string>.Pool.Return(list);
new CodeInstruction(OpCodes.Call, PropertyGetter(typeof(ListPool<string>), nameof(ListPool<string>.Pool))).WithLabels(skip2),
new(OpCodes.Ldloc, list),
new(OpCodes.Callvirt, Method(typeof(ListPool<string>), nameof(ListPool<string>.Return))),
});
Expand Down

0 comments on commit c22c0c3

Please sign in to comment.