Exemple #1
0
            public void CancelGameCallback(RPCContext context)
            {
                BattleNetCSharp battleNetCSharp = BattleNet.Get() as BattleNetCSharp;

                if (battleNetCSharp == null || battleNetCSharp.Games == null)
                {
                    return;
                }
                BattleNetErrors status = (BattleNetErrors)context.Header.Status;

                battleNetCSharp.Games.ApiLog.LogDebug("CancelGameCallback, status=" + status);
                if (status == BattleNetErrors.ERROR_OK || status == BattleNetErrors.ERROR_GAME_MASTER_INVALID_GAME)
                {
                    if (battleNetCSharp.Games.IsFindGamePending || (battleNetCSharp.Games.CurrentGameRequest != 0UL && battleNetCSharp.Games.CurrentGameRequest != this.m_gameRequestId))
                    {
                        battleNetCSharp.Games.ApiLog.LogDebug("CancelGameCallback received for id={0} but is not the current gameRequest={1}, ignoring it.", new object[]
                        {
                            this.m_gameRequestId,
                            battleNetCSharp.Games.CurrentGameRequest
                        });
                    }
                    else
                    {
                        battleNetCSharp.Games.CurrentGameRequest = 0UL;
                        battleNetCSharp.Games.AddQueueEvent(QueueEvent.Type.QUEUE_CANCEL, 0, 0, 0, null);
                    }
                }
                else
                {
                    battleNetCSharp.EnqueueErrorInfo(BnetFeature.Games, BnetFeatureEvent.Games_OnCancelGame, status, 0);
                }
            }
 protected BattleNetAPI(BattleNetCSharp battlenet, string logSourceName)
 {
     this.m_battleNet    = battlenet;
     this.m_logSource    = new BattleNetLogSource(logSourceName);
     this.m_logDelegates = new BattleNetAPI.LogDelegate[]
     {
         new BattleNetAPI.LogDelegate(this.m_logSource.LogDebug),
         new BattleNetAPI.LogDelegate(this.m_logSource.LogError)
     };
 }
 public AuthenticationAPI(BattleNetCSharp battlenet) : base(battlenet, "Authentication")
 {
 }
 public LocalStorageAPI(BattleNetCSharp battlenet) : base(battlenet, "LocalStorage")
 {
 }
 public NotificationAPI(BattleNetCSharp battlenet) : base(battlenet, "Notification")
 {
 }
Exemple #6
0
 public GamesAPI(BattleNetCSharp battlenet) : base(battlenet, "Games")
 {
 }
Exemple #7
0
 public BroadcastAPI(BattleNetCSharp battlenet) : base(battlenet, "Broadcast")
 {
 }
Exemple #8
0
 public FriendsAPI(BattleNetCSharp battlenet) : base(battlenet, "Friends")
 {
 }
 public ChallengeAPI(BattleNetCSharp battlenet) : base(battlenet, "Challenge")
 {
 }
 public WhisperAPI(BattleNetCSharp battlenet) : base(battlenet, "Whisper")
 {
 }
Exemple #11
0
 public AccountAPI(BattleNetCSharp battlenet) : base(battlenet, "Account")
 {
 }
Exemple #12
0
 public ChannelAPI(BattleNetCSharp battlenet) : base(battlenet, "Channel")
 {
 }
 public PresenceUnsubscribeContext(BattleNetCSharp battleNet, ulong objectId)
 {
     this.m_battleNet = battleNet;
     this.m_objectId  = objectId;
 }
 public PresenceAPI(BattleNetCSharp battlenet) : base(battlenet, "Presence")
 {
     this.m_stopWatch = new Stopwatch();
 }
Exemple #15
0
 public ProfanityAPI(BattleNetCSharp battlenet) : base(battlenet, "Profanity")
 {
     this.m_rand = new Random();
 }
Exemple #16
0
 public ResourcesAPI(BattleNetCSharp battlenet) : base(battlenet, "ResourcesAPI")
 {
 }