static void ImportMissingNamedVectors(AmfObject cocItems, IEnumerable<XmlNamedVector4> xmlItems, string cocNameProperty, Func<AmfObject, String> descriptionGetter = null, IList<XmlNamedVector4> targetXmlList = null) { if (targetXmlList == null) targetXmlList = (IList<XmlNamedVector4>)xmlItems; var xmlNames = new HashSet<String>(xmlItems.Select(x => x.Name)); foreach (var pair in cocItems) { var name = pair.ValueAsObject.GetString(cocNameProperty); if (xmlNames.Contains(name)) continue; xmlNames.Add(name); var xml = new XmlNamedVector4 { Name = name }; if (descriptionGetter != null) xml.Description = descriptionGetter(pair.ValueAsObject); targetXmlList.Add(xml); } }
protected NamedVector4VM(GameVM game, AmfObject items, XmlNamedVector4 xml) { _xml = xml; _game = game; _items = items; }
public KeyItemVM(GameVM game, AmfObject keyItems, XmlNamedVector4 xml) : base(game, keyItems, xml) { }
public StatusVM(GameVM game, AmfObject allStatuses, XmlNamedVector4 xml) : base(game, allStatuses, xml) { }
public PerkVM(GameVM game, AmfObject perksArray, XmlNamedVector4 xml) : base(game, perksArray, xml) { }