aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/AuthHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-03-15 20:09:48 +0100
committerShauren <shauren.trinity@gmail.com>2013-03-15 20:09:48 +0100
commite58e05d9d5da894447b81ded17c3b8fd9f4820a8 (patch)
treee41b9ed702da6dc1063e8bddd0f270c2d47f0d7b /src/server/game/Handlers/AuthHandler.cpp
parent51b9e6d2c947d2151af09d7a25af45ff75b0d530 (diff)
parent11846f5990f5af421ff2fc087925245f61b4ac84 (diff)
Merge branch '4.3.4' of github.com:TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/game/Handlers/AuthHandler.cpp')
-rw-r--r--src/server/game/Handlers/AuthHandler.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/server/game/Handlers/AuthHandler.cpp b/src/server/game/Handlers/AuthHandler.cpp
index 880937c2c39..7e1c12afe89 100644
--- a/src/server/game/Handlers/AuthHandler.cpp
+++ b/src/server/game/Handlers/AuthHandler.cpp
@@ -19,20 +19,28 @@
#include "WorldSession.h"
#include "WorldPacket.h"
-void WorldSession::SendAuthResponse(uint8 code, bool shortForm, uint32 queuePos)
+void WorldSession::SendAuthResponse(uint8 code, bool queued, uint32 queuePos)
{
- WorldPacket packet(SMSG_AUTH_RESPONSE, 1 + 4 + 1 + 4 + 1 + (shortForm ? 0 : (4 + 1)));
- packet << uint8(code);
+ WorldPacket packet(SMSG_AUTH_RESPONSE, 1 /*bits*/ + 4 + 1 + 4 + 1 + 4 + 1 + 1 + (queued ? 4 : 0));
+ packet.WriteBit(queued);
+ if (queued)
+ packet.WriteBit(0);
+
+ packet.WriteBit(1); // has account info
+
+ packet.FlushBits();
+
+ // account info
packet << uint32(0); // BillingTimeRemaining
- packet << uint8(0); // BillingPlanFlags
+ packet << uint8(Expansion()); // 0 - normal, 1 - TBC, 2 - WOTLK, 3 - CATA; must be set in database manually for each account
+ packet << uint32(0);
+ packet << uint8(Expansion()); // Unknown, these two show the same
packet << uint32(0); // BillingTimeRested
- packet << uint8(Expansion()); // 0 - normal, 1 - TBC, 2 - WOTLK, must be set in database manually for each account
+ packet << uint8(0); // BillingPlanFlags
- if (!shortForm)
- {
+ packet << uint8(code);
+ if (queued)
packet << uint32(queuePos); // Queue position
- packet << uint8(0); // Realm has a free character migration - bool
- }
SendPacket(&packet);
}