static public void SeedPacket(ref NetworkStream ns, ref Client.Version ver) { int seed = ReadInt32(ns); ver.Major = ReadInt32(ns); ver.Minor = ReadInt32(ns); ver.Revision = ReadInt32(ns); ver.Patch = ReadInt32(ns); Console.WriteLine("Seed: 0x{0:X}", seed); Console.WriteLine("Client Version {0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Revision, ver.Patch); }
public bool CompareVersionEqual(Client.Version compver) { if ((client_version.Major == compver.Major) && (client_version.Minor == compver.Minor) && (client_version.Revision == compver.Revision) && (client_version.Patch == compver.Patch)) { return(true); } return(false); }
public bool CompareVersion(Client.Version compver) { if (client_version.Major > compver.Major) { return(true); } else if (client_version.Major < compver.Major) { return(false); } else if (client_version.Minor > compver.Minor) { return(true); } else if (client_version.Minor < compver.Minor) { return(false); } else if (client_version.Revision > compver.Revision) { return(true); } else if (client_version.Revision < compver.Revision) { return(false); } else if (client_version.Patch > compver.Patch) { return(true); } else if (client_version.Patch < compver.Patch) { return(false); } return(true); }