private void ChallengeAnsweredCallback(RPCContext context) { ChallengeAnsweredResponse response = ChallengeAnsweredResponse.ParseFrom(context.Payload); if (response.IsInitialized) { ulong num = 0L; if (this.s_pendingAnswers.TryGetValue(context.Header.Token, out num)) { if (response.HasDoRetry && response.DoRetry) { BattleNet.DllChallengeInfo item = new BattleNet.DllChallengeInfo { challengeId = num, isRetry = true }; this.m_challengeUpdateList.Add(item); } this.s_pendingAnswers.Remove(context.Header.Token); } } }
private void ChallengeUserCallback(RPCContext context) { ChallengeUserRequest request = ChallengeUserRequest.ParseFrom(context.Payload); if (request.IsInitialized) { ulong id = request.Id; bool flag = false; for (int i = 0; i < request.ChallengesCount; i++) { Challenge challenge = request.Challenges[i]; if (challenge.Type == 0x505744) { flag = true; break; } } if (!flag) { this.AbortChallenge(id); } else { ChallengePickedRequest message = new ChallengePickedRequest(); message.SetChallenge(0x505744); message.SetId((uint)id); message.SetNewChallengeProtocol(true); RPCContext context2 = base.m_rpcConnection.QueueRequest(this.ChallengeService.Id, 1, message, new RPCContextDelegate(this.ChallengedPickedCallback), 0); BattleNet.DllChallengeInfo info = new BattleNet.DllChallengeInfo { challengeId = id, isRetry = false }; this.m_challengePendingList.Add(context2.Header.Token, info); } } }