-- 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
    nameKey = "PG_GUIDE_LEGION_BLACKSMITHING_NAME",

	
	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,

				noteKey = "PG_GUIDE_LEGION_BLACKSMITHING_NOTE_1",
			},
			{
				min = 1,
				max = 80,
				--useEffectiveSkill = true,

				recipes = {
					{
						spellID = 184442, -- Demonsteel Bar
						crafts  = 100,
						autoReagents = true,
					},
				},

				noteKey = "PG_GUIDE_LEGION_BLACKSMITHING_NOTE_2",
			},
			-- =====================================
			-- 60 : Demonsteel Waistguard (изучение + 1 крафт)
			-- =====================================
			{
				min = 80,
				max = 81,
				disablesShopping = true,
				recipes = {
					{
						spellID = 182945, -- Demonsteel Waistguard
						crafts  = 1,
						autoReagents = true,

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

				noteKey = "PG_GUIDE_LEGION_BLACKSMITHING_NOTE_3",
			},
			-- =====================================
			-- NEXT STEP: Demonsteel Waistguard (Rank 2)
			-- =====================================
			{
				min = 81,
				max = 82,
				disablesShopping = true,
				recipes = {
					{
						spellID = 182975, -- Demonsteel Waistguard (Rank 2)
						crafts  = 1,
						autoReagents = true,

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

				noteKey = "PG_GUIDE_LEGION_BLACKSMITHING_NOTE_4",
			},
			-- =====================================
			-- 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,     -- ориентир
						autoReagents = true,
					},
				},

				noteKey = "PG_GUIDE_LEGION_BLACKSMITHING_NOTE_5",
			},

    },
}
