aboutsummaryrefslogtreecommitdiff
path: root/src/server/authserver/Authentication/AuthCodes.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2012-08-28 01:11:03 +0200
committerShauren <shauren.trinity@gmail.com>2012-08-28 01:11:03 +0200
commitad8010730cefcf18e27c21a47be47b57b1f6bf40 (patch)
tree7a211e95892ebed82f03e90e167f235e46569081 /src/server/authserver/Authentication/AuthCodes.cpp
parentc4f011f3324bc90631472bf2aa1b89590742909a (diff)
Core/Authserver: Improved realmlist for multiple realms with different versions, idea from MaNGOS and allow 4.0.6a, 4.2.2 and 4.3.4 clients to use the authserver (no world connections)
Diffstat (limited to 'src/server/authserver/Authentication/AuthCodes.cpp')
-rw-r--r--src/server/authserver/Authentication/AuthCodes.cpp47
1 files changed, 39 insertions, 8 deletions
diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp
index ace18e7b45c..6ca1050d153 100644
--- a/src/server/authserver/Authentication/AuthCodes.cpp
+++ b/src/server/authserver/Authentication/AuthCodes.cpp
@@ -19,12 +19,32 @@
namespace AuthHelper
{
- bool IsPreBCAcceptedClientBuild(int build)
+ static RealmBuildInfo const PostBcAcceptedClientBuilds[] =
+ {
+ {15595, 4, 3, 4, ' '},
+ {14545, 4, 2, 2, ' '},
+ {13623, 4, 0, 6, 'a'},
+ {12340, 3, 3, 5, 'a'},
+ {11723, 3, 3, 3, 'a'},
+ {11403, 3, 3, 2, ' '},
+ {11159, 3, 3, 0, 'a'},
+ {10505, 3, 2, 2, 'a'},
+ {9947, 3, 1, 3, ' '},
+ {8606, 2, 4, 3, ' '},
+ {0, 0, 0, 0, ' '} // terminator
+ };
+
+ static RealmBuildInfo const PreBcAcceptedClientBuilds[] =
{
- int accepted_versions[] = PRE_BC_ACCEPTED_CLIENT_BUILD;
+ {6005, 1, 12, 2, ' '},
+ {5875, 1, 12, 1, ' '},
+ {0, 0, 0, 0, ' '} // terminator
+ };
- for (int i = 0; accepted_versions[i]; ++i)
- if (build == accepted_versions[i])
+ bool IsPreBCAcceptedClientBuild(int build)
+ {
+ for (int i = 0; PreBcAcceptedClientBuilds[i].Build; ++i)
+ if (PreBcAcceptedClientBuilds[i].Build == build)
return true;
return false;
@@ -32,10 +52,8 @@ namespace AuthHelper
bool IsPostBCAcceptedClientBuild(int build)
{
- int accepted_versions[] = POST_BC_ACCEPTED_CLIENT_BUILD;
-
- for (int i = 0; accepted_versions[i]; ++i)
- if (build == accepted_versions[i])
+ for (int i = 0; PostBcAcceptedClientBuilds[i].Build; ++i)
+ if (PostBcAcceptedClientBuilds[i].Build == build)
return true;
return false;
@@ -45,4 +63,17 @@ namespace AuthHelper
{
return (IsPostBCAcceptedClientBuild(build) || IsPreBCAcceptedClientBuild(build));
}
+
+ RealmBuildInfo const* GetBuildInfo(int build)
+ {
+ for (int i = 0; PostBcAcceptedClientBuilds[i].Build; ++i)
+ if (PostBcAcceptedClientBuilds[i].Build == build)
+ return &PostBcAcceptedClientBuilds[i];
+
+ for (int i = 0; PreBcAcceptedClientBuilds[i].Build; ++i)
+ if (PreBcAcceptedClientBuilds[i].Build == build)
+ return &PreBcAcceptedClientBuilds[i];
+
+ return NULL;
+ }
};