[Dynamic Zones] Implement dz templates (#2345)

This allows shared tasks to create dz instances automatically through
the `dz_template_id` field instead of using quest scripts. Quest apis
were also added to create expeditions from template ids.
This commit is contained in:
hg
2022-07-30 22:25:43 -04:00
committed by GitHub
parent 5e7e255d72
commit 53b599518a
26 changed files with 756 additions and 5 deletions
+1
View File
@@ -448,6 +448,7 @@
9192|2022_07_13_task_lock_activity.sql|SHOW COLUMNS FROM `tasks` LIKE 'lock_activity_id'|empty|
9193|2022_07_16_task_timer_groups.sql|SHOW COLUMNS FROM `tasks` LIKE 'replay_timer_group'|empty|
9194|2022_07_23_dz_switch_id.sql|SHOW COLUMNS FROM `doors` LIKE 'dz_switch_id'|empty|
9195|2022_07_23_dz_templates.sql|SHOW TABLES like 'dynamic_zone_templates'|empty|
# Upgrade conditions:
# This won't be needed after this system is implemented, but it is used database that are not
@@ -0,0 +1,28 @@
CREATE TABLE `dynamic_zone_templates` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`zone_id` int(11) NOT NULL DEFAULT 0,
`zone_version` int(11) NOT NULL DEFAULT 0,
`name` varchar(128) NOT NULL DEFAULT '',
`min_players` int(11) NOT NULL DEFAULT 0,
`max_players` int(11) NOT NULL DEFAULT 0,
`duration_seconds` int(11) NOT NULL DEFAULT 0,
`dz_switch_id` int(11) NOT NULL DEFAULT 0,
`compass_zone_id` int(11) NOT NULL DEFAULT 0,
`compass_x` float NOT NULL DEFAULT 0,
`compass_y` float NOT NULL DEFAULT 0,
`compass_z` float NOT NULL DEFAULT 0,
`return_zone_id` int(11) NOT NULL DEFAULT 0,
`return_x` float NOT NULL DEFAULT 0,
`return_y` float NOT NULL DEFAULT 0,
`return_z` float NOT NULL DEFAULT 0,
`return_h` float NOT NULL DEFAULT 0,
`override_zone_in` tinyint(4) NOT NULL DEFAULT 0,
`zone_in_x` float NOT NULL DEFAULT 0,
`zone_in_y` float NOT NULL DEFAULT 0,
`zone_in_z` float NOT NULL DEFAULT 0,
`zone_in_h` float NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE `tasks`
ADD COLUMN `dz_template_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `request_timer_seconds`;