Files
MMOKitchen/Patches/PlayerManagerPatch.cs
T
Lachlan Leone 35d3fec3de v0.3.0
2024-04-01 08:12:01 +11:00

18 lines
444 B
C#

using HarmonyLib;
using Kitchen;
using KitchenLib.Utils;
using System.Reflection;
namespace MMOKitchen.Patches
{
[HarmonyPatch(typeof(PlayerManager), "GetLeastUnusedIndex")]
public class PlayerManagerPatch
{
static void Prefix(PlayerManager __instance)
{
FieldInfo info = ReflectionUtils.GetField<PlayerManager>("MaxPlayers");
info.SetValue(__instance, Mod.MaxPlayers);
}
}
}