コード例 #1
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);
    }
コード例 #2
0
 private bool OnBnetError(BnetErrorInfo info, object userData)
 {
     object[] args = new object[] { info.GetFeatureEvent(), info.GetError() };
     Log.Mike.Print("BnetFriendMgr.OnBnetError() - event={0} error={1}", args);
     return(true);
 }