public void OnMessage(IPacketMsg packetMsg) { if (packetMsg.MsgType == EMsg.ClientGetAppOwnershipTicketResponse) { var pb = new ClientMsgProtobuf <CMsgClientGetAppOwnershipTicketResponse>(packetMsg); log.Debug("Got client ticket of " + pb.Body.app_id + " " + pb.Body.eresult + " " + pb.Body.ticket.Length); if (pb.Body.eresult == (uint)EResult.OK) { AppOwnershipTicket = pb.Body.ticket; } } else if (packetMsg.MsgType == EMsg.ClientAuthListAck) { var pb = new ClientMsgProtobuf <CMsgClientAuthListAck>(packetMsg); log.Debug("Steam acked ticket crc of " + pb.Body.ticket_crc + "/" + pb.Body.message_sequence); TicketForAuth = PendingTicketForAuth; TicketForServer = AuthTicket.CreateServerTicket( Bot.Client.SteamID, TicketForAuth, AppOwnershipTicket); } else if (packetMsg.MsgType == EMsg.ClientTicketAuthComplete) { var pb = new ClientMsgProtobuf <CMsgClientTicketAuthComplete>(packetMsg); log.Debug("Client ticket auth complete with " + pb.Body.estate + " on " + pb.Body.ticket_crc); } else if (packetMsg.MsgType == EMsg.ClientOGSBeginSessionResponse) { var msg = new ClientMsg <MsgClientOGSBeginSessionResponse>(packetMsg); if (msg.Body.Result == EResult.OK) { SteamworksSessionId = msg.Body.SessionId; } } }
public void CreateAuthTicket() { PendingTicketForAuth = AuthTicket.CreateAuthTicket(); }
public void CreateAuthTicket() { PendingTicketForAuth = AuthTicket.CreateAuthTicket(Bot.NextToken(), Bot.PublicIP); }