Beispiel #1
0
        protected Version GetClientBuildInfo(uint clientBuild)
        {
            var latest = m_suggestedProtocol = ProtocolManager.FindWrapper("WowLatest");

            if (clientBuild != 0)
            {
                int index = s_clientBuildInfos.BinaryIndexOf(info => info.ClientBuild.CompareTo(clientBuild));
                if (index >= 0)
                {
                    var info = s_clientBuildInfos[index];

                    var protocol = ProtocolManager.FindWrapper("Wow" + info.LatestBuild);
                    if (protocol != null)
                    {
                        m_suggestedProtocol = protocol;
                    }

                    return(info.ClientVersion);
                }
            }

            return(new Version(0, 0, 0, (int)clientBuild));
        }