-- Waygate Stones: replaces walk-into-the-zone auto-attunement (WaygateNetwork_Player::OnPlayerUpdateZone)
-- with a real, physical standing stone at each destination that a character must actually find and
-- interact with to attune -- see README.md's "Waygate Stones" section for the full design. Entering a
-- destination's zone now only shows a hint that a stone is somewhere nearby; the attunement itself
-- (mod_waygate_network_discovered row, unlock sound, chat message, first-attunement macro tip) only
-- happens via go_waygate_standing_stone::OnGossipHello.
--
-- One dedicated gameobject_template entry per destination (913001-913074, `entry = 913000 +
-- mod_waygate_network_locations.id`) rather than one shared template -- mirrors the same
-- one-custom-ID-per-spawn pattern already used for this module's NPCs (901000, 911001, 911002-911006)
-- rather than introducing a new lookup mechanism. The C++ side resolves which destination a given
-- stone represents from its own template entry (`go->GetEntry() - WAYGATE_STONE_ENTRY_BASE`) -- not
-- its spawn guid. Real `gameobject.guid` values in this client's local DB already run into the
-- millions, too real a collision risk to use as a deterministic per-destination key the way the
-- module's earlier NPC work could safely do with `creature.guid`/`guid`-adjacent low ranges.
--
-- Model: displayId 7789, the real "Ancient Stone Marker" (entry 188469), `type = 10`
-- (GAMEOBJECT_TYPE_GOOBER). Two rounds of real bugs before landing here:
-- 1) The original pick, the real "Caverns of Time Standing Stone" (displayId 9501), turned out
--    invalid on this server -- confirmed in-game via `.gobject add`, which logged "have invalid
--    displayId (9501), not spawned" for BOTH our clone and the real, unmodified 19501 entry, proving
--    it wasn't a scripting bug: this server's actual loaded GameObjectDisplayInfo.dbc is a reduced
--    client build (~3790 of a normal ~9000+ display records), and 9501 simply isn't one of them.
-- 2) The immediate replacement, "Nightelf Stone Rune" (displayId 236), rendered fine but couldn't be
--    interacted with at all -- because it's `type = 5` (GAMEOBJECT_TYPE_GENERIC), and every real
--    "click this object, run custom logic via OnGossipHello" GameObjectScript already in this
--    codebase (go_southfury_moonstone, go_tele_to_dalaran_crystal, etc.) turned out to use `type =
--    10` (GAMEOBJECT_TYPE_GOOBER) instead -- GENERIC is plain, non-interactive scenery; the client
--    likely never even offers a "use" prompt for it, so our OnGossipHello override never had a
--    chance to run regardless of how correctly it was wired server-side.
-- `Ancient Stone Marker` fixes both: displayId 7789 is confirmed present in this server's real DBC,
-- `type = 10` matches every real working precedent, and its one non-zero field (`Data3` =
-- `autoCloseTime`, a cosmetic 3s "activated" reset) is irrelevant here since `OnGossipHello`
-- returning `true` suppresses the default open/close behavior before it would ever run.
--
-- Coordinates are the *exact* existing coordinates from mod_waygate_network_locations -- already
-- real, already DB-verified ground from the v1.11-v1.14 continent batches, no new verification
-- needed. `rotation0-3 = 0` on every spawn row -- GameObject::SetWorldRotation falls back to
-- computing an upright Z-axis rotation purely from `orientation` when the rotation quaternion is
-- zero, the same as a Creature only needing `orientation`, so no quaternion math was needed.
DELETE FROM `gameobject_template` WHERE `entry` BETWEEN 913001 AND 913074;
INSERT INTO `gameobject_template`
    (`entry`, `type`, `displayId`, `name`, `IconName`, `ScriptName`)
