Example #1
0
    public void Deserialize(byte[] data)
    {
        var tmpPacket = new NetworkPacketManager(data);

        if (tmpPacket.GetTagPacket() != TagPacket.ServerInfo)
        {
            Logger.Log("WRONG PACKET TYPE IN 'PacketServerInfo'", Logger.LOG_TYPE.ERROR, "packet");
        }
        else
        {
            this.ServerName    = tmpPacket.GetString();
            this.MaxPlayers    = tmpPacket.GetInt32();
            this.ClientVersion = tmpPacket.GetString();
        }
    }
Example #2
0
    public void Deserialize(byte[] data)
    {
        var tmpPacket = new NetworkPacketManager(data);

        tmpPacket.GetTagPacket();
        this.ID      = tmpPacket.GetInt32();
        this.Message = tmpPacket.GetString();
    }