diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-01-30 16:26:31 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-01-30 18:10:21 +0100 |
| commit | 7851cd3a9618b245c9b425dcaf71bbadbfecd054 (patch) | |
| tree | 576a6c2632537cbb44305a97d7573ad4a307afd1 /sql | |
| parent | 0417c5ff5fd68cd3344dede35afaab364870561b (diff) | |
Core/AreaTriggers: Code cleanup
Diffstat (limited to 'sql')
| -rw-r--r-- | sql/updates/world/master/2021_01_30_00_world_mage_tower.sql | 45 | ||||
| -rw-r--r-- | sql/updates/world/master/2021_01_30_01_world_serverside_areatriggers.sql | 42 |
2 files changed, 42 insertions, 45 deletions
diff --git a/sql/updates/world/master/2021_01_30_00_world_mage_tower.sql b/sql/updates/world/master/2021_01_30_00_world_mage_tower.sql deleted file mode 100644 index dd56b289821..00000000000 --- a/sql/updates/world/master/2021_01_30_00_world_mage_tower.sql +++ /dev/null @@ -1,45 +0,0 @@ - -ALTER TABLE `areatrigger_template` -DROP PRIMARY KEY, -ADD COLUMN `IsServer` tinyint(1) NOT NULL AFTER `Id`, -ADD PRIMARY KEY (`Id`, `IsServer`); - -ALTER TABLE `areatrigger_template_actions` -DROP PRIMARY KEY, -ADD COLUMN `IsServer` tinyint(1) NOT NULL AFTER `AreaTriggerId`, -ADD PRIMARY KEY (`AreaTriggerId`, `IsServer`); - -CREATE TABLE `areatrigger_positions` ( - `SpawnId` int(12) unsigned NOT NULL, - `Id` int(10) unsigned NOT NULL, - `IsServer` tinyint(1) NOT NULL, - `MapId` int(10) NOT NULL, - `PosX` float NOT NULL, - `PosY` float NOT NULL, - `PosZ` float NOT NULL, - `PhaseId` int(10) DEFAULT 0, - `PhaseGroup` int(10) DEFAULT 0, - `PhaseUseFlags` tinyint(3) DEFAULT 0, - `Comment` varchar(255) DEFAULT NULL, - PRIMARY KEY (`SpawnId`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; - - -DELETE FROM `areatrigger_positions` WHERE `SpawnId` IN (1, 2); -INSERT INTO `areatrigger_positions` (`SpawnId`, `Id`, `IsServer`, `MapId`, `PosX`, `PosY`, `PosZ`, `PhaseId`, `PhaseGroup`, `PhaseUseFlags`, `Comment`) VALUES - (1, 1, 1, 0, -9015.774, 877.223, 148.61871, 0, 0, 0, 'Stormwind Mage Portal Entrance'), - (2, 2, 1, 0, -8999.866, 864.13995, 65.88978, 0, 0, 0, 'Stormwind Mage Portal Exit'); - -DELETE FROM `areatrigger_template` WHERE `Id` in (1, 2) AND `IsServer` = 1; -INSERT INTO `areatrigger_template` (`Id`, `IsServer`, `Type`, `Flags`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `ScriptName`, `VerifiedBuild`) VALUES - (1, 1, 1, 0, 1.2597655, 1.2792665, 3.7021635, 0, 0, 0, '', 0), - (2, 1, 1, 0, 1.2597655, 1.2792665, 3.7021635, 0, 0, 0, '', 0); - - -DELETE FROM `areatrigger_template_actions` WHERE `AreaTriggerId` IN (1, 2) AND `IsServer` = 1; -INSERT INTO `areatrigger_template_actions` (`AreaTriggerId`, `IsServer`, `ActionType`, `ActionParam`, `TargetType`) VALUES - (1, 1, 2, 3631, 5), - (2, 1, 2, 3630, 5); - - -UPDATE `world_safe_locs` SET LocX=-9014.864258, LocY=874.324890, LocZ=148.618713 WHERE `id` = 3630;
\ No newline at end of file diff --git a/sql/updates/world/master/2021_01_30_01_world_serverside_areatriggers.sql b/sql/updates/world/master/2021_01_30_01_world_serverside_areatriggers.sql new file mode 100644 index 00000000000..22abd625043 --- /dev/null +++ b/sql/updates/world/master/2021_01_30_01_world_serverside_areatriggers.sql @@ -0,0 +1,42 @@ +ALTER TABLE `areatrigger_template` + DROP PRIMARY KEY, + ADD COLUMN `IsServerSide` tinyint(1) unsigned NOT NULL AFTER `Id`, + ADD PRIMARY KEY (`Id`, `IsServerSide`); + +ALTER TABLE `areatrigger_template_actions` + DROP PRIMARY KEY, + ADD COLUMN `IsServerSide` tinyint(1) unsigned NOT NULL AFTER `AreaTriggerId`, + ADD PRIMARY KEY (`AreaTriggerId`, `IsServerSide`); + +CREATE TABLE `areatrigger` ( + `SpawnId` bigint(20) unsigned NOT NULL, + `AreaTriggerId` int(10) unsigned NOT NULL, + `IsServerSide` tinyint(1) unsigned NOT NULL, + `MapId` int(10) unsigned NOT NULL, + `PosX` float NOT NULL, + `PosY` float NOT NULL, + `PosZ` float NOT NULL, + `Orientation` float NOT NULL, + `PhaseUseFlags` tinyint(3) unsigned DEFAULT '0', + `PhaseId` int(10) unsigned DEFAULT '0', + `PhaseGroup` int(10) unsigned DEFAULT '0', + `Comment` varchar(255) DEFAULT NULL, + PRIMARY KEY (`SpawnId`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +DELETE FROM `areatrigger` WHERE `SpawnId` IN (1, 2); +INSERT INTO `areatrigger` (`SpawnId`, `AreaTriggerId`, `IsServerSide`, `MapId`, `PosX`, `PosY`, `PosZ`, `Orientation`, `PhaseUseFlags`, `PhaseId`, `PhaseGroup`, `Comment`) VALUES +(1, 1, 1, 0, -9016.11, 876.142, 148.617, 0.7259, 1, 0, 0, 'Stormwind Mage Portal Entrance'), +(2, 2, 1, 0, -8999.866, 864.13995, 65.88978, 0, 1, 0, 0, 'Stormwind Mage Portal Exit'); + +DELETE FROM `areatrigger_template` WHERE `Id` in (1, 2) AND `IsServerSide` = 1; +INSERT INTO `areatrigger_template` (`Id`, `IsServerSide`, `Type`, `Flags`, `Data0`, `Data1`, `Data2`, `Data3`, `Data4`, `Data5`, `ScriptName`, `VerifiedBuild`) VALUES +(1, 1, 1, 0, 3, 1, 3, 0, 0, 0, '', 0), +(2, 1, 1, 0, 1.2597655, 1.2792665, 3.7021635, 0, 0, 0, '', 0); + +DELETE FROM `areatrigger_template_actions` WHERE `AreaTriggerId` IN (1, 2) AND `IsServerSide` = 1; +INSERT INTO `areatrigger_template_actions` (`AreaTriggerId`, `IsServerSide`, `ActionType`, `ActionParam`, `TargetType`) VALUES +(1, 1, 2, 3631, 5), +(2, 1, 2, 3630, 5); + +UPDATE `world_safe_locs` SET LocX=-9014.864258, LocY=874.324890, LocZ=148.618713 WHERE `id`=3630; |
