private async UniTask LoadGuildRoutine(int id) { if (id > 0 && !loadingGuildIds.Contains(id)) { loadingGuildIds.Add(id); GuildResp resp = await DbServiceClient.ReadGuildAsync(new ReadGuildReq() { GuildId = id }); guilds[id] = resp.GuildData.FromByteString <GuildData>(); loadingGuildIds.Remove(id); } }
private async UniTask LoadGuildRoutine(int id) { if (id > 0 && !loadingGuildIds.Contains(id)) { loadingGuildIds.Add(id); GuildResp resp = await DbServiceClient.ReadGuildAsync(new ReadGuildReq() { GuildId = id, }); ServerGuildHandlers.SetGuild(id, resp.GuildData); loadingGuildIds.Remove(id); } }
private async UniTask LoadGuildRoutine(int id) { if (id > 0 && !loadingGuildIds.Contains(id)) { loadingGuildIds.Add(id); AsyncResponseData <GuildResp> resp; do { resp = await DbServiceClient.ReadGuildAsync(new ReadGuildReq() { GuildId = id, }); } while (!resp.IsSuccess); ServerGuildHandlers.SetGuild(id, resp.Response.GuildData); loadingGuildIds.Remove(id); } }