Esempio n. 1
0
void WorldSocket::Authenticate()
{
	WorldSession * pSession = mSession;
	ASSERT(pAuthenticationPacket);
	mQueued = false;

	if(!pSession)
		return;

	if(pSession->HasFlag(ACCOUNT_FLAG_XPACK_02))
		OutPacket(SMSG_AUTH_RESPONSE, 11, "\x0C\x30\x78\x00\x00\x00\x00\x00\x00\x00\x02");
	else if(pSession->HasFlag(ACCOUNT_FLAG_XPACK_01))
		OutPacket(SMSG_AUTH_RESPONSE, 11, "\x0C\x30\x78\x00\x00\x00\x00\x00\x00\x00\x01");
	else
		OutPacket(SMSG_AUTH_RESPONSE, 11, "\x0C\x30\x78\x00\x00\x00\x00\x00\x00\x00\x00");

	sAddonMgr.SendAddonInfoPacket(pAuthenticationPacket, (uint32)pAuthenticationPacket->rpos(), pSession);
	pSession->_latency = _latency;

	g_bufferPool.Deallocate(pAuthenticationPacket);
	pAuthenticationPacket = NULL;

	sWorld.AddSession(pSession);
	sWorld.AddGlobalSession(pSession);
}
Esempio n. 2
0
void WorldSocket::Authenticate()
{
    WorldSession * pSession = mSession;
    ASSERT(pAuthenticationPacket);
    mQueued = false;

    if(!pSession) return;
    pSession->deleteMutex.Acquire();

    if(pSession->HasFlag(ACCOUNT_FLAG_XPACK_01) && sWorld.realmAllowTBCcharacters)
        OutPacket(SMSG_AUTH_RESPONSE, 11, "\x0C\x30\x78\x00\x00\x00\x00\x00\x00\x00\x01");
    else
        OutPacket(SMSG_AUTH_RESPONSE, 11, "\x0C\x30\x78\x00\x00\x00\x00\x00\x00\x00\x00");

    sAddonMgr.SendAddonInfoPacket(pAuthenticationPacket, (uint32)pAuthenticationPacket->rpos(), pSession);
    pSession->_latency = _latency;

    delete pAuthenticationPacket;
    pAuthenticationPacket = 0;

    if(mSession)
    {
        sWorld.AddSession(mSession);
        sWorld.AddGlobalSession(mSession);

        /*		if(pSession->HasFlag(ACCOUNT_FLAG_XTEND_INFO))
        			sWorld.AddExtendedSession(pSession);*/

        if(pSession->HasGMPermissions() && mSession)
            sWorld.gmList.insert(pSession);
    }

    pSession->deleteMutex.Release();
}