Ejemplo n.º 1
0
        private DestinyItem CreateDestinyItemFromGenericItem(DestinyGenericItem genericItem)
        {
            DestinyItem item = new DestinyItem();

            item.ItemHash       = genericItem.ItemHash;
            item.ItemInstanceId = genericItem.ItemInstanceId;
            ManifestItemDefinition manifestItemDefinition = manifestDao.GetItemDefinition(genericItem.ItemHash);

            item.Name           = manifestItemDefinition.DisplayName;
            item.TierTypeName   = manifestItemDefinition.TierTypeName;
            item.CategoryHashes = manifestItemDefinition.ItemCategoryHashes;
            item.Categories     = item.CategoryHashes
                                  .Select(hash => manifestDao.GetItemCategoryDefinition(hash).CategoryName)
                                  .ToList();
            return(item);
        }
Ejemplo n.º 2
0
 private bool ItemIsWeaponOrArmor(DestinyItem item)
 {
     return(item.Categories.Contains("Weapon") || item.Categories.Contains("Armor"));
 }