18 lines
444 B
C#
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);
|
|
}
|
|
}
|
|
}
|