예제 #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);
 }