コード例 #1
0
        private void MapCustomizableItem(DetailedItemDto input, HeroItemCustomizable output)
        {
            var dyeId      = ItemIdentifierHelper.FromItemDyeOptional(input.Dye);
            var transmogId = ItemIdentifierHelper.FromItemOptional(input.Transmog);
            var gems       = MapGems(input.Gems);

            output.Id       = ItemIdentifierHelper.FromItem(input);
            output.Dye      = dyeId;
            output.Transmog = transmogId;
            output.Gems     = gems;
        }
コード例 #2
0
        private HeroItemEquipment MapEquipmentItem(DetailedItemDto input)
        {
            var slot = EnumConversionHelper.ItemEquipmentSlotFromString(input.Slots);

            var output = new HeroItemEquipment {
                Slot = slot
            };

            MapCustomizableItem(input, output);
            return(output);
        }
コード例 #3
0
        private HeroItemFollower MapFollowerItem(FollowerId followerId, DetailedItemDto input)
        {
            var slot   = EnumConversionHelper.ItemFollowerSlotFromString(input.Slots);
            var output = new HeroItemFollower
            {
                Slot     = slot,
                Follower = followerId
            };

            MapCustomizableItem(input, output);
            return(output);
        }