aboutsummaryrefslogtreecommitdiff
path: root/src/server/trinityrealm/AuthCodes.cpp
blob: 812949e0823d7100927a22daed2f1ebe8551eeab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include "AuthCodes.h"

namespace AuthHelper
{

bool IsPreBCAcceptedClientBuild(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;
    for (int i = 0; accepted_versions[i]; ++i)
    {
        if (build == accepted_versions[i])
        {
            return true;
        }
    }
    return false;
}

bool IsAcceptedClientBuild(int build)
{
    return (IsPostBCAcceptedClientBuild(build) || IsPreBCAcceptedClientBuild(build));
}

};