aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Server
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2014-06-08 15:34:24 +0200
committerShauren <shauren.trinity@gmail.com>2014-06-08 15:34:24 +0200
commit9f69eda67f7fad50553f8d569851a5005437e677 (patch)
treeb918ef48a31a1970aad165808be344cf4744ef26 /src/server/authserver/Server
parent05c0524bf3d97ba29496fa13e93acd3b8d7d37a4 (diff)
Core/Battle.net: Additional checks
* Force grunt login for versions < 15595 * Force bn login if supported and game account is linked to bn account
Diffstat (limited to 'src/server/authserver/Server')
-rw-r--r--src/server/authserver/Server/AuthSocket.cpp4
-rw-r--r--src/server/authserver/Server/BattlenetSocket.cpp8
2 files changed, 9 insertions, 3 deletions
diff --git a/src/server/authserver/Server/AuthSocket.cpp b/src/server/authserver/Server/AuthSocket.cpp
index 32140f76ba4..7ca49b03b56 100644
--- a/src/server/authserver/Server/AuthSocket.cpp
+++ b/src/server/authserver/Server/AuthSocket.cpp
@@ -480,7 +480,9 @@ bool AuthSocket::_HandleLogonChallenge()
unk3.SetRand(16 * 8);
// Fill the response packet with the result
- if (AuthHelper::IsAcceptedClientBuild(_build))
+ if (fields[9].GetUInt32() && AuthHelper::IsBuildSupportingBattlenet(_build))
+ pkt << uint8(WOW_FAIL_USE_BATTLENET);
+ else if (AuthHelper::IsAcceptedClientBuild(_build))
pkt << uint8(WOW_SUCCESS);
else
pkt << uint8(WOW_FAIL_VERSION_INVALID);
diff --git a/src/server/authserver/Server/BattlenetSocket.cpp b/src/server/authserver/Server/BattlenetSocket.cpp
index eb8dc1158f0..4ee3c8e9b3d 100644
--- a/src/server/authserver/Server/BattlenetSocket.cpp
+++ b/src/server/authserver/Server/BattlenetSocket.cpp
@@ -107,7 +107,6 @@ void Battlenet::Socket::_SetVSFields(std::string const& pstr)
bool Battlenet::Socket::HandleAuthChallenge(PacketHeader& header, BitStream& packet)
{
-
// Verify that this IP is not in the ip_banned table
LoginDatabase.Execute(LoginDatabase.GetPreparedStatement(LOGIN_DEL_EXPIRED_IP_BANS));
@@ -160,7 +159,12 @@ bool Battlenet::Socket::HandleAuthChallenge(PacketHeader& header, BitStream& pac
else if (!sBattlenetMgr->HasPlatform(component.Platform))
complete.SetAuthResult(AUTH_INVALID_OS);
else
- complete.SetAuthResult(AUTH_REGION_BAD_VERSION);
+ {
+ if (component.Program != "WoW" || AuthHelper::IsBuildSupportingBattlenet(component.Build))
+ complete.SetAuthResult(AUTH_REGION_BAD_VERSION);
+ else
+ complete.SetAuthResult(AUTH_USE_GRUNT_LOGON);
+ }
Send(complete);
return true;