VALUES
    (913001, 10, 7789, 'Waygate Stone: Stormwind City', '', 'go_waygate_standing_stone'),
    (913002, 10, 7789, 'Waygate Stone: Ironforge', '', 'go_waygate_standing_stone'),
    (913003, 10, 7789, 'Waygate Stone: Undercity', '', 'go_waygate_standing_stone'),
    (913004, 10, 7789, 'Waygate Stone: Darnassus', '', 'go_waygate_standing_stone'),
    (913005, 10, 7789, 'Waygate Stone: Orgrimmar', '', 'go_waygate_standing_stone'),
    (913006, 10, 7789, 'Waygate Stone: Thunder Bluff', '', 'go_waygate_standing_stone'),
    (913007, 10, 7789, 'Waygate Stone: The Exodar', '', 'go_waygate_standing_stone'),
    (913008, 10, 7789, 'Waygate Stone: Silvermoon City', '', 'go_waygate_standing_stone'),
    (913009, 10, 7789, 'Waygate Stone: Shattrath City', '', 'go_waygate_standing_stone'),
    (913010, 10, 7789, 'Waygate Stone: Dalaran', '', 'go_waygate_standing_stone'),
    (913011, 10, 7789, 'Waygate Stone: Kargath', '', 'go_waygate_standing_stone'),
    (913012, 10, 7789, 'Waygate Stone: Kharanos', '', 'go_waygate_standing_stone'),
    (913013, 10, 7789, 'Waygate Stone: Darkshire', '', 'go_waygate_standing_stone'),
    (913014, 10, 7789, 'Waygate Stone: Light''s Hope Chapel', '', 'go_waygate_standing_stone'),
    (913015, 10, 7789, 'Waygate Stone: Goldshire', '', 'go_waygate_standing_stone'),
    (913016, 10, 7789, 'Waygate Stone: Southshore', '', 'go_waygate_standing_stone'),
    (913017, 10, 7789, 'Waygate Stone: Tarren Mill', '', 'go_waygate_standing_stone'),
    (913018, 10, 7789, 'Waygate Stone: Thelsamar', '', 'go_waygate_standing_stone'),
    (913019, 10, 7789, 'Waygate Stone: Lakeshire', '', 'go_waygate_standing_stone'),
    (913020, 10, 7789, 'Waygate Stone: The Sepulcher', '', 'go_waygate_standing_stone'),
    (913021, 10, 7789, 'Waygate Stone: Booty Bay', '', 'go_waygate_standing_stone'),
    (913022, 10, 7789, 'Waygate Stone: Stonard', '', 'go_waygate_standing_stone'),
    (913023, 10, 7789, 'Waygate Stone: Aerie Peak', '', 'go_waygate_standing_stone'),
    (913024, 10, 7789, 'Waygate Stone: Revantusk Village', '', 'go_waygate_standing_stone'),
    (913025, 10, 7789, 'Waygate Stone: Brill', '', 'go_waygate_standing_stone'),
    (913026, 10, 7789, 'Waygate Stone: Sentinel Hill', '', 'go_waygate_standing_stone'),
    (913027, 10, 7789, 'Waygate Stone: Menethil Harbor', '', 'go_waygate_standing_stone'),
    (913028, 10, 7789, 'Waygate Stone: Astranaar', '', 'go_waygate_standing_stone'),
    (913029, 10, 7789, 'Waygate Stone: Auberdine', '', 'go_waygate_standing_stone'),
    (913030, 10, 7789, 'Waygate Stone: Sar''theris Strand', '', 'go_waygate_standing_stone'),
    (913031, 10, 7789, 'Waygate Stone: Razor Hill', '', 'go_waygate_standing_stone'),
    (913032, 10, 7789, 'Waygate Stone: Brackenwall Village', '', 'go_waygate_standing_stone'),
    (913033, 10, 7789, 'Waygate Stone: Mudsprocket', '', 'go_waygate_standing_stone'),
    (913034, 10, 7789, 'Waygate Stone: Theramore Isle', '', 'go_waygate_standing_stone'),
    (913035, 10, 7789, 'Waygate Stone: Camp Mojache', '', 'go_waygate_standing_stone'),
    (913036, 10, 7789, 'Waygate Stone: Feathermoon Stronghold', '', 'go_waygate_standing_stone'),
    (913037, 10, 7789, 'Waygate Stone: Bloodhoof Village', '', 'go_waygate_standing_stone'),
    (913038, 10, 7789, 'Waygate Stone: Cenarion Hold', '', 'go_waygate_standing_stone'),
    (913039, 10, 7789, 'Waygate Stone: Gadgetzan', '', 'go_waygate_standing_stone'),
    (913040, 10, 7789, 'Waygate Stone: Dolanaar', '', 'go_waygate_standing_stone'),
    (913041, 10, 7789, 'Waygate Stone: The Crossroads', '', 'go_waygate_standing_stone'),
    (913042, 10, 7789, 'Waygate Stone: Camp Taurajo', '', 'go_waygate_standing_stone'),
    (913043, 10, 7789, 'Waygate Stone: Ratchet', '', 'go_waygate_standing_stone'),
    (913044, 10, 7789, 'Waygate Stone: Freewind Post', '', 'go_waygate_standing_stone'),
    (913045, 10, 7789, 'Waygate Stone: Everlook', '', 'go_waygate_standing_stone'),
    (913046, 10, 7789, 'Waygate Stone: Azure Watch', '', 'go_waygate_standing_stone'),
    (913047, 10, 7789, 'Waygate Stone: Sylvanaar', '', 'go_waygate_standing_stone'),
    (913048, 10, 7789, 'Waygate Stone: Thunderlord Stronghold', '', 'go_waygate_standing_stone'),
    (913049, 10, 7789, 'Waygate Stone: Fairbreeze Village', '', 'go_waygate_standing_stone'),
    (913050, 10, 7789, 'Waygate Stone: Tranquillien', '', 'go_waygate_standing_stone'),
    (913051, 10, 7789, 'Waygate Stone: Honor Hold', '', 'go_waygate_standing_stone'),
    (913052, 10, 7789, 'Waygate Stone: Thrallmar', '', 'go_waygate_standing_stone'),
    (913053, 10, 7789, 'Waygate Stone: Garadar', '', 'go_waygate_standing_stone'),
    (913054, 10, 7789, 'Waygate Stone: Area 52', '', 'go_waygate_standing_stone'),
    (913055, 10, 7789, 'Waygate Stone: Wildhammer Stronghold', '', 'go_waygate_standing_stone'),
    (913056, 10, 7789, 'Waygate Stone: Shadowmoon Village', '', 'go_waygate_standing_stone'),
    (913057, 10, 7789, 'Waygate Stone: Allerian Stronghold', '', 'go_waygate_standing_stone'),
    (913058, 10, 7789, 'Waygate Stone: Stonebreaker Hold', '', 'go_waygate_standing_stone'),
    (913059, 10, 7789, 'Waygate Stone: Cenarion Refuge', '', 'go_waygate_standing_stone'),
    (913060, 10, 7789, 'Waygate Stone: The Harborage', '', 'go_waygate_standing_stone'),
    (913061, 10, 7789, 'Waygate Stone: Zabra''jin', '', 'go_waygate_standing_stone'),
    (913062, 10, 7789, 'Waygate Stone: Valiance Keep', '', 'go_waygate_standing_stone'),
    (913063, 10, 7789, 'Waygate Stone: Warsong Hold', '', 'go_waygate_standing_stone'),
    (913064, 10, 7789, 'Waygate Stone: Taunka''le Village', '', 'go_waygate_standing_stone'),
    (913065, 10, 7789, 'Waygate Stone: Agmar''s Hammer', '', 'go_waygate_standing_stone'),
    (913066, 10, 7789, 'Waygate Stone: Wintergarde Keep', '', 'go_waygate_standing_stone'),
    (913067, 10, 7789, 'Waygate Stone: Wyrmrest Temple', '', 'go_waygate_standing_stone'),
    (913068, 10, 7789, 'Waygate Stone: Amberpine Lodge', '', 'go_waygate_standing_stone'),
    (913069, 10, 7789, 'Waygate Stone: Conquest Hold', '', 'go_waygate_standing_stone'),
    (913070, 10, 7789, 'Waygate Stone: Valgarde', '', 'go_waygate_standing_stone'),
    (913071, 10, 7789, 'Waygate Stone: Vengeance Landing', '', 'go_waygate_standing_stone'),
    (913072, 10, 7789, 'Waygate Stone: Camp Nesingwary', '', 'go_waygate_standing_stone'),
    (913073, 10, 7789, 'Waygate Stone: K3', '', 'go_waygate_standing_stone'),
    (913074, 10, 7789, 'Waygate Stone: The Argent Stand', '', 'go_waygate_standing_stone');

