Core/AreaTrigger Switch polygon vertices from Template to SpellMisc

Port From (https://github.com/TrinityCore/TrinityCore/commit/c60cb7bab1e85fcc33be2f6bb0178adc0216c867)
This commit is contained in:
hondacrx
2021-09-13 13:39:07 -04:00
parent 381669fea6
commit 505e5ae216
@@ -0,0 +1,18 @@
DROP TABLE IF EXISTS `spell_areatrigger_vertices`;
CREATE TABLE `spell_areatrigger_vertices` (
`SpellMiscId` int(10) unsigned NOT NULL,
`Idx` int(10) unsigned NOT NULL,
`VerticeX` float NOT NULL DEFAULT '0',
`VerticeY` float NOT NULL DEFAULT '0',
`VerticeTargetX` float DEFAULT NULL,
`VerticeTargetY` float DEFAULT NULL,
`VerifiedBuild` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`SpellMiscId`,`Idx`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO `spell_areatrigger_vertices`
SELECT `sa`.`SpellMiscId`,`atpv`.`Idx`,`atpv`.`VerticeX`,`atpv`.`VerticeY`,`atpv`.`VerticeTargetX`,`atpv`.`VerticeTargetY`,`atpv`.`VerifiedBuild`
FROM `spell_areatrigger` `sa`
INNER JOIN `areatrigger_template_polygon_vertices` `atpv` ON `sa`.`AreaTriggerId`=`atpv`.`AreaTriggerId`;
DROP TABLE `areatrigger_template_polygon_vertices`;