taxi builder

This commit is contained in:
2026-05-11 18:35:47 +04:00
parent 0a3d3b6afa
commit 13747727cf
21 changed files with 3578 additions and 0 deletions
@@ -0,0 +1,61 @@
--
-- Taxi Route Builder: storage for custom flight nodes, paths and waypoints.
-- DBC files (TaxiNodes / TaxiPath / TaxiPathNode) are GENERATED from these
-- tables by the moonwell-taxi CLI. These tables are the source of truth.
--
-- ID space (enforced by the in-game module, not by this schema):
-- * custom_taxi_nodes.id >= 1000 (vanilla WotLK uses up to ~313)
-- * custom_taxi_paths.id >= 90000 (vanilla uses up to ~700)
-- from_taxi_node_id / to_taxi_node_id may reference EITHER a row in
-- custom_taxi_nodes OR a vanilla TaxiNodes.dbc id, so no FK is declared.
--
CREATE TABLE IF NOT EXISTS `custom_taxi_nodes` (
`id` int unsigned NOT NULL,
`name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`map_id` smallint unsigned NOT NULL DEFAULT '0',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`mount_alliance` int unsigned NOT NULL DEFAULT '0',
`mount_horde` int unsigned NOT NULL DEFAULT '0',
`created_by` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'character GUID of GM who created the node',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='Taxi Builder: custom flight masters (source for TaxiNodes.dbc)';
CREATE TABLE IF NOT EXISTS `custom_taxi_paths` (
`id` int unsigned NOT NULL,
`from_taxi_node_id` int unsigned NOT NULL,
`to_taxi_node_id` int unsigned NOT NULL,
`cost` int unsigned NOT NULL DEFAULT '0' COMMENT 'flight cost in copper',
`is_enabled` tinyint(1) unsigned NOT NULL DEFAULT '1',
`created_by` bigint unsigned NOT NULL DEFAULT '0',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_from_to` (`from_taxi_node_id`, `to_taxi_node_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='Taxi Builder: custom directed paths (source for TaxiPath.dbc)';
CREATE TABLE IF NOT EXISTS `custom_taxi_path_nodes` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`path_id` int unsigned NOT NULL,
`node_index` int unsigned NOT NULL COMMENT '0-based, contiguous within a path',
`map_id` smallint unsigned NOT NULL DEFAULT '0',
`position_x` float NOT NULL DEFAULT '0',
`position_y` float NOT NULL DEFAULT '0',
`position_z` float NOT NULL DEFAULT '0',
`flags` int unsigned NOT NULL DEFAULT '0' COMMENT 'TaxiPathNode flags (teleport=1, stop=2, ...)',
`delay` int unsigned NOT NULL DEFAULT '0',
`arrival_event_id` int unsigned NOT NULL DEFAULT '0',
`departure_event_id` int unsigned NOT NULL DEFAULT '0',
`comment` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_path_index` (`path_id`, `node_index`),
KEY `idx_path` (`path_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
COMMENT='Taxi Builder: waypoints of custom paths (source for TaxiPathNode.dbc)';