Esempio n. 1
0
        private IEnumerable <DetailedItemDto> ExtractItemsFromHero(DetailedHeroItemsDto inputs)
        {
            var outputs = new[]
            {
                inputs.Head,
                inputs.Shoulders,
                inputs.Neck,
                inputs.Torso,
                inputs.Hands,
                inputs.Bracers,
                inputs.Waist,
                inputs.Legs,
                inputs.Feet,
                inputs.LeftFinger,
                inputs.RightFinger,
                inputs.MainHand,
                inputs.OffHand
            };

            return(outputs.Where(dto => dto != null && !ItemIdentifierHelper.IsObsolete(dto)));
        }
Esempio n. 2
0
 public HeroMapper(HeroId heroId, DetailedHeroItemsDto items, DetailedFollowersDto followerItems)
 {
     _heroId          = heroId;
     _items           = ExtractItemsFromHero(items);
     _itemsByFollower = ExtractItemsFromFollowers(followerItems);
 }