Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
AuthCodes.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#include "
AuthCodes.h
"
7
#include <cstddef>
8
9
namespace
AuthHelper
10
{
11
static
RealmBuildInfo
const
PostBcAcceptedClientBuilds
[] =
12
{
13
{18414, 5, 4, 8,
' '
},
// Last version MoP
14
{18291, 5, 4, 8,
' '
},
15
{18019, 5, 4, 7,
' '
},
16
{17956, 5, 4, 7,
' '
},
17
{17930, 5, 4, 7,
' '
},
18
{17898, 5, 4, 7,
' '
},
19
{17688, 5, 4, 2,
'a'
},
20
{17658, 5, 4, 2,
' '
},
21
{17538, 5, 4, 1,
' '
},
22
{17399, 5, 4, 0,
' '
},
23
{17128, 5, 3, 0,
' '
},
24
{16769, 5, 2, 0,
' '
},
25
{16357, 5, 1, 0,
'a'
},
26
{16309, 5, 1, 0,
' '
},
27
{16135, 5, 0, 5,
'b'
},
28
{15595, 4, 3, 4,
' '
},
29
{14545, 4, 2, 2,
' '
},
30
{13623, 4, 0, 6,
'a'
},
31
{12340, 3, 3, 5,
'a'
},
32
{11723, 3, 3, 3,
'a'
},
33
{11403, 3, 3, 2,
' '
},
34
{11159, 3, 3, 0,
'a'
},
35
{10505, 3, 2, 2,
'a'
},
36
{9947, 3, 1, 3,
' '
},
37
{8606, 2, 4, 3,
' '
},
38
{0, 0, 0, 0,
' '
}
// terminator
39
};
40
41
static
RealmBuildInfo
const
PreBcAcceptedClientBuilds
[] =
42
{
43
{6141, 1, 12, 3,
' '
},
44
{6005, 1, 12, 2,
' '
},
45
{5875, 1, 12, 1,
' '
},
46
{0, 0, 0, 0,
' '
}
// terminator
47
};
48
49
bool
IsPreBCAcceptedClientBuild
(
int
build)
50
{
51
for
(
int
i = 0;
PreBcAcceptedClientBuilds
[i].Build; ++i)
52
if
(
PreBcAcceptedClientBuilds
[i].Build == build)
53
return
true
;
54
55
return
false
;
56
}
57
58
bool
IsPostBCAcceptedClientBuild
(
int
build)
59
{
60
for
(
int
i = 0;
PostBcAcceptedClientBuilds
[i].Build; ++i)
61
if
(
PostBcAcceptedClientBuilds
[i].Build == build)
62
return
true
;
63
64
return
false
;
65
}
66
67
bool
IsAcceptedClientBuild
(
int
build)
68
{
69
return
(
IsPostBCAcceptedClientBuild
(build) ||
IsPreBCAcceptedClientBuild
(build));
70
}
71
72
RealmBuildInfo
const
*
GetBuildInfo
(
int
build)
73
{
74
for
(
int
i = 0;
PostBcAcceptedClientBuilds
[i].Build; ++i)
75
if
(
PostBcAcceptedClientBuilds
[i].Build == build)
76
return
&
PostBcAcceptedClientBuilds
[i];
77
78
for
(
int
i = 0;
PreBcAcceptedClientBuilds
[i].Build; ++i)
79
if
(
PreBcAcceptedClientBuilds
[i].Build == build)
80
return
&
PreBcAcceptedClientBuilds
[i];
81
82
return
NULL;
83
}
84
};
AuthCodes.h
AuthHelper
Definition
AuthCodes.cpp:10
AuthHelper::IsAcceptedClientBuild
bool IsAcceptedClientBuild(int build)
Definition
AuthCodes.cpp:67
AuthHelper::GetBuildInfo
RealmBuildInfo const * GetBuildInfo(int build)
Definition
AuthCodes.cpp:72
AuthHelper::PostBcAcceptedClientBuilds
static RealmBuildInfo const PostBcAcceptedClientBuilds[]
Definition
AuthCodes.cpp:11
AuthHelper::IsPreBCAcceptedClientBuild
bool IsPreBCAcceptedClientBuild(int build)
Definition
AuthCodes.cpp:49
AuthHelper::IsPostBCAcceptedClientBuild
bool IsPostBCAcceptedClientBuild(int build)
Definition
AuthCodes.cpp:58
AuthHelper::PreBcAcceptedClientBuilds
static RealmBuildInfo const PreBcAcceptedClientBuilds[]
Definition
AuthCodes.cpp:41
RealmBuildInfo
Definition
AuthCodes.h:91
src
server
authserver
Authentication
AuthCodes.cpp
Generated on
for Project SkyFire Core by
1.17.0