-- ProfessionGuides/Blacksmithing/Legion_Blacksmithing.lua
local PT = AhUI
if not PT then return end
local G = PT.ProfessionGuides

G.guides.LEGION = G.guides.LEGION or {}

G.guides.LEGION.BLACKSMITHING = {
    profession  = "Blacksmithing",
    skillLineID = 2454, -- Legion Blacksmithing
    name = "Кузнечное дело — Легион (1–100)",
	
	learnViaQuest = true,
	
    trainers = {
        alliance = {
            {
                npcID = 92183, -- trainer
                name  = "Alard Schmied", -- можно оставить nil, если хочешь
                mapID = 627, -- Dalaran (Broken Isles)
                x = 45.0,
                y = 29.6,
            },
        },
        horde = {
            {
                npcID = 92183, -- тот же тренер
                name  = "Alard Schmied",
                mapID = 627,
                x = 45.0,
                y = 29.6,
            },
        },
    },

	vendors = {
		alliance = {
			-- Urael (за обычную валюту / прошлый шаг)
			{
				npcID = 92265,
				name  = "Urael",
				mapID = 627,
				x = 45.2,
				y = 28.6,
				sells = {
					{ itemID = 123949 },
				},
			},

			-- Strap Bucklebolt (Sightless Eye)
			{
				npcID = 107760, -- Strap Bucklebolt
				name  = "Strap Bucklebolt",
				mapID = 627, -- Dalaran Sewers
				x = 65.8,
				y = 80.6,

				sells = {
					{
						itemID = 123949, -- Plans: Demonsteel Waistguard
						price = {
							{ currencyID = 1149, count = 500 }, -- Sightless Eye
						},
					},
				},
			},

			-- Muirn Ironhorn (Rank 2)
			{
				npcID = 92243,
				name  = "Muirn Ironhorn",
				mapID = 650,
				x = 54.6,
				y = 84.0,
				teaches = {
					{ spellID = 182975 },
				},
			},
		},

		horde = {
			{
				npcID = 92265,
				name  = "Urael",
				mapID = 627,
				x = 45.2,
				y = 28.6,
				sells = {
					{ itemID = 123949 },
				},
			},

			{
				npcID = 107760,
				name  = "Strap Bucklebolt",
				mapID = 627,
				x = 65.8,
				y = 80.6,
				sells = {
					{
						itemID = 123949,
						price = {
							{ currencyID = 1149, count = 500 },
						},
					},
				},
			},

			{
				npcID = 92243,
				name  = "Muirn Ironhorn",
				mapID = 650,
				x = 54.6,
				y = 84.0,
				teaches = {
					{ spellID = 182975 },
				},
			},
		},
	},

    steps = {

    -- =====================================
    -- 1–60 : 60x Demonsteel Bar
    -- =====================================
	
				{
				min = 1,
				max = 1,
				useEffectiveSkill = true,

				recipes = {
					{
						crafts = 1,
						reagents = {
							{ itemID = 123918, count = 10 }, -- Leystone Ore
						},
					},
				},

				disablesCraft = true,
				disablesCraftAll = true,

				note =
					"Для изучения профессии требуется:\n" ..
					"|cff00ff0010× Leystone Ore|r.\n\n" ..
					"Купите и изучите профессию у учителя,\n" ..
					"затем нажмите «Следующий».",
			},
			{
				min = 1,
				max = 80,
				--useEffectiveSkill = true,

				recipes = {
					{
						spellID = 184442, -- Demonsteel Bar
						crafts  = 100,
						reagents = {
							{ itemID = 123919, count = 2 }, -- Felslate
							{ itemID = 123918, count = 1 }, -- Leystone Ore
						},
					},
				},

				note =
					"Делайте квесты пока не откроете рецепт.\n" ..
					"Крафтите до 80 уровня навыка."..
					"|cff00ff00Декор доступен с 80 навыка|r!.",
			},
			-- =====================================
			-- 60 : Demonsteel Waistguard (изучение + 1 крафт)
			-- =====================================
			{
				min = 80,
				max = 81,
				disablesShopping = true,
				recipes = {
					{
						spellID = 182945, -- Demonsteel Waistguard
						crafts  = 1,

						requires = {
							{
								type   = "recipe_item",
								itemID = 123949, -- Plans: Demonsteel Waistguard
							},
						},

						reagents = {
							{ itemID = 124461, count = 8, crafted = true }, -- Demonsteel Bar
							{ itemID = 124439, count = 20 }, -- Unbroken Tooth
							{ itemID = 124124, count = 3 },  -- Blood of Sargeras
						},
					},
				},

				note =
					"|cff00ff00Декор доступен с 80 навыка|r!."..
					"Купите рецепт в Сурамаре.\n" ..
					"После изучения создайте 1шт.",
			},
			-- =====================================
			-- NEXT STEP: Demonsteel Waistguard (Rank 2)
			-- =====================================
			{
				min = 81,
				max = 82,
				disablesShopping = true,
				recipes = {
					{
						spellID = 182975, -- Demonsteel Waistguard (Rank 2)
						crafts  = 1,

						requires = {
							{
								type    = "recipe_spell",
								spellID = 182975,
							},
						},

						reagents = {
							{ itemID = 124461, count = 4, crafted = true }, -- Demonsteel Bar
							{ itemID = 124439, count = 10 },                -- Unbroken Tooth
							{ itemID = 124124, count = 2 },                 -- Blood of Sargeras
						},
					},
				},

				note =
					"Поговорите с |cff00ff00Muirn Ironhorn|r и изучите рецепт.\n" ..
					"После этого создайте |cff66ccff1× Demonsteel Waistguard|r.",
			},
			-- =====================================
			-- 82–100 : Demonsteel Waistguard
			-- (покупка рецепта + крафт)
			-- =====================================
			{
				min = 82,
				max = 100,
				disablesShopping = true,
				recipes = {
					{
						-- покупка рецепта
						requires = {
							{
								type   = "recipe_item",
								itemID = 123949, -- Plans: Demonsteel Waistguard
							},
						},
					},
					{
						-- крафт после покупки
						spellID = 182983, -- Demonsteel Waistguard
						crafts  = 18,     -- ориентир

						reagents = {
							{ itemID = 124461, count = 4, crafted = true }, -- Demonsteel Bar
							{ itemID = 124124, count = 2 },                -- Blood of Sargeras
						},
					},
				},

				note =
					"Купите рецепт у |cff00ff00Strap Bucklebolt|r\n" ..
					"в Dalaran Sewers за |cff66ccff500 Sightless Eye|r.\n" ..
					"Получается за ~15–20 минут.\n\n" ..
					"После покупки продолжайте крафтить\n" ..
					"|cff66ccffDemonsteel Waistguard|r до 100 навыка.\n\n" ..
					"Рецепт жёлтый/зелёный —\n" ..
					"возможно, потребуется больше крафтов.",
			},

    },
}
