aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/AuthHandler.cpp
diff options
context:
space:
mode:
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);
}