2011-12-19 23:07:19 -05:00
|
|
|
/*
|
2012-01-01 00:32:13 +01:00
|
|
|
* Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/>
|
2011-12-19 23:07:19 -05:00
|
|
|
*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
|
* Free Software Foundation; either version 2 of the License, or (at your
|
|
|
|
|
* option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
|
* more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
*/
|
|
|
|
|
|
2009-12-20 22:30:32 -07:00
|
|
|
#include "AuthCodes.h"
|
|
|
|
|
|
|
|
|
|
namespace AuthHelper
|
|
|
|
|
{
|
2010-12-27 09:02:02 -08:00
|
|
|
bool IsPreBCAcceptedClientBuild(int build)
|
|
|
|
|
{
|
|
|
|
|
int accepted_versions[] = PRE_BC_ACCEPTED_CLIENT_BUILD;
|
2009-12-20 22:30:32 -07:00
|
|
|
|
2010-12-27 09:02:02 -08:00
|
|
|
for (int i = 0; accepted_versions[i]; ++i)
|
|
|
|
|
if (build == accepted_versions[i])
|
|
|
|
|
return true;
|
2010-12-04 11:19:41 -08:00
|
|
|
|
2010-12-27 09:02:02 -08:00
|
|
|
return false;
|
|
|
|
|
}
|
2009-12-20 22:30:32 -07:00
|
|
|
|
2010-12-27 09:02:02 -08:00
|
|
|
bool IsPostBCAcceptedClientBuild(int build)
|
|
|
|
|
{
|
|
|
|
|
int accepted_versions[] = POST_BC_ACCEPTED_CLIENT_BUILD;
|
2010-12-04 11:19:41 -08:00
|
|
|
|
2010-12-27 09:02:02 -08:00
|
|
|
for (int i = 0; accepted_versions[i]; ++i)
|
|
|
|
|
if (build == accepted_versions[i])
|
|
|
|
|
return true;
|
2010-12-04 11:19:41 -08:00
|
|
|
|
2010-12-27 09:02:02 -08:00
|
|
|
return false;
|
|
|
|
|
}
|
2009-12-20 22:30:32 -07:00
|
|
|
|
2010-12-27 09:02:02 -08:00
|
|
|
bool IsAcceptedClientBuild(int build)
|
|
|
|
|
{
|
|
|
|
|
return (IsPostBCAcceptedClientBuild(build) || IsPreBCAcceptedClientBuild(build));
|
|
|
|
|
}
|
2009-12-20 22:30:32 -07:00
|
|
|
};
|