public void method_2() { this.Settings = (this.Settings ?? new Settings()); this.Settings.MapHosts = this.Web.GetMapHosts(); this.Settings.SpacemapConfig = this.Web.GetSpacemapConfig(); try { this.Settings.UIString = this.Web.method_0(); } catch { } if (this.Settings.SpacemapConfig != null) { MapUtils.smethod_9(this.Settings.SpacemapConfig); } DarkOrbitWebAPI.NpcConstants npcList = this.Web.GetNpcList(); if (npcList != null) { NpcUtils.smethod_0(npcList); } DarkOrbitWebAPI.MapConstants mapList = this.Web.GetMapList(); if (mapList != null) { MapUtils.smethod_5(mapList, false); } }
public void Fill(Action <SelectedNpcModel> newModel = null) { MapProfile.< > c__DisplayClass192_0 CS$ < > 8__locals1 = new MapProfile.< > c__DisplayClass192_0(); List <NpcUtils.NpcType> list = NpcUtils.smethod_0((int)this.TargetMap); MapProfile.< > c__DisplayClass192_0 CS$ < > 8__locals2 = CS$ < > 8__locals1; IEnumerable <int> collection; if (list != null) { collection = from t in list select t.Id; } else { IEnumerable <int> enumerable = new int[0]; collection = enumerable; } CS$ < > 8__locals2.all = new HashSet <int>(collection); bool enabled = MapUtils.smethod_6((int)this.TargetMap); if (list == null) { return; } HashSet <int> hashSet = new HashSet <int>(from t in list select t.Id); foreach (SelectedNpcModel selectedNpcModel in this.NpcWhitelist) { NpcUtils.NpcType npcType; if (NpcUtils.NpcById.TryGetValue(selectedNpcModel.NpcId, out npcType)) { selectedNpcModel.Name = npcType.ToString(); hashSet.Remove(selectedNpcModel.NpcId); } } foreach (int num in hashSet) { SelectedNpcModel selectedNpcModel2 = new SelectedNpcModel { Enabled = enabled, NpcId = num, Name = NpcUtils.NpcById[num].ToString() }; if (newModel != null) { newModel(selectedNpcModel2); } this.NpcWhitelist.Add(selectedNpcModel2); } List <SelectedNpcModel> list2 = (from t in this.NpcWhitelist where CS$ < > 8__locals1.all.Contains(t.NpcId) orderby t.NpcId select t).ToList <SelectedNpcModel>(); this.NpcWhitelist.Clear(); foreach (SelectedNpcModel selectedNpcModel3 in list2) { this.NpcWhitelist.Add(selectedNpcModel3); selectedNpcModel3.Fill(); } List <int> list3 = new List <int>(from t in new NpcUtils.NpcClass[] { NpcUtils.N_Cubikon, NpcUtils.N_Charopos, NpcUtils.N_Styxus } select NpcUtils.NpcType.smethod_3(t).Id); foreach (SelectedNpcModel selectedNpcModel4 in this.NpcWhitelist) { if (this.TargetMap == TargetMap.GG_Kuiper) { selectedNpcModel4.GG_ChaseFleeing = true; } if (list3.Contains(selectedNpcModel4.NpcId)) { selectedNpcModel4.IgnoreOwnership = true; } } if (this.Priority < 0) { this.Priority = 0; } }