public async UniTask <AsyncResponseData <EmptyMessage> > CreateFriendAsync(CreateFriendReq request)
        {
            var resp = await Client.SendRequestAsync <CreateFriendReq, EmptyMessage>(DatabaseRequestTypes.RequestCreateFriend, request);

            if (!resp.IsSuccess)
            {
                Logging.LogError(nameof(DatabaseNetworkManager), $"Cannot {nameof(CreateFriendAsync)} status: {resp.ResponseCode}");
            }
            return(resp);
        }
Ejemplo n.º 2
0
        public async UniTask <SocialCharactersResp> CreateFriendAsync(CreateFriendReq request)
        {
            var result = await Client.SendRequestAsync <CreateFriendReq, SocialCharactersResp>(DatabaseRequestTypes.RequestCreateFriend, request);

            if (result.ResponseCode != AckResponseCode.Success)
            {
                return(new SocialCharactersResp());
            }
            return(result.Response);
        }