-- Waygate destinations, loaded into memory once at startup (WorldScript::OnLoadCustomDatabaseTable)
-- instead of being hardcoded in C++. Adding a destination is now a plain INSERT here -- no rebuild.
-- IDs 1-8 (the original capital cities) are preserved exactly as they were in the old hardcoded
-- WaygateDestinationList, since existing mod_waygate_network_discovered rows reference these IDs.
CREATE TABLE IF NOT EXISTS `mod_waygate_network_locations` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(64) NOT NULL,
  `map` SMALLINT UNSIGNED NOT NULL,
  `zone` SMALLINT UNSIGNED NOT NULL,
  `position_x` FLOAT NOT NULL,
  `position_y` FLOAT NOT NULL,
  `position_z` FLOAT NOT NULL,
  `orientation` FLOAT NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

DELETE FROM `mod_waygate_network_locations` WHERE `id` IN (1, 2, 3, 4, 5, 6, 7, 8);
INSERT INTO `mod_waygate_network_locations`
    (`id`, `name`, `map`, `zone`, `position_x`, `position_y`, `position_z`, `orientation`)
VALUES
    (1, 'Stormwind City',  0,   1519, -8833.38, 628.628,   94.0066,  1.06535),
    (2, 'Ironforge',       0,   1537, -4918.88, -940.406,  501.564,  5.42347),
    (3, 'Undercity',       0,   1497,  1584.14,  240.308,  -52.1534, 0.041793),
    (4, 'Darnassus',       1,   1657,  9949.56,  2284.21,   1341.4,  1.59587),
    (5, 'Orgrimmar',       1,   1637,  1629.85, -4373.64,   31.5573, 3.69762),
    (6, 'Thunder Bluff',   1,   1638, -1277.37,  124.804,   131.287, 5.22274),
    (7, 'The Exodar',      530, 3557, -3965.7,  -11653.6,  -138.844, 0.852154),
    (8, 'Silvermoon City', 530, 3487,  9487.69, -7279.2,    14.2866, 6.16478);