From 15d85229fae45405557aa6b706681dabaf854ed5 Mon Sep 17 00:00:00 2001 From: Chaz Brown Date: Sat, 19 Sep 2009 00:51:47 -0400 Subject: Replace useless code with more useful code. --HG-- branch : trunk --- src/trinityrealm/AuthSocket.cpp | 90 ++++++++++------------------------------- 1 file changed, 21 insertions(+), 69 deletions(-) (limited to 'src/trinityrealm/AuthSocket.cpp') diff --git a/src/trinityrealm/AuthSocket.cpp b/src/trinityrealm/AuthSocket.cpp index d4acaafac15..90a2a27d5b9 100644 --- a/src/trinityrealm/AuthSocket.cpp +++ b/src/trinityrealm/AuthSocket.cpp @@ -539,24 +539,9 @@ bool AuthSocket::_HandleLogonChallenge() return true; } -bool valid_pre_version = false; -bool valid_tbc_version = false; -bool valid_wlk_version = false; /// Logon Proof command handler bool AuthSocket::_HandleLogonProof() { - for (int a = 0; a < 3; ++a) - { - accepted_versions[0][a] = 5875, 6005, 0; - } - for (int a = 0; a < 3; ++a) - { - accepted_versions[1][a] = 8606, 0, 0; - } - for (int a = 0; a < 3; ++a) - { - accepted_versions[2][a] = 10146, 9947, 0; - } DEBUG_LOG("Entering _HandleLogonProof"); ///- Read the packet if (ibuf.GetLength() < sizeof(sAuthLogonProof_C)) @@ -565,34 +550,19 @@ bool AuthSocket::_HandleLogonProof() ibuf.Read((char *)&lp, sizeof(sAuthLogonProof_C)); ///- Check if the client has one of the expected version numbers - //int accepted_versions[] = EXPECTED_TRINITY_CLIENT_BUILD; - for (int i = 0; accepted_versions[0][i]; ++i) - { - if (_build == accepted_versions[0][i]) - { - valid_pre_version = true; - break; - } - } - for (int i = 0; accepted_versions[1][i]; ++i) - { - if (_build == accepted_versions[1][i]) - { - valid_tbc_version = true; - break; - } - } - for (int i = 0; accepted_versions[2][i]; ++i) + bool valid_version = false; + int accepted_versions[] = EXPECTED_TRINITY_CLIENT_BUILD; + for (int i = 0; accepted_versions[i]; ++i) { - if (_build == accepted_versions[2][i]) + if (_build == accepted_versions[i]) { - valid_wlk_version = true; + valid_version = true; break; } } ///