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); }
public void ReloadPluginIdMap() { PluginIdMap = new Dictionary <string, int>(); PluginIdMapReversed = new Dictionary <int, string>(); var i = -1; foreach (var mod in ModList.GetCurrent().OrderBy(x => x.Id)) { if (mod.Side == PluginSide.Both) { PluginIdMap[mod.Id] = i; PluginIdMapReversed[i] = mod.Id; i--; } } }