diff options
author | Supabad <Supabad.trinity@gmail.com> | 2011-12-16 12:55:02 +0100 |
---|---|---|
committer | Supabad <Supabad.trinity@gmail.com> | 2011-12-16 12:55:02 +0100 |
commit | 1af4d40be6d689a12ccf2fd1b45c7f950be0c3ac (patch) | |
tree | 0f6fa6246100c73bfb10baf7d7c02a59c4dde757 /src/server/authserver/Authentication | |
parent | d237134d901fa8762dd49460ec43794afd7d6327 (diff) |
4.x simplify Authhandler
Diffstat (limited to 'src/server/authserver/Authentication')
-rw-r--r-- | src/server/authserver/Authentication/AuthCodes.cpp | 17 | ||||
-rwxr-xr-x | src/server/authserver/Authentication/AuthCodes.h | 12 |
2 files changed, 5 insertions, 24 deletions
diff --git a/src/server/authserver/Authentication/AuthCodes.cpp b/src/server/authserver/Authentication/AuthCodes.cpp index 59969670921..36c4a355386 100644 --- a/src/server/authserver/Authentication/AuthCodes.cpp +++ b/src/server/authserver/Authentication/AuthCodes.cpp @@ -2,20 +2,9 @@ namespace AuthHelper { - bool IsPreBCAcceptedClientBuild(int build) + bool IsAcceptedBuild(int build) { - int accepted_versions[] = PRE_BC_ACCEPTED_CLIENT_BUILD; - - for (int i = 0; accepted_versions[i]; ++i) - if (build == accepted_versions[i]) - return true; - - return false; - } - - bool IsPostBCAcceptedClientBuild(int build) - { - int accepted_versions[] = POST_BC_ACCEPTED_CLIENT_BUILD; + static int accepted_versions[] = TRINITYCORE_ACCEPTED_CLIENT_BUILD; for (int i = 0; accepted_versions[i]; ++i) if (build == accepted_versions[i]) @@ -26,6 +15,6 @@ namespace AuthHelper bool IsAcceptedClientBuild(int build) { - return (IsPostBCAcceptedClientBuild(build) || IsPreBCAcceptedClientBuild(build)); + return (IsAcceptedBuild(build)); } }; diff --git a/src/server/authserver/Authentication/AuthCodes.h b/src/server/authserver/Authentication/AuthCodes.h index 88e2649ce7e..085326378da 100755 --- a/src/server/authserver/Authentication/AuthCodes.h +++ b/src/server/authserver/Authentication/AuthCodes.h @@ -65,21 +65,13 @@ enum LoginResult LOGIN_LOCKED_ENFORCED = 0x10, }; -#define POST_BC_ACCEPTED_CLIENT_BUILD {14545 ,12340, 11723, 11403, 11159, 10571, 10505, 10146, 9947, 8606, 0} -#define PRE_BC_ACCEPTED_CLIENT_BUILD {5875, 6005, 0} +#define TRINITYCORE_ACCEPTED_CLIENT_BUILD {14545, 14480, 14333, 14007, 0} -enum ExpansionFlags -{ - POST_BC_EXP_FLAG = 0x2, - PRE_BC_EXP_FLAG = 0x1, - NO_VALID_EXP_FLAG = 0x0 -}; namespace AuthHelper { bool IsAcceptedClientBuild(int build); - bool IsPostBCAcceptedClientBuild(int build); - bool IsPreBCAcceptedClientBuild(int build); + bool IsAcceptedBuild(int build); }; #endif |