Fix CMSG_CHAR_ENUM

Note: VC80/VC90 need update =)

Signed-off-by: Salja <salja2012@hotmail.de>
This commit is contained in:
Salja 2012-08-02 19:51:44 +02:00 committed by Antz
parent 67c609457f
commit 3e5895f2f5
9 changed files with 3393 additions and 2845 deletions

View file

@ -247,12 +247,19 @@ World::AddSession_(WorldSession* s)
return;
}
WorldPacket packet(SMSG_AUTH_RESPONSE, 1 + 4 + 1 + 4 + 1);
packet << uint8(AUTH_OK);
WorldPacket packet(SMSG_AUTH_RESPONSE, 16);
packet.WriteBit(false);
packet.WriteBit(true);
packet << uint32(0); // Unknown - 4.3.2
packet << uint8(s->Expansion()); // 0 - normal, 1 - TBC, 2 - WotLK, 3 - CT. must be set in database manually for each account
packet << uint32(0); // BillingTimeRemaining
packet << uint8(0); // BillingPlanFlags
packet << uint8(s->Expansion()); // 0 - normal, 1 - TBC, 2 - WotLK, 3 - CT. Must be set in database manually for each account.
packet << uint32(0); // BillingTimeRested
packet << uint8(s->Expansion()); // 0 - normal, 1 - TBC, 2 - WotLK. Must be set in database manually for each account.
packet << uint8(0); // BillingPlanFlags
packet << uint8(AUTH_OK);
s->SendPacket(&packet);
s->SendAddonsInfo();
@ -295,17 +302,24 @@ int32 World::GetQueuedSessionPos(WorldSession* sess)
void World::AddQueuedSession(WorldSession* sess)
{
sess->SetInQueue(true);
m_QueuedSessions.push_back(sess);
m_QueuedSessions.push_back (sess);
// The 1st SMSG_AUTH_RESPONSE needs to contain other info too.
WorldPacket packet(SMSG_AUTH_RESPONSE, 1 + 4 + 1 + 4 + 1 + 4 + 1);
packet << uint8(AUTH_WAIT_QUEUE);
packet << uint32(0); // BillingTimeRemaining
packet << uint8(0); // BillingPlanFlags
packet << uint32(0); // BillingTimeRested
packet << uint8(sess->Expansion()); // 0 - normal, 1 - TBC, must be set in database manually for each account
packet << uint32(GetQueuedSessionPos(sess)); // position in queue
WorldPacket packet (SMSG_AUTH_RESPONSE, 21);
packet.WriteBit(true);
packet.WriteBit(true);
packet << uint8(0); // unk 3.3.0
packet << uint32(0); // Unknown - 4.3.2
packet << uint8(sess->Expansion()); // 0 - normal, 1 - TBC, 2 - WotLK, 3 - CT. must be set in database manually for each account
packet << uint32(0); // BillingTimeRemaining
packet << uint8(sess->Expansion()); // 0 - normal, 1 - TBC, 2 - WotLK, 3 - CT. Must be set in database manually for each account.
packet << uint32(0); // BillingTimeRested
packet << uint8(0); // BillingPlanFlags
packet << uint8(AUTH_WAIT_QUEUE);
packet << uint32(GetQueuedSessionPos(sess)); // position in queue
sess->SendPacket(&packet);
}