From 1af4d40be6d689a12ccf2fd1b45c7f950be0c3ac Mon Sep 17 00:00:00 2001 From: Supabad Date: Fri, 16 Dec 2011 12:55:02 +0100 Subject: 4.x simplify Authhandler --- src/server/authserver/Authentication/AuthCodes.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'src/server/authserver/Authentication/AuthCodes.cpp') 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)); } }; -- cgit v1.2.3