private static void AddNfo(byte packetid, PacketVersionEntry clientpacketversion) { if (!m_PacketNfo.ContainsKey(packetid)) { m_PacketNfo.Add(packetid, new PacketVersions(packetid)); } m_PacketNfo[packetid].Add(clientpacketversion); }
/// <summary> /// Get the Version Info for this packet, for the given client version /// </summary> /// <param name="version">The version of the client</param> /// <returns>The packet version for the supplied client version, or null if the id is invalid for the given client version</returns> private PacketVersionEntry this[ClientVersion version] { get { PacketVersionEntry toReturn = null; foreach (ClientVersion v in Versions.Keys) { if (v <= version) { toReturn = Versions[v]; } else { break; } } return(toReturn); } }
private void Add(PacketVersionEntry clientpacketversion) { Versions[clientpacketversion.Version] = clientpacketversion; }