public async UniTask <AsyncResponseData <GoldResp> > GetGoldAsync(GetGoldReq request)
        {
            var resp = await Client.SendRequestAsync <GetGoldReq, GoldResp>(DatabaseRequestTypes.RequestGetGold, request);

            if (!resp.IsSuccess)
            {
                Logging.LogError(nameof(DatabaseNetworkManager), $"Cannot {nameof(GetGoldAsync)} status: {resp.ResponseCode}");
            }
            return(resp);
        }
示例#2
0
        public async UniTask <GoldResp> GetGoldAsync(GetGoldReq request)
        {
            var result = await Client.SendRequestAsync <GetGoldReq, GoldResp>(DatabaseRequestTypes.RequestGetGold, request);

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