示例#1
0
        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;
                }
            }
        }
示例#2
0
文件: Client.cs 项目: sy1989/nora
 public void CreateAuthTicket()
 {
     PendingTicketForAuth = AuthTicket.CreateAuthTicket();
 }
示例#3
0
 public void CreateAuthTicket()
 {
     PendingTicketForAuth = AuthTicket.CreateAuthTicket(Bot.NextToken(), Bot.PublicIP);
 }