account_id == 0
Posted: Thu Jan 08, 2015 4:53 pm
I'm at work, just providing what information I know before I forget:
This function handles received packets from the VGO Client to the WorldServer, prior to connecting to a Chunk Server (where a user could potentially create a character).
Here the packet contains the account ID that is set on the Client. I'm guessing Login Server tells the Client at some point what ID they are. I'll continue looking.
This function handles received packets from the VGO Client to the WorldServer, prior to connecting to a Chunk Server (where a user could potentially create a character).
Here the packet contains the account ID that is set on the Client. I'm guessing Login Server tells the Client at some point what ID they are. I'll continue looking.
Code: Select all
void Net::HandleNewSession(shared_ptr<Client>& client, PacketStruct *packet_struct) {
const char *account_id, *session_id;
account_id = packet_struct->GetString32("AccountId");
session_id = packet_struct->GetString32("SessionId");
LogInfo(LOG_NET, 0, "New Session: Account ID: %s Session ID: '%s'", account_id, session_id);
client->SetAccountID(atoul(account_id));
client->SetSessionID(session_id);
//We know need to request the account name from login :/
//Yeah, it's the only way to do it since world does not have access to login's database.
//Once we get the account info, do the rest in SendAccountInfo below
login.SendAccountInfoRequest(client->GetAccountID(), client->GetConnectionID());
}