Ejemplo n.º 1
0
        public async UniTask <CharactersResp> ReadCharactersAsync(ReadCharactersReq request)
        {
            var result = await Client.SendRequestAsync <ReadCharactersReq, CharactersResp>(DatabaseRequestTypes.RequestReadCharacters, request);

            if (result.ResponseCode != AckResponseCode.Success)
            {
                return(new CharactersResp());
            }
            return(result.Response);
        }
        public async UniTask <AsyncResponseData <CharactersResp> > ReadCharactersAsync(ReadCharactersReq request)
        {
            var resp = await Client.SendRequestAsync <ReadCharactersReq, CharactersResp>(DatabaseRequestTypes.RequestReadCharacters, request);

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