DELETE FROM `gameobject` WHERE `id` BETWEEN 913001 AND 913074;
INSERT INTO `gameobject`
    (`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`,
     `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`, `ScriptName`)
VALUES
    (913001, 0, 1, 1, -8833.38, 628.628, 94.0066, 1.06535, 0, 0, 0, 0, 300, 100, 1, ''),
    (913002, 0, 1, 1, -4918.88, -940.406, 501.564, 5.42347, 0, 0, 0, 0, 300, 100, 1, ''),
    (913003, 0, 1, 1, 1584.14, 240.308, -52.1534, 0.041793, 0, 0, 0, 0, 300, 100, 1, ''),
    (913004, 1, 1, 1, 9949.56, 2284.21, 1341.4, 1.59587, 0, 0, 0, 0, 300, 100, 1, ''),
    (913005, 1, 1, 1, 1629.85, -4373.64, 31.5573, 3.69762, 0, 0, 0, 0, 300, 100, 1, ''),
    (913006, 1, 1, 1, -1277.37, 124.804, 131.287, 5.22274, 0, 0, 0, 0, 300, 100, 1, ''),
    (913007, 530, 1, 1, -3965.7, -11653.6, -138.844, 0.852154, 0, 0, 0, 0, 300, 100, 1, ''),
    (913008, 530, 1, 1, 9487.69, -7279.2, 14.2866, 6.16478, 0, 0, 0, 0, 300, 100, 1, ''),
    (913009, 530, 1, 1, -1838.16, 5301.79, -12.428, 5.9517, 0, 0, 0, 0, 300, 100, 1, ''),
    (913010, 571, 1, 1, 5807.98, 588.487, 660.94, 1.66594, 0, 0, 0, 0, 300, 100, 1, ''),
    (913011, 0, 1, 1, -6650.01, -2149.09, 245.434, 3.997, 0, 0, 0, 0, 300, 100, 1, ''),
    (913012, 0, 1, 1, -5601.6, -531.2, 399.737, 2.129, 0, 0, 0, 0, 300, 100, 1, ''),
    (913013, 0, 1, 1, -10516, -1161.21, 28.116, 4.032, 0, 0, 0, 0, 300, 100, 1, ''),
    (913014, 0, 1, 1, 2300.9, -5345.09, 90.88, 2.164, 0, 0, 0, 0, 300, 100, 1, ''),
    (913015, 0, 1, 1, -9462.66, 16.19, 57.046, 3.037, 0, 0, 0, 0, 300, 100, 1, ''),
    (913016, 0, 1, 1, -857.1, -570.75, 11.165, 1.553, 0, 0, 0, 0, 300, 100, 1, ''),
    (913017, 0, 1, 1, -5.97, -942.28, 57.162, 2.741, 0, 0, 0, 0, 300, 100, 1, ''),
    (913018, 0, 1, 1, -5377.91, -2973.91, 323.252, 1.78, 0, 0, 0, 0, 300, 100, 1, ''),
    (913019, 0, 1, 1, -9223.98, -2157.12, 64.017, 3.054, 0, 0, 0, 0, 300, 100, 1, ''),
    (913020, 0, 1, 1, 510.92, 1636.47, 126.027, 4.311, 0, 0, 0, 0, 300, 100, 1, ''),
    (913021, 0, 1, 1, -14457.7, 495.35, 15.213, 3.979, 0, 0, 0, 0, 300, 100, 1, ''),
    (913022, 0, 1, 1, -10487.3, -3258.84, 21.113, 0.105, 0, 0, 0, 0, 300, 100, 1, ''),
    (913023, 0, 1, 1, 399.73, -2119.74, 131.664, 4.93, 0, 0, 0, 0, 300, 100, 1, ''),
    (913024, 0, 1, 1, -622.03, -4583.4, 11.77, 5.515, 0, 0, 0, 0, 300, 100, 1, ''),
    (913025, 0, 1, 1, 2269.51, 244.94, 34.34, 3.752, 0, 0, 0, 0, 300, 100, 1, ''),
    (913026, 0, 1, 1, -10653.4, 1166.52, 34.565, 5.745, 0, 0, 0, 0, 300, 100, 1, ''),
    (913027, 0, 1, 1, -3827.93, -831.9, 10.091, 0.401, 0, 0, 0, 0, 300, 100, 1, ''),
    (913028, 1, 1, 1, 2781.16, -433, 116.665, 2.583, 0, 0, 0, 0, 300, 100, 1, ''),
    (913029, 1, 1, 1, 6406.51, 515.37, 8.726, 1.274, 0, 0, 0, 0, 300, 100, 1, ''),
    (913030, 1, 1, 1, -1592.84, 3150.27, 46.578, 4.189, 0, 0, 0, 0, 300, 100, 1, ''),
    (913031, 1, 1, 1, 340.36, -4686.29, 16.541, 4.189, 0, 0, 0, 0, 300, 100, 1, ''),
    (913032, 1, 1, 1, -3165.61, -2911.76, 35.139, 0.733, 0, 0, 0, 0, 300, 100, 1, ''),
    (913033, 1, 1, 1, -4629.94, -3176.12, 41.324, 6.263, 0, 0, 0, 0, 300, 100, 1, ''),
    (913034, 1, 1, 1, -3616.13, -4470.82, 14.329, 2.217, 0, 0, 0, 0, 300, 100, 1, ''),
    (913035, 1, 1, 1, -4460.1, 242.72, 39.191, 0.506, 0, 0, 0, 0, 300, 100, 1, ''),
    (913036, 1, 1, 1, -4381.59, 3289.45, 13.627, 0.035, 0, 0, 0, 0, 300, 100, 1, ''),
    (913037, 1, 1, 1, -2365.37, -347.31, -8.874, 5.847, 0, 0, 0, 0, 300, 100, 1, ''),
    (913038, 1, 1, 1, -6868.04, 729.91, 45.745, 0.489, 0, 0, 0, 0, 300, 100, 1, ''),
    (913039, 1, 1, 1, -7158.96, -3841.61, 8.848, 1.955, 0, 0, 0, 0, 300, 100, 1, ''),
    (913040, 1, 1, 1, 9802.21, 982.61, 1313.98, 4.8, 0, 0, 0, 0, 300, 100, 1, ''),
    (913041, 1, 1, 1, -407.12, -2645.22, 96.306, 3.438, 0, 0, 0, 0, 300, 100, 1, ''),
    (913042, 1, 1, 1, -2376.27, -1995.74, 96.788, 1.065, 0, 0, 0, 0, 300, 100, 1, ''),
    (913043, 1, 1, 1, -1050.04, -3664.8, 23.968, 6.004, 0, 0, 0, 0, 300, 100, 1, ''),
    (913044, 1, 1, 1, -5477.85, -2460.43, 89.367, 0.314, 0, 0, 0, 0, 300, 100, 1, ''),
    (913045, 1, 1, 1, 6695.15, -4673.04, 721.65, 0.541, 0, 0, 0, 0, 300, 100, 1, ''),
    (913046, 530, 1, 1, -4129.43, -12469, 44.185, 3.905, 0, 0, 0, 0, 300, 100, 1, ''),
    (913047, 530, 1, 1, 2098.18, 6903.92, 183.313, 3.752, 0, 0, 0, 0, 300, 100, 1, ''),
    (913048, 530, 1, 1, 2404.13, 5950.76, 152.192, 1.763, 0, 0, 0, 0, 300, 100, 1, ''),
    (913049, 530, 1, 1, 8700.38, -6638.36, 72.828, 5.515, 0, 0, 0, 0, 300, 100, 1, ''),
    (913050, 530, 1, 1, 7553.37, -6897.35, 96.11, 1.1, 0, 0, 0, 0, 300, 100, 1, ''),
    (913051, 530, 1, 1, -708.87, 2739.13, 94.817, 5.044, 0, 0, 0, 0, 300, 100, 1, ''),
    (913052, 530, 1, 1, 190.88, 2610.93, 87.367, 2.426, 0, 0, 0, 0, 300, 100, 1, ''),
    (913053, 530, 1, 1, -1229.58, 7161.33, 57.348, 2.478, 0, 0, 0, 0, 300, 100, 1, ''),
    (913054, 530, 1, 1, 3062.15, 3701.82, 142.562, 4.8, 0, 0, 0, 0, 300, 100, 1, ''),
    (913055, 530, 1, 1, -4084.32, 2186.97, 107.585, 0.14, 0, 0, 0, 0, 300, 100, 1, ''),
    (913056, 530, 1, 1, -2965, 2562, 78.6, 2, 0, 0, 0, 0, 300, 100, 1, ''),
    (913057, 530, 1, 1, -2917.88, 4021.48, 0.511, 3.665, 0, 0, 0, 0, 300, 100, 1, ''),
    (913058, 530, 1, 1, -2621.78, 4450.3, 36.177, 4.625, 0, 0, 0, 0, 300, 100, 1, ''),
    (913059, 530, 1, 1, -174.48, 5529.21, 29.491, 3.334, 0, 0, 0, 0, 300, 100, 1, ''),
    (913060, 530, 1, 1, 1056.38, 7370.99, 39.667, 3.857, 0, 0, 0, 0, 300, 100, 1, ''),
    (913061, 530, 1, 1, 228.16, 7933.88, 25.161, 5.131, 0, 0, 0, 0, 300, 100, 1, ''),
    (913062, 571, 1, 1, 2282.29, 5210.83, 12.577, 4.259, 0, 0, 0, 0, 300, 100, 1, ''),
    (913063, 571, 1, 1, 2803.7, 6154.5, 85.246, 3.91, 0, 0, 0, 0, 300, 100, 1, ''),
    (913064, 571, 1, 1, 3468.64, 4175.04, 17.276, 4.206, 0, 0, 0, 0, 300, 100, 1, ''),
    (913065, 571, 1, 1, 3830.37, 1485.49, 92.061, 0.838, 0, 0, 0, 0, 300, 100, 1, ''),
    (913066, 571, 1, 1, 3647.95, -717.2, 215.034, 3.013, 0, 0, 0, 0, 300, 100, 1, ''),
    (913067, 571, 1, 1, 3546.74, 273.06, 45.663, 1.815, 0, 0, 0, 0, 300, 100, 1, ''),
    (913068, 571, 1, 1, 3406.96, -2788.63, 201.604, 5.48, 0, 0, 0, 0, 300, 100, 1, ''),
    (913069, 571, 1, 1, 3256.43, -2202.08, 117.112, 5.794, 0, 0, 0, 0, 300, 100, 1, ''),
    (913070, 571, 1, 1, 599.04, -4928.18, 19.087, 4.992, 0, 0, 0, 0, 300, 100, 1, ''),
    (913071, 571, 1, 1, 1873.32, -6218.15, 13.184, 1.344, 0, 0, 0, 0, 300, 100, 1, ''),
    (913072, 571, 1, 1, 5566.25, 5763.71, -75.142, 6.231, 0, 0, 0, 0, 300, 100, 1, ''),
    (913073, 571, 1, 1, 6124.42, -1080.96, 402.624, 2.496, 0, 0, 0, 0, 300, 100, 1, ''),
    (913074, 571, 1, 1, 5462.97, -2639.05, 306.634, 2.775, 0, 0, 0, 0, 300, 100, 1, '');
