Beispiel #1
0
        public static bool Prefix(CharacterClassManager __instance)
        {
            if (EventPlugin.SetRandomRolesPatchDisable)
            {
                return(true);
            }

            try
            {
                if (__instance.isLocalPlayer && __instance.isServer)
                {
                    __instance.RunSmartClassPicker();
                }

                if (NetworkServer.active)
                {
                    Timing.RunCoroutine(__instance.MakeSureToSetHP(), Segment.FixedUpdate);
                }

                return(false);
            }
            catch (Exception exception)
            {
                Log.Error($"SetRandomRolesPatch error: {exception}");
                return(true);
            }
        }