[9169] Move accaptable builds check/list preparing to functions.

Maybe DBCStore.* not best place for its but we not have src/game local file for common functions...
This commit is contained in:
VladimirMangos 2010-01-13 09:02:37 +03:00
parent e246b49e55
commit 10de01c6f7
5 changed files with 29 additions and 21 deletions

View file

@ -42,6 +42,7 @@
#include "WorldSession.h"
#include "WorldSocketMgr.h"
#include "Log.h"
#include "DBCStores.h"
#if defined( __GNUC__ )
#pragma pack(1)
@ -761,18 +762,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
clientSeed);
// Check the version of client trying to connect
bool valid_version = false;
int accepted_versions[] = EXPECTED_MANGOSD_CLIENT_BUILD;
for(int i = 0; accepted_versions[i]; ++i)
{
if(ClientBuild == accepted_versions[i])
{
valid_version = true;
break;
}
}
if(!valid_version)
if(!IsAcceptableClientBuild(ClientBuild))
{
packet.Initialize (SMSG_AUTH_RESPONSE, 1);
packet << uint8 (AUTH_VERSION_MISMATCH);