TrinityCore/TrinityCore — pull request #9283 by gerripeach (2013-02-23 19:59:13+00:00)
Title: Core/Script: BWL full rewrite

-- doors
SET @DOOR_GUID = 2028143; -- 5
DELETE FROM `gameobject` WHERE `guid` BETWEEN @DOOR_GUID AND @DOOR_GUID+4;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation2`, `rotation3`, `spawntimesecs`, `state`) VALUES
(@DOOR_GUID , 181125, 469, -7488.35, -1150.67, 476.534, 0.674574, 0.330928, 0.943656, 300, 1),
(@DOOR_GUID+1, 185483, 469, -7455.08, -1051.84, 476.556, 2.17155, 0.884665, 0.466227, 300, 1),
(@DOOR_GUID+2, 180424, 469, -7565.34, -1029.19, 449.142, 3.75568, 0.953231, -0.302244, 300, 1),
(@DOOR_GUID+3, 175185, 469, -7520.27, -972.05, 423.429, 5.32599, 0.460536, -0.887641, 300, 1),
(@DOOR_GUID+4, 175946, 469, -7552.26, -1022.92, 408.491, 3.75109, 0.953922, -0.300053, 300, 1);

-- wrong creature spawn
DELETE FROM `creature` WHERE `guid` IN (84511, 84510, 84509, 84505, 84444, 84404, 84393);
DELETE FROM `creature` WHERE `guid` IN (84496, 84489, 84487, 84439, 84437, 84405, 84403);
DELETE FROM `creature` WHERE `guid` IN (84503, 84494, 84493, 84392);
DELETE FROM `creature` WHERE `guid` IN (84486, 84484, 84436);
DELETE FROM `creature` WHERE `guid` IN (84495, 84432, 84406);

-- eggs for razorgore
SET @GUID_EGG = 2028113; -- 30
DELETE FROM `gameobject` WHERE `guid` BETWEEN @GUID_EGG AND @GUID_EGG+29;
INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES
(@GUID_EGG, 177807, 469, 1, 1, -7590.54, -1045.57, 408.158, 0.454774, 0, 0, 0.225432, 0.974259, 300, 0, 1),
(@GUID_EGG+1, 177807, 469, 1, 1, -7548.36, -1073.68, 408.491, 5.71301, 0, 0, 0.281239, -0.959638, 300, 0, 1),
(@GUID_EGG+2, 177807, 469, 1, 1, -7568.02, -1061.08, 408.491, 5.71301, 0, 0, 0.281239, -0.959638, 300, 0, 1),
(@GUID_EGG+3, 177807, 469, 1, 1, -7580.76, -1072.98, 408.491, 4.77289, 0, 0, 0.685395, -0.728171, 300, 0, 1),
(@GUID_EGG+4, 177807, 469, 1, 1, -7576.21, -1034.3, 408.491, 4.16971, 0, 0, 0.870757, -0.491714, 300, 0, 1),
(@GUID_EGG+5, 177807, 469, 1, 1, -7573.6, -1049.01, 408.491, 3.1479, 0, 0, 0.999995, -0.00315515, 300, 0, 1),
(@GUID_EGG+6, 177807, 469, 1, 1, -7560.16, -1048.93, 408.491, 2.15516, 0, 0, 0.880814, 0.473462, 300, 0, 1),
(@GUID_EGG+7, 177807, 469, 1, 1, -7547.74, -1056.95, 408.491, 0.849041, 0, 0, 0.411884, 0.911236, 300, 0, 1),
(@GUID_EGG+8, 177807, 469, 1, 1, -7569.3, -1080.96, 413.382, 5.6117, 0, 0, 0.329473, -0.944165, 300, 0, 1),
(@GUID_EGG+9, 177807, 469, 1, 1, -7588.46, -1103.26, 408.491, 0.742227, 0, 0, 0.362653, 0.931924, 300, 0, 1),
(@GUID_EGG+10, 177807, 469, 1, 1, -7604.85, -1097.13, 408.491, 5.24413, 0, 0, 0.496471, -0.868053, 300, 0, 1),
(@GUID_EGG+11, 177807, 469, 1, 1, -7623.12, -1073.89, 408.491, 2.91621, 0, 0, 0.993657, 0.112454, 300, 0, 1),
(@GUID_EGG+12, 177807, 469, 1, 1, -7606.64, -1077.67, 408.491, 1.65957, 0, 0, 0.737786, 0.675034, 300, 0, 1),
(@GUID_EGG+13, 177807, 469, 1, 1, -7596.35, -1072.84, 408.158, 4.14536, 0, 0, 0.876679, -0.481076, 300, 0, 1),
(@GUID_EGG+14, 177807, 469, 1, 1, -7586.95, -1058.08, 408.158, 5.76642, 0, 0, 0.255518, -0.966804, 300, 0, 1),
(@GUID_EGG+15, 177807, 469, 1, 1, -7603.33, -1055.19, 408.158, 5.04699, 0, 0, 0.579484, -0.814983, 300, 0, 1),
(@GUID_EGG+16, 177807, 469, 1, 1, -7616.17, -1058.93, 408.491, 6.06566, 0, 0, 0.10855, -0.994091, 300, 0, 1),
(@GUID_EGG+17, 177807, 469, 1, 1, -7630.25, -1055.25, 408.491, 5.26533, 0, 0, 0.487239, -0.873269, 300, 0, 1),
(@GUID_EGG+18, 177807, 469, 1, 1, -7638.29, -1048.09, 408.491, 3.02773, 0, 0, 0.99838, 0.0568986, 300, 0, 1),
(@GUID_EGG+19, 177807, 469, 1, 1, -7622.66, -1041.6, 408.491, 0.490898, 0, 0, 0.242992, 0.970028, 300, 0, 1),
(@GUID_EGG+20, 177807, 469, 1, 1, -7603.94, -1038.83, 408.158, 3.5461, 0, 0, 0.979616, -0.200877, 300, 0, 1),
(@GUID_EGG+21, 177807, 469, 1, 1, -7603.12, -1024.38, 408.491, 2.45911, 0, 0, 0.94234, 0.334658, 300, 0, 1),
(@GUID_EGG+22, 177807, 469, 1, 1, -7590.42, -1029.79, 408.346, 1.0611, 0, 0, 0.506007, 0.862529, 300, 0, 1),
(@GUID_EGG+23, 177807, 469, 1, 1, -7580.6, -1021.34, 408.491, 2.10725, 0, 0, 0.869221, 0.494424, 300, 0, 1),
(@GUID_EGG+24, 177807, 469, 1, 1, -7592.93, -1018.74, 408.491, 4.27495, 0, 0, 0.84369, -0.536831, 300, 0, 1),
(@GUID_EGG+25, 177807, 469, 1, 1, -7583.59, -1005.21, 408.491, 0.243499, 0, 0, 0.121449, 0.992598, 300, 0, 1),
(@GUID_EGG+26, 177807, 469, 1, 1, -7595.48, -1008.12, 408.491, 6.02796, 0, 0, 0.127268, -0.991868, 300, 0, 1),
(@GUID_EGG+27, 177807, 469, 1, 1, -7605.1, -1005.61, 408.617, 0.687249, 0, 0, 0.336902, 0.94154, 300, 0, 1),
(@GUID_EGG+28, 177807, 469, 1, 1, -7626.9, -1016.39, 413.382, 5.03443, 0, 0, 0.584594, -0.811326, 300, 0, 1),
(@GUID_EGG+29, 177807, 469, 1, 1, -7613.94, -1019.16, 413.382, 5.54729, 0, 0, 0.359701, -0.933068, 300, 0, 1);

UPDATE `creature_template` SET `spell2`=19873, `spell3`=19872, `spell4`=0 WHERE `entry`=12435;
UPDATE `gameobject_template` SET `ScriptName`='go_orb_of_domination' WHERE `entry`=177808;

DELETE FROM `spell_script_names` WHERE `spell_id`=19873;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(19873, 'spell_egg_event');

DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=42013 AND `spell_effect`=45537;
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `comment`) VALUES
(42013, 45537, 'Visual Channel');

-- nefarian
REPLACE INTO `spell_target_position` (`id`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES
(22981, 469, -7536.73, -1280.18, 476.799, 2.11467),
(22982, 469, -7503.34, -1163.17, 476.797, 2.57019),
(22983, 469, -7482.73, -1196.49, 476.799, 2.31887),
(22984, 469, -7462.38, -1224.99, 476.786, 2.37385),
(22978, 469, -7534.08, -1198.57, 476.799, 2.23641),
(22979, 469, -7514.02, -1224.35, 476.8, 2.21677),
(22980, 469, -7496.05, -1248.45, 476.799, 2.09111),
(22972, 469, -7516.38, -1263.78, 476.773, 2.18536),
(22975, 469, -7582.36, -1213.9, 476.799, 2.17357),
(22976, 469, -7564.18, -1240.31, 476.799, 2.17357),
(22977, 469, -7550.29, -1260.5, 476.799, 2.17357);

UPDATE `creature_template` SET `InhabitType`=7 WHERE `entry`=11583;