Beispiel #1
0
            public static void Postfix(ref Il2CppStructArray <byte> __result)
            {
                ModList.Update();

                var handshake = MessageWriter.Get(SendOption.Reliable);

                handshake.Write(__result);

                ModdedHandshakeC2S.Serialize(
                    handshake,
                    ModList.Current.Count
                    );

                __result = handshake.ToByteArray(false);
                handshake.Recycle();
            }
            public static bool Prefix(out Il2CppStructArray <byte> __result)
            {
                var handshake = MessageWriter.Get(SendOption.Reliable);

                ModdedHandshakeC2S.Serialize(
                    handshake,
                    Constants.GetBroadcastVersionBytes(),
                    SaveManager.PlayerName,
                    ModList.GetCurrent()
                    );

                __result = handshake.ToByteArray(false);
                handshake.Recycle();

                return(false);
            }