[9010] Implement realmd support realms for different client versions

* Supported 1.12.1, 1.12.2, 2.4.3, 3.2.2a in same time as relams in same realmlist
* mangosd by self check correct for it client build and reject all incorrect cases
* realmd know from mangosd what builds supported each realm and
  if realm not support it then in relamlist for specific client this relam show as offline.
  Not need any manual settings for this.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Laizerox 2009-12-17 01:06:52 +03:00 committed by VladimirMangos
parent 41b0b88674
commit 022524c1bb
13 changed files with 239 additions and 73 deletions

View file

@ -745,7 +745,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
BigNumber K;
// Read the content of the packet
recvPacket >> BuiltNumberClient; // for now no use
recvPacket >> BuiltNumberClient;
recvPacket >> unk2;
recvPacket >> account;
recvPacket >> unk3;
@ -760,6 +760,29 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
unk3,
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(BuiltNumberClient == accepted_versions[i])
{
valid_version = true;
break;
}
}
if(!valid_version)
{
packet.Initialize (SMSG_AUTH_RESPONSE, 1);
packet << uint8 (AUTH_VERSION_MISMATCH);
SendPacket (packet);
sLog.outError ("WorldSocket::HandleAuthSession: Sent Auth Response (version mismatch).");
return -1;
}
// Get the account information from the realmd database
std::string safe_account = account; // Duplicate, else will screw the SHA hash verification below
loginDatabase.escape_string (safe_account);