private async UniTask LoadPartyRoutine(int id) { if (id > 0 && !loadingPartyIds.Contains(id)) { loadingPartyIds.Add(id); PartyResp resp = await DbServiceClient.ReadPartyAsync(new ReadPartyReq() { PartyId = id }); parties[id] = resp.PartyData.FromByteString <PartyData>(); loadingPartyIds.Remove(id); } }
private async UniTask LoadPartyRoutine(int id) { if (id > 0 && !loadingPartyIds.Contains(id)) { loadingPartyIds.Add(id); PartyResp resp = await DbServiceClient.ReadPartyAsync(new ReadPartyReq() { PartyId = id, }); ServerPartyHandlers.SetParty(id, resp.PartyData); loadingPartyIds.Remove(id); } }
private async UniTask LoadPartyRoutine(int id) { if (id > 0 && !loadingPartyIds.Contains(id)) { loadingPartyIds.Add(id); AsyncResponseData <PartyResp> resp; do { resp = await DbServiceClient.ReadPartyAsync(new ReadPartyReq() { PartyId = id, }); } while (!resp.IsSuccess); ServerPartyHandlers.SetParty(id, resp.Response.PartyData); loadingPartyIds.Remove(id); } }