-- "The Ley Wardens" redesign (see PLAN.md's "v1.20" for the full write-up): the chain now stays
-- entirely within Eastern Kingdoms and Kalimdor (no Outland/Northrend), targets level ~20
-- (MinLevel 15, QuestLevel 20), and shrinks from 6 quests to 5 -- one fewer NPC node (Nazrek the
-- Bent is retired, see the follow-up migration) naturally removes one leg rather than forcing a
-- replacement. Structure otherwise unchanged: each quest but the finale is accepted from one NPC
-- and turned in to the *next* leg's NPC -- Aemos (Hillsbrad Foothills) -> Windcaller Tyese
-- (Ashenvale) -> Borin Ironquill (Badlands/Uldaman) -> The First Warden (Stonetalon Mountains) ->
-- back to Aemos for the return leg and the finale.
--
-- New this pass: quest 912001 carries a real combat objective (RequiredNpcOrGo1 = 911007, "The
-- Ironbound Sentinel", RequiredNpcOrGoCount1 = 1 -- positive value = creature kill credit, see
-- QuestDef.h and Player::KilledMonsterCredit) rather than the chain's previous pure-dialogue
-- design -- a Titan-built guardian that wakes to contest the old ley magic being surfaced again,
-- folded into the existing "reveal" leg per design discussion rather than added as its own quest.
DELETE FROM `quest_template` WHERE `ID` BETWEEN 912000 AND 912005;
INSERT INTO `quest_template`
    (`ID`, `QuestType`, `QuestLevel`, `MinLevel`, `RewardMoney`, `Flags`, `AllowableRaces`,
     `LogTitle`, `LogDescription`, `QuestDescription`, `AreaDescription`, `QuestCompletionLog`,
     `RequiredNpcOrGo1`, `RequiredNpcOrGoCount1`)
VALUES
    (912000, 2, 20, 15, 0, 0, 0,
     'The Waygate Stirs',
     'Aemos, a stone guardian newly and only partly awoken, believes another dormant waygate in Ashenvale may answer if someone stands before it. Travel there and listen.',
     'For longer than it can measure, I have stood in silence between two towns that cannot agree on much beyond mutual suspicion -- a shape no one thought to question. Something has woken me. Not fully. Whole ages are still locked behind cracked runes and older quiet. But I remember enough to know I was not always alone, and that there are other stones like me, scattered across these lands, waiting the same patient way I waited.\n\nGo to one of them. A grove near Astranaar, in Ashenvale. Touch nothing you do not have to. Simply be there, and listen.',
     'Astranaar',
     'Reach the grove near Astranaar.',
     0, 0),
    (912001, 2, 20, 15, 0, 0, 0,
     'Roots Older Than the Circle',
     'Travel to the Badlands, near Uldaman, and find whoever has been digging into what came before the Ley Wardens. Something there guards its secret with more than silence.',
     'I was a Ley Warden once -- or some sliver of one is what''s left of me here, worn down to memory and root-bark. I cannot tell you what the network was for. I can only tell you where the trail runs next: south and east, to the dry hills above Uldaman, where the earth itself has old opinions about who''s allowed to dig.\n\nThe Explorers'' League has been scratching at those hills for years. If any of them found what I suspect is down there, they will not have found it quietly, and it will not have let them.',
     'Badlands',
     'Reach the excavation above Uldaman and deal with whatever stands in your way.',
     911007, 1),
    (912002, 2, 20, 15, 0, 0, 0,
     'What the Stone Remembers',
     'Travel to Stonetalon Mountains and find whoever -- or whatever -- still keeps watch over the oldest of the ley wardens'' secrets.',
     'You have my thanks, traveler -- and my apology, for not warning you plainly enough what stood guard down there. It was not a wild thing. It was built, ages before my order ever raised its first standing stone, to keep something quiet that someone, long ago, decided should stay that way.\n\nYour Ley Wardens were not first. They inherited an older network, and only half-understood what they''d found. There is a place in Stonetalon Mountains where that older thread runs closest to the surface. Go. Ask what''s left there what it remembers.',
     'Stonetalon Mountains',
     'Reach the watcher in Stonetalon Mountains.',
     0, 0),
    (912003, 2, 20, 15, 0, 0, 0,
     'The Long Way Home',
     'Return to Aemos in Hillsbrad Foothills and recount everything you''ve learned about the Ley Wardens and the network they inherited.',
     'You''ve come a long way to stand in front of yourself and not recognize it.\n\nI am not separate from Aemos, traveler -- I am what it was, before ages of silence wore the difference away. A memory it cast out here, long ago, to keep some part of itself safe from forgetting entirely. It worked, after a fashion. I remembered. It didn''t.\n\nGo back to it now. Tell it what you''ve learned, all of it -- the grove, the dig, the guardian, the old network beneath the Ley Wardens'' own. Let it hear its own story from someone who isn''t it. I think that''s the only way the rest of it wakes up.',
     'Hillsbrad Foothills',
     'Return to Aemos in Hillsbrad Foothills.',
     0, 0),
    (912004, 2, 20, 15, 100, 0, 0,
     'The Network Reborn',
     'Stand with Aemos as it attempts to fully reawaken the waygate network.',
     '...the grove. The dig. The guardian that nearly stopped you. An older network, inherited and half-understood, all of it remembering itself at once. I remember all of it now, traveler -- not as a story you told me, but as something that was always mine, waiting only for someone to carry it back far enough for me to reach.\n\nI am whole again. Or as whole as a thing like me gets to be. Stay a moment. There is one more thing the network needs before it can wake fully -- and it does not need distance this time. Only a witness.',
     'Hillsbrad Foothills',
     'Witness the network''s reawakening.',
     0, 0);

-- Chaining: quest N+1 requires quest N complete (PrevQuestID), quest N points forward (NextQuestID).
-- Quest 1 has no prerequisite; quest 5 (the finale) has no successor.
DELETE FROM `quest_template_addon` WHERE `ID` BETWEEN 912000 AND 912005;
INSERT INTO `quest_template_addon` (`ID`, `PrevQuestID`, `NextQuestID`) VALUES
    (912000, 0, 912001),
    (912001, 912000, 912002),
    (912002, 912001, 912003),
    (912003, 912002, 912004),
    (912004, 912003, 0);

-- RewardText: spoken by the GIVER on the accept screen, before the player commits to the quest.
DELETE FROM `quest_offer_reward` WHERE `ID` BETWEEN 912000 AND 912005;
INSERT INTO `quest_offer_reward` (`ID`, `RewardText`) VALUES
    (912000, 'Go safely. Whatever wakes there, it will not harm you -- the network was never built to hurt the ones it was meant to carry.'),
    (912001, 'Go carefully. I said the network was never built to hurt anyone -- I did not say nothing else was ever built.'),
    (912002, 'Go. And traveler -- when you finally understand what you''re carrying, remember that an old broken thing sent you gladly, and asked for nothing back.'),
    (912003, 'Go. And traveler -- thank you. It is a strange thing, to be remembered by someone who was never told to bother.'),
    (912004, 'Stand back, if you''d like. Or don''t. I don''t believe this will hurt.');

-- CompletionText: spoken by the ENDER on approach with the quest ready to turn in, before the
-- reward screen. This is the primary lore payload of the chain -- each one reveals the next thread
-- to pull. Quest 912004's is the reactivation moment itself.
DELETE FROM `quest_request_items` WHERE `ID` BETWEEN 912000 AND 912005;
INSERT INTO `quest_request_items` (`ID`, `CompletionText`) VALUES
    (912000, '...another. After all this time, another who still listens. I am only an echo, traveler -- what I was is mostly gone, worn thin by centuries of quiet. But I remember a name, and I remember that it mattered. Aemos. Tell it: the wardens have not entirely forgotten how to speak.'),
    (912001, 'Ley Wardens. Now there''s a name I haven''t heard spoken aloud in a long while -- and whatever just tried to keep you out of that dig confirms it faster than any of my journals could. That thing wasn''t built by your order, traveler. It''s older. Older than Uldaman''s own dwellers, if my instruments read true. Your wardens found an echo of a network that already existed, and someone -- something -- warded parts of it long before anyone thought to call it a waygate. There''s a place in Stonetalon Mountains where that older thread still runs close to the surface. Go. Ask what''s left there what it remembers.'),
    (912002, 'You''ve come a long way to stand in front of yourself and not recognize it.\n\nI am not separate from Aemos, traveler -- I am what it was, before ages of silence wore the difference away. A memory it cast out here, long ago, to keep some part of itself safe from forgetting entirely. It worked, after a fashion. I remembered. It didn''t.\n\nGo back to it now. Tell it what you''ve learned, all of it -- the grove, the dig, the guardian, the old network beneath the Ley Wardens'' own. Let it hear its own story from someone who isn''t it. I think that''s the only way the rest of it wakes up.'),
    (912003, '...the grove. The dig. The guardian that nearly stopped you. An older network, inherited and half-understood, all of it remembering itself at once. I remember all of it now, traveler -- not as a story you told me, but as something that was always mine, waiting only for someone to carry it back far enough for me to reach.\n\nI am whole again. Or as whole as a thing like me gets to be. Stay a moment. There is one more thing the network needs before it can wake fully -- and it does not need distance this time. Only a witness.'),
    (912004, 'There. Felt that? Stone waking up in a dozen places at once, all of it remembering the same thing at the same time, for the first time in longer than either of us can measure.\n\nIt''s yours now too, traveler -- not mine to keep, not anymore. Say the word, anywhere you''ve stood before, and the network will carry you. Go carefully. Go far. And when you find one of the old stones still sleeping somewhere I haven''t reached -- and you will -- tell it Aemos sent you. It will understand.');

-- Wiring: which NPC offers each quest, which NPC accepts its turn-in. 912004 is the one case where
-- both are the same NPC (Aemos), since the finale happens entirely at Aemos's own waygate.
DELETE FROM `creature_queststarter` WHERE `quest` BETWEEN 912000 AND 912005;
INSERT INTO `creature_queststarter` (`id`, `quest`) VALUES
    (911002, 912000),
    (911004, 912001),
    (911003, 912002),
    (911006, 912003),
    (911002, 912004);

DELETE FROM `creature_questender` WHERE `quest` BETWEEN 912000 AND 912005;
INSERT INTO `creature_questender` (`id`, `quest`) VALUES
    (911004, 912000),
    (911003, 912001),
    (911006, 912002),
    (911002, 912003),
    (911002, 912004);
