Exemple #1
0
        public async UniTask <GetIdByCharacterNameResp> GetIdByCharacterNameAsync(GetIdByCharacterNameReq request)
        {
            var result = await Client.SendRequestAsync <GetIdByCharacterNameReq, GetIdByCharacterNameResp>(DatabaseRequestTypes.RequestGetIdByCharacterName, request);

            if (result.ResponseCode != AckResponseCode.Success)
            {
                return(new GetIdByCharacterNameResp());
            }
            return(result.Response);
        }
        public async UniTask <AsyncResponseData <GetIdByCharacterNameResp> > GetIdByCharacterNameAsync(GetIdByCharacterNameReq request)
        {
            var resp = await Client.SendRequestAsync <GetIdByCharacterNameReq, GetIdByCharacterNameResp>(DatabaseRequestTypes.RequestGetIdByCharacterName, request);

            if (!resp.IsSuccess)
            {
                Logging.LogError(nameof(DatabaseNetworkManager), $"Cannot {nameof(GetIdByCharacterNameAsync)} status: {resp.ResponseCode}");
            }
            return(resp);
        }