public async Task update_tempest_affixes() { this.tempest_affixes = JsonConvert.DeserializeObject <TempestAffixes>(await TempestAPI.get_raw("tempests")); await Dispatcher.BeginInvoke(new Action(() => { /* Populate the comboboxes with the tempest affixes. */ this.cb_prefix.Items.Clear(); this.cb_suffix.Items.Clear(); foreach (KeyValuePair <string, string> affix in this.tempest_affixes.prefixes) { string description = affix.Value; TempestDescription td; relevant_tempests.TryGetValue(affix.Key, out td); if (td != null) { description = td.short_description; } this.cb_prefix.Items.Add(new TempestAffix { name = affix.Key, description = description }); } foreach (KeyValuePair <string, string> affix in this.tempest_affixes.suffixes) { string description = affix.Value; TempestDescription td; relevant_tempests.TryGetValue(affix.Key, out td); if (td != null) { description = td.short_description; } this.cb_suffix.Items.Add(new TempestAffix { name = affix.Key, description = description }); } })); }
public async Task update_map_levels() { this.map_levels = JsonConvert.DeserializeObject <Dictionary <string, int> >(await TempestAPI.get_raw("maps", "v0")); }