TrinityCore
Loading...
Searching...
No Matches
AuthHandler.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#include "
WorldSession.h
"
19
#include "
ClientConfigPackets.h
"
20
21
void
WorldSession::SendAuthResponse
(
uint8
code,
bool
shortForm,
uint32
queuePos)
22
{
23
WorldPacket
packet(
SMSG_AUTH_RESPONSE
, 1 + 4 + 1 + 4 + 1 + (4 + 1));
24
packet <<
uint8
(code);
25
packet <<
uint32
(0);
// BillingTimeRemaining
26
packet <<
uint8
(0);
// BillingPlanFlags
27
packet <<
uint32
(0);
// BillingTimeRested
28
packet <<
uint8
(
Expansion
());
// 0 - normal, 1 - TBC, 2 - WOTLK, must be set in database manually for each account
29
30
if
(!shortForm)
31
{
32
packet <<
uint32
(queuePos);
// Queue position
33
packet <<
uint8
(0);
// Realm has a free character migration - bool
34
}
35
36
SendPacket
(&packet);
37
}
38
39
void
WorldSession::SendClientCacheVersion
(
uint32
version)
40
{
41
WorldPackets::ClientConfig::ClientCacheVersion
cache;
42
cache.
CacheVersion
= version;
43
44
SendPacket
(cache.
Write
());
45
}
ClientConfigPackets.h
uint8
uint8_t uint8
Definition
Define.h:135
uint32
uint32_t uint32
Definition
Define.h:133
WorldSession.h
WorldPacket
Definition
WorldPacket.h:27
WorldPackets::ClientConfig::ClientCacheVersion
Definition
ClientConfigPackets.h:45
WorldPackets::ClientConfig::ClientCacheVersion::Write
WorldPacket const * Write() override
Definition
ClientConfigPackets.cpp:81
WorldPackets::ClientConfig::ClientCacheVersion::CacheVersion
uint32 CacheVersion
Definition
ClientConfigPackets.h:51
WorldSession::Expansion
uint8 Expansion() const
Definition
WorldSession.h:489
WorldSession::SendClientCacheVersion
void SendClientCacheVersion(uint32 version)
Definition
AuthHandler.cpp:39
WorldSession::SendPacket
void SendPacket(WorldPacket const *packet)
Send a packet to the client.
Definition
WorldSession.cpp:204
WorldSession::SendAuthResponse
void SendAuthResponse(uint8 code, bool shortForm, uint32 queuePos=0)
Definition
AuthHandler.cpp:21
SMSG_AUTH_RESPONSE
@ SMSG_AUTH_RESPONSE
Definition
Opcodes.h:523
server
game
Handlers
AuthHandler.cpp
Generated on Sun May 10 2026 02:30:16 for TrinityCore by
1.9.8