예제 #1
0
 public void CopyFrom(BattleNet.DllErrorInfo src)
 {
     this.m_feature       = (BnetFeature)src.feature;
     this.m_featureEvent  = (BnetFeatureEvent)src.featureEvent;
     this.m_error         = (BattleNetErrors)src.code;
     this.m_clientContext = src.context;
 }
예제 #2
0
 public BnetErrorInfo(BnetFeature feature, BnetFeatureEvent featureEvent, BattleNetErrors error, int context)
 {
     this.m_feature       = feature;
     this.m_featureEvent  = featureEvent;
     this.m_error         = error;
     this.m_clientContext = context;
 }
예제 #3
0
 public void EnqueueErrorInfo(BnetFeature feature, BnetFeatureEvent featureEvent, BattleNetErrors error, int context = 0)
 {
     Log.BattleNet.Print(LogLevel.Warning, string.Format("Enqueuing BattleNetError {0} {1} code={2} context={3}", new object[]
     {
         feature.ToString(),
         featureEvent.ToString(),
         new Error(error),
         context
     }));
     this.m_errorEvents.Add(new BnetErrorInfo(feature, featureEvent, error));
 }
예제 #4
0
    private bool OnBnetError(BnetErrorInfo info, object userData)
    {
        BnetFeature      feature      = info.GetFeature();
        BnetFeatureEvent featureEvent = info.GetFeatureEvent();

        if ((feature == BnetFeature.Friends) && (featureEvent == BnetFeatureEvent.Friends_OnSendInvitation))
        {
            string str;
            switch (info.GetError())
            {
            case BattleNetErrors.ERROR_OK:
                str = GameStrings.Get("GLOBAL_ADDFRIEND_SENT_CONFIRMATION");
                UIStatus.Get().AddInfo(str);
                return(true);

            case BattleNetErrors.ERROR_FRIENDS_FRIENDSHIP_ALREADY_EXISTS:
                str = GameStrings.Get("GLOBAL_ADDFRIEND_ERROR_ALREADY_FRIEND");
                UIStatus.Get().AddError(str);
                return(true);
            }
        }
        return(false);
    }
예제 #5
0
 public void SetFeature(BnetFeature feature)
 {
     this.m_feature = feature;
 }
예제 #6
0
 private static void RaisePartyError(bool isOperationCallback, string debugContext, BattleNetErrors errorCode, BnetFeature feature, BnetFeatureEvent featureEvent, PartyId partyId, string szPartyType, string stringData, string errorMessageFormat, params object[] args)
 {
     if (BnetParty.OnError == null)
     {
         return;
     }
     BnetParty.RaisePartyError(new PartyError
     {
         IsOperationCallback = isOperationCallback,
         DebugContext        = debugContext,
         ErrorCode           = errorCode,
         Feature             = feature,
         FeatureEvent        = featureEvent,
         PartyId             = partyId,
         szPartyType         = szPartyType,
         StringData          = stringData
     });
 }