/// <summary> /// Initialize static items. /// </summary> internal static void Load() { if (MarketGroups != null) return; // Create the implants slots for (int i = 0; i < s_implantSlots.Length; i++) { s_implantSlots[i] = new ImplantCollection((ImplantSlots)i); } // Deserialize the items datafile ItemsDatafile datafile = Util.DeserializeDatafile<ItemsDatafile>(DatafileConstants.ItemsDatafile, Util.LoadXslt(Properties.Resources.DatafilesXSLT)); MarketGroups = new MarketGroupCollection(null, datafile.MarketGroups); // Gather the items into a by-ID dictionary foreach (MarketGroup marketGroup in MarketGroups) { InitializeDictionaries(marketGroup); } GlobalDatafileCollection.OnDatafileLoaded(); }
public Agent() { Implants = new ImplantCollection(); Skills = new SkillCollection(); }
/// <summary> /// Initialize static items /// </summary> internal static void Load() { if (s_roots != null) return; // Create the implants slots for (int i = 0; i < s_implantSlots.Length; i++) { s_implantSlots[i] = new ImplantCollection((ImplantSlots)i); s_implantSlots[i].Add(new Implant()); } // Deserialize the items datafile var datafile = Util.DeserializeDatafile<ItemsDatafile>(DatafileConstants.ItemsDatafile); s_roots = new MarketGroupCollection(null, datafile.MarketGroups); // Gather the items into a by-ID dictionary. foreach (var group in s_roots) { InitializeDictionaries(group); } }