mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[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:
parent
e246b49e55
commit
10de01c6f7
5 changed files with 29 additions and 21 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue