diff options
25 files changed, 575 insertions, 402 deletions
diff --git a/sql/updates/2560_world.sql b/sql/updates/2560_world.sql new file mode 100644 index 00000000000..9d08752d5b1 --- /dev/null +++ b/sql/updates/2560_world.sql @@ -0,0 +1,327 @@ +-- script waypoint +DELETE FROM script_waypoint WHERE entry=467; +INSERT INTO script_waypoint VALUES +(467, 0, -10508.40, 1068.00, 55.21, 0, ''), +(467, 1, -10518.30, 1074.84, 53.96, 0, ''), +(467, 2, -10534.82, 1081.92, 49.88, 0, ''), +(467, 3, -10546.51, 1084.88, 50.13, 0, ''), +(467, 4, -10555.29, 1084.45, 45.75, 0, ''), +(467, 5, -10566.57, 1083.53, 42.10, 0, ''), +(467, 6, -10575.83, 1082.34, 39.46, 0, ''), +(467, 7, -10585.67, 1081.08, 37.77, 0, ''), +(467, 8, -10600.08, 1078.19, 36.23, 0, ''), +(467, 9, -10608.69, 1076.08, 35.88, 0, ''), +(467, 10, -10621.26, 1073.00, 35.40, 0, ''), +(467, 11, -10638.12, 1060.18, 33.61, 0, ''), +(467, 12, -10655.87, 1038.99, 33.48, 0, ''), +(467, 13, -10664.68, 1030.54, 32.70, 0, ''), +(467, 14, -10708.68, 1033.86, 33.32, 0, ''), +(467, 15, -10754.43, 1017.93, 32.79, 0, ''), +(467, 16, -10802.26, 1018.01, 32.16, 0, ''), +(467, 17, -10832.60, 1009.04, 32.71, 0, ''), +(467, 18, -10866.56, 1006.51, 31.71, 0, ''), +(467, 19, -10879.98, 1005.10, 32.84, 0, ''), +(467, 20, -10892.45, 1001.32, 34.46, 0, ''), +(467, 21, -10906.14, 997.11, 36.15, 0, ''), +(467, 22, -10922.26, 1002.23, 35.74, 0, ''), +(467, 23, -10936.32, 1023.38, 36.52, 0, ''), +(467, 24, -10933.35, 1052.61, 35.85, 0, ''), +(467, 25, -10940.25, 1077.66, 36.49, 0, ''), +(467, 26, -10957.09, 1099.33, 36.83, 0, ''), +(467, 27, -10956.53, 1119.90, 36.73, 0, ''), +(467, 28, -10939.30, 1150.75, 37.42, 0, ''), +(467, 29, -10915.14, 1202.09, 36.55, 0, ''), +(467, 30, -10892.59, 1257.03, 33.37, 0, ''), +(467, 31, -10891.93, 1306.66, 35.45, 0, ''), +(467, 32, -10896.17, 1327.86, 37.77, 0, ''), +(467, 33, -10906.03, 1368.05, 40.91, 0, ''), +(467, 34, -10910.18, 1389.33, 42.62, 0, ''), +(467, 35, -10915.42, 1417.72, 42.93, 0, ''), +(467, 36, -10926.37, 1421.18, 43.04, 0, 'walk here and say'), +(467, 37, -10952.31, 1421.74, 43.40, 0, ''), +(467, 38, -10980.04, 1411.38, 42.79, 0, ''), +(467, 39, -11006.06, 1420.47, 43.26, 0, ''), +(467, 40, -11021.98, 1450.59, 43.09, 0, ''), +(467, 41, -11025.36, 1491.59, 43.15, 0, ''), +(467, 42, -11036.09, 1508.32, 43.28, 0, ''), +(467, 43, -11060.68, 1526.72, 43.19, 0, ''), +(467, 44, -11072.75, 1527.77, 43.20, 5000, 'say and quest credit'); + +DELETE FROM script_waypoint WHERE entry=2768; +INSERT INTO script_waypoint VALUES +(2768, 0, -2066.45, -2085.96, 9.08, 0, ''), +(2768, 1, -2077.99, -2105.33, 13.24, 0, ''), +(2768, 2, -2074.60, -2109.67, 14.24, 0, ''), +(2768, 3, -2076.60, -2117.46, 16.67, 0, ''), +(2768, 4, -2073.51, -2123.46, 18.42, 2000, ''), +(2768, 5, -2073.51, -2123.46, 18.42, 4000, ''), +(2768, 6, -2066.60, -2131.85, 21.56, 0, ''), +(2768, 7, -2053.85, -2143.19, 20.31, 0, ''), +(2768, 8, -2043.49, -2153.73, 20.20, 10000, ''), +(2768, 9, -2043.49, -2153.73, 20.20, 20000, ''), +(2768, 10, -2043.49, -2153.73, 20.20, 10000, ''), +(2768, 11, -2043.49, -2153.73, 20.20, 2000, ''), +(2768, 12, -2053.85, -2143.19, 20.31, 0, ''), +(2768, 13, -2066.60, -2131.85, 21.56, 0, ''), +(2768, 14, -2073.51, -2123.46, 18.42, 0, ''), +(2768, 15, -2076.60, -2117.46, 16.67, 0, ''), +(2768, 16, -2074.60, -2109.67, 14.24, 0, ''), +(2768, 17, -2077.99, -2105.33, 13.24, 0, ''), +(2768, 18, -2066.45, -2085.96, 9.08, 0, ''), +(2768, 19, -2066.41, -2086.21, 8.97, 6000, ''), +(2768, 20, -2066.41, -2086.21, 8.97, 2000, ''); + +DELETE FROM script_waypoint WHERE entry=12818; +INSERT INTO script_waypoint VALUES +(12818, 0, 3347.250089, -694.700989, 159.925995, 0, ''), +(12818, 1, 3341.527039, -694.725891, 161.124542, 4000, ''), +(12818, 2, 3338.351074, -686.088138, 163.444000, 0, ''), +(12818, 3, 3352.744873, -677.721741, 162.316269, 0, ''), +(12818, 4, 3370.291016, -669.366943, 160.751358, 0, ''), +(12818, 5, 3381.479492, -659.449097, 162.545303, 0, ''), +(12818, 6, 3389.554199, -648.500000, 163.651825, 0, ''), +(12818, 7, 3396.645020, -641.508911, 164.216019, 0, ''), +(12818, 8, 3410.498535, -634.299622, 165.773453, 0, ''), +(12818, 9, 3418.461426, -631.791992, 166.477615, 0, ''), +(12818, 10, 3429.500000, -631.588745, 166.921265, 0, ''), +(12818, 11,3434.950195, -629.245483, 168.333969, 0, ''), +(12818, 12,3438.927979, -618.503235, 171.503143, 0, ''), +(12818, 13,3444.217529, -609.293640, 173.077972, 1000, 'Ambush 1'), +(12818, 14,3460.505127, -593.794189, 174.342255, 0, ''), +(12818, 15,3480.283203, -578.210327, 176.652313, 0, ''), +(12818, 16,3492.912842, -562.335449, 181.396301, 0, ''), +(12818, 17,3495.230957, -550.977600, 184.652267, 0, ''), +(12818, 18,3496.247070, -529.194214, 188.172028, 0, ''), +(12818, 19,3497.619385, -510.411499, 188.345322, 1000, 'Ambush 2'), +(12818, 20,3498.498047, -497.787506, 185.806274, 0, ''), +(12818, 21,3484.218750, -489.717529, 182.389862, 4000, ''); + +DELETE FROM script_waypoint WHERE entry=12858; +INSERT INTO script_waypoint VALUES +(12858, 0, 1782.63, -2241.11, 109.73, 5000, ''), +(12858, 1, 1788.88, -2240.17, 111.71, 0, ''), +(12858, 2, 1797.49, -2238.11, 112.31, 0, ''), +(12858, 3, 1803.83, -2232.77, 111.22, 0, ''), +(12858, 4, 1806.65, -2217.83, 107.36, 0, ''), +(12858, 5, 1811.81, -2208.01, 107.45, 0, ''), +(12858, 6, 1820.85, -2190.82, 100.49, 0, ''), +(12858, 7, 1829.60, -2177.49, 96.44, 0, ''), +(12858, 8, 1837.98, -2164.19, 96.71, 0, 'prepare'), +(12858, 9, 1839.99, -2149.29, 96.78, 0, ''), +(12858, 10, 1835.14, -2134.98, 96.80, 0, ''), +(12858, 11, 1823.57, -2118.27, 97.43, 0, ''), +(12858, 12, 1814.99, -2110.35, 98.38, 0, ''), +(12858, 13, 1806.60, -2103.09, 99.19, 0, ''), +(12858, 14, 1798.27, -2095.77, 100.04, 0, ''), +(12858, 15, 1783.59, -2079.92, 100.81, 0, ''), +(12858, 16, 1776.79, -2069.48, 101.77, 0, ''), +(12858, 17, 1776.82, -2054.59, 109.82, 0, ''), +(12858, 18, 1776.88, -2047.56, 109.83, 0, ''), +(12858, 19, 1776.86, -2036.55, 109.83, 0, ''), +(12858, 20, 1776.90, -2024.56, 109.83, 0, 'win'), +(12858, 21, 1776.87, -2028.31, 109.83,60000, 'stay'), +(12858, 22, 1776.90, -2028.30, 109.83, 0, ''); + +DELETE FROM script_waypoint WHERE entry=15420; +INSERT INTO script_waypoint VALUES +(15420, 0, 9294.78, -6682.51, 22.42, 0, ''), +(15420, 1, 9298.27, -6667.99, 22.42, 0, ''), +(15420, 2, 9309.63, -6658.84, 22.43, 0, ''), +(15420, 3, 9304.43, -6649.31, 26.46, 0, ''), +(15420, 4, 9298.83, -6648.00, 28.61, 0, ''), +(15420, 5, 9291.06, -6653.46, 31.83,2500, ''), +(15420, 6, 9289.08, -6660.17, 31.85,5000, ''), +(15420, 7, 9291.06, -6653.46, 31.83, 0, ''); + +DELETE FROM script_waypoint WHERE entry=16993; +INSERT INTO script_waypoint VALUES +(16993, 0, -1137.72, 4272.10, 14.04, 5000, ''), +(16993, 1, -1141.34, 4232.42, 14.63, 0, ''), +(16993, 2, -1133.47, 4220.88, 11.78, 0, ''), +(16993, 3, -1126.18, 4213.26, 13.51, 0, ''), +(16993, 4, -1100.12, 4204.32, 16.41, 0, ''), +(16993, 5, -1063.68, 4197.92, 15.51, 0, ''), +(16993, 6, -1027.28, 4194.36, 15.52, 0, ''), +(16993, 7, -995.68, 4189.59, 19.84, 0, ''), +(16993, 8, -970.90, 4188.60, 24.61, 0, ''), +(16993, 9, -961.93, 4193.34, 26.11, 15000, 'Summon 1'), +(16993, 10, -935.52, 4210.99, 31.98, 0, ''), +(16993, 11, -913.42, 4218.27, 37.29, 0, ''), +(16993, 12, -896.53, 4207.73, 43.23, 0, ''), +(16993, 13, -868.49, 4194.77, 46.75, 30000, 'Kneel and Rest Here'), +(16993, 14, -852.83, 4198.29, 47.28, 15000, 'Summon 2'), +(16993, 15, -819.85, 4200.50, 46.37, 0, ''), +(16993, 16, -791.92, 4201.96, 44.19, 0, ''), +(16993, 17, -774.42, 4202.46, 47.41, 0, ''), +(16993, 18, -762.90, 4202.17, 48.81, 0, ''), +(16993, 19, -728.25, 4195.35, 50.68, 0, ''), +(16993, 20, -713.58, 4192.07, 53.98, 0, ''), +(16993, 21, -703.09, 4189.74, 56.96, 0, ''), +(16993, 22, -693.70, 4185.43, 57.06, 0, ''), +(16993, 23, -686.38, 4159.81, 60.26, 0, ''), +(16993, 24, -679.88, 4147.04, 64.20, 0, ''), +(16993, 25, -656.74, 4147.72, 64.11, 0, ''), +(16993, 26, -652.22, 4137.50, 64.58, 0, ''), +(16993, 27, -649.99, 4136.38, 64.63, 30000, 'Quest Credit'); + +DELETE FROM script_waypoint WHERE entry=17312; +INSERT INTO script_waypoint VALUES +(17312, 0, -4784.532227, -11051.060547, 3.484263, 0, ''), +(17312, 1, -4805.509277, -11037.293945, 3.043942, 0, ''), +(17312, 2, -4827.826172, -11034.398438, 1.741959, 0, ''), +(17312, 3, -4852.630859, -11033.695313, 2.208656, 0, ''), +(17312, 4, -4876.791992, -11034.517578, 3.175228, 0, ''), +(17312, 5, -4895.486816, -11038.306641, 9.390890, 0, ''), +(17312, 6, -4915.464844, -11048.402344, 12.369793, 0, ''), +(17312, 7, -4937.288086, -11067.041992, 13.857983, 0, ''), +(17312, 8, -4966.577637, -11067.507813, 15.754786, 0, ''), +(17312, 9, -4993.799805, -11056.544922, 19.175295, 0, ''), +(17312, 10, -5017.836426, -11052.569336, 22.476587, 0, ''), +(17312, 11, -5039.706543, -11058.459961, 25.831593, 0, ''), +(17312, 12, -5057.289063, -11045.474609, 26.972496, 0, ''), +(17312, 13, -5078.828125, -11037.601563, 29.053417, 0, ''), +(17312, 14, -5104.158691, -11039.195313, 29.440195, 0, ''), +(17312, 15, -5120.780273, -11039.518555, 30.142139, 0, ''), +(17312, 16, -5140.833008, -11039.810547, 28.788074, 0, ''), +(17312, 17, -5161.201660, -11040.050781, 27.879545, 4000, ''), +(17312, 18, -5171.842285, -11046.803711, 27.183821, 0, ''), +(17312, 19, -5185.995117, -11056.359375, 20.234867, 0, ''), +(17312, 20, -5198.485840, -11065.065430, 18.872593, 0, ''), +(17312, 21, -5214.062500, -11074.653320, 19.215731, 0, ''), +(17312, 22, -5220.157227, -11088.377930, 19.818476, 0, ''), +(17312, 23, -5233.652832, -11098.846680, 18.349432, 0, ''), +(17312, 24, -5250.163086, -11111.653320, 16.438959, 0, ''), +(17312, 25, -5268.194336, -11125.639648, 12.668313, 0, ''), +(17312, 26, -5286.270508, -11130.669922, 6.912246, 0, ''), +(17312, 27, -5317.449707, -11137.392578, 4.963446, 0, ''), +(17312, 28, -5334.854492, -11154.384766, 6.742664, 0, ''), +(17312, 29, -5353.874512, -11171.595703, 6.903912, 20000, ''), +(17312, 30, -5354.240000, -11171.940000, 6.890000, 0, ''); + +DELETE FROM script_waypoint WHERE entry=19685; +INSERT INTO script_waypoint VALUES +(19685, 0, -1863.369019, 5419.517090, -10.463668, 5000, ''), +(19685, 1, -1861.749023, 5416.465332, -10.508068, 0, ''), +(19685, 2, -1857.036133, 5410.966309, -12.428039, 0, ''), +(19685, 3, -1831.539185, 5365.472168, -12.428039, 0, ''), +(19685, 4, -1813.416504, 5333.776855, -12.428039, 0, ''), +(19685, 5, -1800.354370, 5313.290039, -12.428039, 0, ''), +(19685, 6, -1775.624878, 5268.786133, -38.809181, 0, ''), +(19685, 7, -1770.147339, 5259.268066, -38.829231, 0, ''), +(19685, 8, -1762.814209, 5261.098145, -38.848995, 0, ''), +(19685, 9, -1740.110474, 5268.858398, -40.208965, 0, ''), +(19685, 10, -1725.837402, 5270.936035, -40.208965, 0, ''), +(19685, 11, -1701.580322, 5290.323242, -40.209187, 0, ''), +(19685, 12, -1682.877808, 5291.406738, -34.429646, 0, ''), +(19685, 13, -1670.101685, 5291.201172, -32.786007, 0, ''), +(19685, 14, -1656.666870, 5294.333496, -37.862648, 0, ''), +(19685, 15, -1652.035767, 5295.413086, -40.245499, 0, ''), +(19685, 16, -1620.860596, 5300.133301, -40.208992, 0, ''), +(19685, 17, -1607.630981, 5293.983398, -38.577045, 5000, ''), +(19685, 18, -1607.630981, 5293.983398, -38.577045, 5000, ''), +(19685, 19, -1607.630981, 5293.983398, -38.577045, 5000, ''), +(19685, 20, -1622.140869, 5301.955566, -40.208897, 0, ''), +(19685, 21, -1621.131836, 5333.112793, -40.208897, 0, ''), +(19685, 22, -1637.598999, 5342.134277, -40.208790, 0, ''), +(19685, 23, -1648.521606, 5352.309570, -47.496170, 0, ''), +(19685, 24, -1654.606934, 5357.419434, -45.870892, 0, ''), +(19685, 25, -1633.670044, 5422.067871, -42.835541, 0, ''), +(19685, 26, -1656.567505, 5426.236328, -40.405815, 0, ''), +(19685, 27, -1664.932373, 5425.686523, -38.846405, 0, ''), +(19685, 28, -1681.406006, 5425.871094, -38.810928, 0, ''), +(19685, 29, -1730.875977, 5427.413574, -12.427910, 0, ''), +(19685, 30, -1743.509521, 5369.599121, -12.427910, 0, ''), +(19685, 31, -1877.217041, 5303.710449, -12.427989, 0, ''), +(19685, 32, -1890.371216, 5289.273438, -12.428268, 0, ''), +(19685, 33, -1905.505737, 5266.534668, 2.630672, 0, ''), +(19685, 34, -1909.381348, 5273.008301, 1.663714, 10000, ''), +(19685, 35, -1909.381348, 5273.008301, 1.663714, 12000, ''), +(19685, 36, -1909.381348, 5273.008301, 1.663714, 8000, ''), +(19685, 37, -1909.381348, 5273.008301, 1.663714, 15000, ''), +(19685, 38, -1927.561401, 5275.324707, 1.984987, 0, ''), +(19685, 39, -1927.385498, 5300.879883, -12.427236, 0, ''), +(19685, 40, -1921.063965, 5314.318359, -12.427236, 0, ''), +(19685, 41, -1965.425415, 5379.298828, -12.427236, 0, ''), +(19685, 42, -1981.233154, 5450.743652, -12.427236, 0, ''), +(19685, 43, -1958.022461, 5455.904297, 0.487659, 0, ''), +(19685, 44, -1951.991455, 5463.580566, 0.874490, 10000, ''), +(19685, 45, -1951.991455, 5463.580566, 0.874490, 12000, ''), +(19685, 46, -1968.730225, 5481.752930, -12.427846, 0, ''), +(19685, 47, -1881.839844, 5554.040039, -12.427846, 0, ''), +(19685, 48, -1841.566650, 5545.965332, -12.427846, 0, ''), +(19685, 49, -1837.658325, 5523.780273, 0.558756, 0, ''), +(19685, 50, -1831.321777, 5534.821777, 1.221819, 6000, ''), +(19685, 51, -1831.321777, 5534.821777, 1.221819, 8000, ''), +(19685, 52, -1831.321777, 5534.821777, 1.221819, 5000, ''), +(19685, 53, -1850.060669, 5472.610840, 0.857320, 6000, ''), +(19685, 54, -1850.060669, 5472.610840, 0.857320, 8000, ''), +(19685, 55, -1850.060669, 5472.610840, 0.857320, 9000, ''), +(19685, 56, -1850.060669, 5472.610840, 0.857320, 9000, ''), +(19685, 57, -1850.060669, 5472.610840, 0.857320, 4000, ''); + +DELETE FROM script_waypoint WHERE entry=20129; +INSERT INTO script_waypoint VALUES +(20129, 0, -8374.93,-4250.21, -204.38,5000, ''), +(20129, 1, -8374.93,-4250.21, -204.38,16000, ''), +(20129, 2, -8374.93,-4250.21, -204.38,10000, ''), +(20129, 3, -8374.93,-4250.21, -204.38,2000, ''), +(20129, 4, -8439.40,-4180.05, -209.25, 0, ''), +(20129, 5, -8437.82,-4120.84, -208.59,10000, ''), +(20129, 6, -8437.82,-4120.84, -208.59,16000, ''), +(20129, 7, -8437.82,-4120.84, -208.59,13000, ''), +(20129, 8, -8437.82,-4120.84, -208.59,18000, ''), +(20129, 9, -8437.82,-4120.84, -208.59,15000, ''), +(20129, 10, -8437.82,-4120.84, -208.59,2000, ''), +(20129, 11, -8467.26,-4198.63, -214.21, 0, ''), +(20129, 12, -8667.76,-4252.13, -209.56, 0, ''), +(20129, 13, -8703.71,-4234.58, -209.5,14000, ''), +(20129, 14, -8703.71,-4234.58, -209.5,2000, ''), +(20129, 15, -8642.81,-4304.37, -209.57, 0, ''), +(20129, 16, -8649.06,-4394.36, -208.46,6000, ''), +(20129, 17, -8649.06,-4394.36, -208.46,18000, ''), +(20129, 18, -8649.06,-4394.36, -208.46,2000, ''), +(20129, 19, -8468.72,-4437.67, -215.45, 0, ''), +(20129, 20, -8427.54,-4426, -211.13, 0, ''), +(20129, 21, -8364.83,-4393.32, -205.91, 0, ''), +(20129, 22, -8304.54,-4357.2, -208.2,18000, ''), +(20129, 23, -8304.54,-4357.2, -208.2,2000, ''), +(20129, 24, -8375.42,-4250.41, -205.14,5000, ''), +(20129, 25, -8375.42,-4250.41, -205.14,5000, ''); + +DELETE FROM script_waypoint WHERE entry=6575; +INSERT INTO script_waypoint VALUES +(6575, 0, 1945.81, -431.54, 16.36, 0, ''), +(6575, 1, 1946.21, -436.41, 16.36, 0, ''), +(6575, 2, 1950.01, -444.11, 14.63, 0, ''), +(6575, 3, 1956.08, -449.34, 13.12, 0, ''), +(6575, 4, 1966.59, -450.55, 11.27, 0, ''), +(6575, 5, 1976.09, -447.51, 11.27, 0, ''), +(6575, 6, 1983.42, -435.85, 11.27, 0, ''), +(6575, 7, 1978.17, -428.81, 11.27, 0, ''), +(6575, 8, 1973.97, -422.08, 9.04, 0, ''), +(6575, 9, 1963.84, -418.90, 6.17, 0, ''), +(6575, 10, 1961.22, -422.74, 6.17, 0, ''), +(6575, 11, 1964.80, -431.26, 6.17, 300000, ''); + +DELETE FROM script_waypoint WHERE entry=3849; +INSERT INTO script_waypoint VALUES +(3849, 0, -252.92, 2126.82, 81.17, 0, ''), +(3849, 1, -253.88, 2131.11, 81.21, 0, ''), +(3849, 2, -249.66, 2142.45, 87.01, 0, ''), +(3849, 3, -248.08, 2143.68, 87.01, 0, ''), +(3849, 4, -238.87, 2139.93, 87.01, 0, ''), +(3849, 5, -235.47, 2149.18, 90.59, 0, ''), +(3849, 6, -239.89, 2156.06, 90.62, 20000, 'SAY_FREE'); + +DELETE FROM script_waypoint WHERE entry=3850; +INSERT INTO script_waypoint VALUES +(3850, 0, -255.33, 2117.99, 81.17, 0, ''), +(3850, 1, -253.88, 2131.11, 81.21, 0, ''), +(3850, 2, -249.66, 2142.45, 87.01, 0, ''), +(3850, 3, -248.08, 2143.68, 87.01, 0, ''), +(3850, 4, -238.87, 2139.93, 87.01, 0, ''), +(3850, 5, -235.47, 2149.18, 90.59, 0, ''), +(3850, 6, -239.89, 2156.06, 90.62, 20000, 'SAY_FREE'); + +-- Henry Stern +UPDATE `creature_template` SET `ScriptName`='npc_henry_stern' WHERE `entry`=8696; diff --git a/sql/world_scripts_full.sql b/sql/world_scripts_full.sql index 6118ceedbf4..fae17c96dca 100644 --- a/sql/world_scripts_full.sql +++ b/sql/world_scripts_full.sql @@ -659,6 +659,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_thrall_warchief' WHERE `entry`= /* RAZORFEN DOWNS */ UPDATE `creature_template` SET `ScriptName`='boss_amnennar_the_coldbringer' WHERE `entry`=7358; +UPDATE `creature_template` SET `ScriptName`='npc_henry_stern' WHERE `entry`=8696; /* RAZORFEN KRAUL */ UPDATE `creature_template` SET `Scriptname`='npc_willix' WHERE `entry`=4508; diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 3c978e208e1..13f3a57c658 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -242,6 +242,7 @@ SET(trinityscript_LIB_SRCS scripts/zone/onyxias_lair/boss_onyxia.cpp scripts/zone/orgrimmar/orgrimmar.cpp scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp + scripts/zone/razorfen_downs/razorfen_downs.cpp scripts/zone/razorfen_kraul/razorfen_kraul.cpp scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index 6798b1785dc..764843f3714 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -269,6 +269,7 @@ scripts/zone/netherstorm/netherstorm.cpp \ scripts/zone/onyxias_lair/boss_onyxia.cpp \ scripts/zone/orgrimmar/orgrimmar.cpp \ scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp \ +scripts/zone/razorfen_downs/razorfen_downs.cpp \ scripts/zone/razorfen_kraul/razorfen_kraul.cpp \ scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp \ scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 56802718081..654a07107dc 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -35,8 +35,8 @@ struct StringTextData // Text Maps UNORDERED_MAP<int32, StringTextData> TextMap; -// Waypoint lists -std::list<PointMovement> PointMovementList; +// Waypoint map (escorts) +UNORDERED_MAP<uint32, std::vector<PointMovement> > PointMovementMap; void FillSpellSummary(); void LoadOverridenSQLData(); @@ -394,6 +394,7 @@ extern void AddSC_orgrimmar(); //Ragefire Chasm //Razorfen Downs extern void AddSC_boss_amnennar_the_coldbringer(); +extern void AddSC_razorfen_downs(); //Razorfen Kraul extern void AddSC_razorfen_kraul(); @@ -839,7 +840,7 @@ void LoadDatabase() } // Drop Existing Waypoint list - PointMovementList.clear(); + PointMovementMap.clear(); uint64 uiCreatureCount = 0; // Load Waypoints @@ -866,6 +867,7 @@ void LoadDatabase() PointMovement pTemp; pTemp.m_uiCreatureEntry = pFields[0].GetUInt32(); + uint32 uiCreatureEntry = pTemp.m_uiCreatureEntry; pTemp.m_uiPointId = pFields[1].GetUInt32(); pTemp.m_fX = pFields[2].GetFloat(); pTemp.m_fY = pFields[3].GetFloat(); @@ -882,7 +884,7 @@ void LoadDatabase() if (!pCInfo->ScriptID) error_db_log("SD2: DB table script_waypoint has waypoint for creature entry %u, but creature does not have ScriptName defined and then useless.", pTemp.m_uiCreatureEntry); - PointMovementList.push_back(pTemp); + PointMovementMap[uiCreatureEntry].push_back(pTemp); ++uiNodeCount; } while (result->NextRow()); @@ -1312,6 +1314,7 @@ void ScriptsInit() //Ragefire Chasm //Razorfen Downs AddSC_boss_amnennar_the_coldbringer(); + AddSC_razorfen_downs(); //Razorfen Kraul AddSC_razorfen_kraul(); diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index f75a8f56e61..1fb17a8de40 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -1092,6 +1092,10 @@ RelativePath="..\scripts\zone\razorfen_downs\boss_amnennar_the_coldbringer.cpp" > </File> + <File + RelativePath="..\scripts\zone\razorfen_downs\razorfen_downs.cpp" + > + </File> </Filter> <Filter Name="Shadowfang Keep" diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 89d6aff0dc9..24a3338d80d 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -1269,6 +1269,10 @@ RelativePath="..\scripts\zone\razorfen_downs\boss_amnennar_the_coldbringer.cpp" > </File> + <File + RelativePath="..\scripts\zone\razorfen_downs\razorfen_downs.cpp" + > + </File> </Filter> <Filter Name="Shadowfang Keep" diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 0b9c1912fe1..40b3b4414f1 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -1268,6 +1268,10 @@ RelativePath="..\scripts\zone\razorfen_downs\boss_amnennar_the_coldbringer.cpp" > </File> + <File + RelativePath="..\scripts\zone\razorfen_downs\razorfen_downs.cpp" + > + </File> </Filter> <Filter Name="Shadowfang Keep" diff --git a/src/bindings/scripts/include/sc_creature.cpp b/src/bindings/scripts/include/sc_creature.cpp index 2c0ab471bda..a31418419bb 100644 --- a/src/bindings/scripts/include/sc_creature.cpp +++ b/src/bindings/scripts/include/sc_creature.cpp @@ -233,21 +233,18 @@ void ScriptedAI::DoWhisper(const char* text, Unit* reciever, bool IsBossWhisper) m_creature->MonsterWhisper(text, reciever->GetGUID(), IsBossWhisper); } -void ScriptedAI::DoPlaySoundToSet(Unit* unit, uint32 sound) +void ScriptedAI::DoPlaySoundToSet(Unit* pSource, uint32 uiSoundId) { - if (!unit) + if (!pSource) return; - if (!GetSoundEntriesStore()->LookupEntry(sound)) + if (!GetSoundEntriesStore()->LookupEntry(uiSoundId)) { - error_log("SD2: Invalid soundId %u used in DoPlaySoundToSet (by unit TypeId %u, guid %u)", sound, unit->GetTypeId(), unit->GetGUID()); + error_log("SD2: Invalid soundId %u used in DoPlaySoundToSet (by unit TypeId %u, guid %u)", uiSoundId, pSource->GetTypeId(), pSource->GetGUID()); return; } - WorldPacket data(4); - data.SetOpcode(SMSG_PLAY_SOUND); - data << uint32(sound); - unit->SendMessageToSet(&data,false); + pSource->PlayDirectSound(uiSoundId); } Creature* ScriptedAI::DoSpawnCreature(uint32 id, float x, float y, float z, float angle, uint32 type, uint32 despawntime) diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp index 34179378b06..1b047c624cd 100644 --- a/src/bindings/scripts/scripts/npc/npc_escortAI.cpp +++ b/src/bindings/scripts/scripts/npc/npc_escortAI.cpp @@ -116,16 +116,23 @@ void npc_escortAI::UpdateAI(const uint32 diff) //Correct movement speed if (Run) m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); - else m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + else + m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); //Continue with waypoints if( !IsOnHold ) { - m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z ); - debug_log("SD2: EscortAI Reconnect WP is: %u, %f, %f, %f", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); - WaitTimer = 0; - ReconnectWP = false; - return; + if (CurrentWP != WaypointList.end()) + { + m_creature->GetMotionMaster()->MovePoint(CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z ); + debug_log("TSCR: EscortAI Reconnect WP is: %u, %f, %f, %f", CurrentWP->id, CurrentWP->x, CurrentWP->y, CurrentWP->z); + + WaitTimer = 0; + ReconnectWP = false; + return; + } + else + debug_log("TSCR: EscortAI Reconnected to end of WP list"); } } @@ -274,11 +281,13 @@ void npc_escortAI::AddWaypoint(uint32 id, float x, float y, float z, uint32 Wait void npc_escortAI::FillPointMovementListForCreature() { - std::list<PointMovement>::iterator itr; + UNORDERED_MAP<uint32, std::vector<PointMovement> >::iterator pPointsEntries = PointMovementMap.find(m_creature->GetEntry()); - for (itr = PointMovementList.begin(); itr != PointMovementList.end(); ++itr) + if (pPointsEntries != PointMovementMap.end()) { - if (itr->m_uiCreatureEntry == m_creature->GetEntry()) + std::vector<PointMovement>::iterator itr; + + for (itr = pPointsEntries->second.begin(); itr != pPointsEntries->second.end(); ++itr) { Escort_Waypoint pPoint(itr->m_uiPointId,itr->m_fX,itr->m_fY,itr->m_fZ,itr->m_uiWaitTime); WaypointList.push_back(pPoint); diff --git a/src/bindings/scripts/scripts/npc/npc_escortAI.h b/src/bindings/scripts/scripts/npc/npc_escortAI.h index f396a168960..503ff614171 100644 --- a/src/bindings/scripts/scripts/npc/npc_escortAI.h +++ b/src/bindings/scripts/scripts/npc/npc_escortAI.h @@ -7,6 +7,8 @@ #define DEFAULT_MAX_PLAYER_DISTANCE 50 +extern UNORDERED_MAP<uint32, std::vector<PointMovement> > PointMovementMap; + struct Escort_Waypoint { Escort_Waypoint(uint32 _id, float _x, float _y, float _z, uint32 _w) diff --git a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp index 48232d8e9fe..37f6b20957d 100644 --- a/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp +++ b/src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp @@ -127,27 +127,7 @@ CreatureAI* GetAI_npc_professor_phizzlethorpeAI(Creature *_Creature) { npc_professor_phizzlethorpeAI* professor_phizzlethorpeAI = new npc_professor_phizzlethorpeAI(_Creature); - professor_phizzlethorpeAI->AddWaypoint(0, -2066.45, -2085.96, 9.08); - professor_phizzlethorpeAI->AddWaypoint(1, -2077.99, -2105.33, 13.24); - professor_phizzlethorpeAI->AddWaypoint(2, -2074.60, -2109.67, 14.24); - professor_phizzlethorpeAI->AddWaypoint(3, -2076.60, -2117.46, 16.67); - professor_phizzlethorpeAI->AddWaypoint(4, -2073.51, -2123.46, 18.42, 2000); - professor_phizzlethorpeAI->AddWaypoint(5, -2073.51, -2123.46, 18.42, 4000); - professor_phizzlethorpeAI->AddWaypoint(6, -2066.60, -2131.85, 21.56); - professor_phizzlethorpeAI->AddWaypoint(7, -2053.85, -2143.19, 20.31); - professor_phizzlethorpeAI->AddWaypoint(8, -2043.49, -2153.73, 20.20, 12000); - professor_phizzlethorpeAI->AddWaypoint(9, -2043.49, -2153.73, 20.20, 14000); - professor_phizzlethorpeAI->AddWaypoint(10, -2043.49, -2153.73, 20.20, 10000); - professor_phizzlethorpeAI->AddWaypoint(11, -2043.49, -2153.73, 20.20, 2000); - professor_phizzlethorpeAI->AddWaypoint(12, -2053.85, -2143.19, 20.31); - professor_phizzlethorpeAI->AddWaypoint(13, -2066.60, -2131.85, 21.56); - professor_phizzlethorpeAI->AddWaypoint(14, -2073.51, -2123.46, 18.42); - professor_phizzlethorpeAI->AddWaypoint(15, -2076.60, -2117.46, 16.67); - professor_phizzlethorpeAI->AddWaypoint(16, -2074.60, -2109.67, 14.24); - professor_phizzlethorpeAI->AddWaypoint(17, -2077.99, -2105.33, 13.24); - professor_phizzlethorpeAI->AddWaypoint(18, -2066.45, -2085.96, 9.08); - professor_phizzlethorpeAI->AddWaypoint(19, -2066.41, -2086.21, 8.97, 6000); - professor_phizzlethorpeAI->AddWaypoint(20, -2066.41, -2086.21, 8.97, 2000); + professor_phizzlethorpeAI->FillPointMovementListForCreature(); return (CreatureAI*)professor_phizzlethorpeAI; } diff --git a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp index 42d219aabcb..e87e75f409a 100644 --- a/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp +++ b/src/bindings/scripts/scripts/zone/ashenvale_forest/ashenvale.cpp @@ -152,34 +152,12 @@ bool QuestAccept_npc_torek(Player* player, Creature* creature, Quest const* ques return true; } -CreatureAI* GetAI_npc_torek(Creature *_Creature) +CreatureAI* GetAI_npc_torek(Creature* pCreature) { - npc_torekAI* thisAI = new npc_torekAI(_Creature); - - thisAI->AddWaypoint(0, 1782.63, -2241.11, 109.73, 5000); - thisAI->AddWaypoint(1, 1788.88, -2240.17, 111.71); - thisAI->AddWaypoint(2, 1797.49, -2238.11, 112.31); - thisAI->AddWaypoint(3, 1803.83, -2232.77, 111.22); - thisAI->AddWaypoint(4, 1806.65, -2217.83, 107.36); - thisAI->AddWaypoint(5, 1811.81, -2208.01, 107.45); - thisAI->AddWaypoint(6, 1820.85, -2190.82, 100.49); - thisAI->AddWaypoint(7, 1829.60, -2177.49, 96.44); - thisAI->AddWaypoint(8, 1837.98, -2164.19, 96.71); //prepare - thisAI->AddWaypoint(9, 1839.99, -2149.29, 96.78); - thisAI->AddWaypoint(10, 1835.14, -2134.98, 96.80); - thisAI->AddWaypoint(11, 1823.57, -2118.27, 97.43); - thisAI->AddWaypoint(12, 1814.99, -2110.35, 98.38); - thisAI->AddWaypoint(13, 1806.60, -2103.09, 99.19); - thisAI->AddWaypoint(14, 1798.27, -2095.77, 100.04); - thisAI->AddWaypoint(15, 1783.59, -2079.92, 100.81); - thisAI->AddWaypoint(16, 1776.79, -2069.48, 101.77); - thisAI->AddWaypoint(17, 1776.82, -2054.59, 109.82); - thisAI->AddWaypoint(18, 1776.88, -2047.56, 109.83); - thisAI->AddWaypoint(19, 1776.86, -2036.55, 109.83); - thisAI->AddWaypoint(20, 1776.90, -2024.56, 109.83); //win - thisAI->AddWaypoint(21, 1776.87, -2028.31, 109.83,60000);//stay - thisAI->AddWaypoint(22, 1776.90, -2028.30, 109.83); + npc_torekAI* thisAI = new npc_torekAI(pCreature); + thisAI->FillPointMovementListForCreature(); + return (CreatureAI*)thisAI; } @@ -275,28 +253,7 @@ CreatureAI* GetAI_npc_ruul_snowhoofAI(Creature *_Creature) { npc_ruul_snowhoofAI* ruul_snowhoofAI = new npc_ruul_snowhoofAI(_Creature); - ruul_snowhoofAI->AddWaypoint(0, 3347.250089, -694.700989, 159.925995); - ruul_snowhoofAI->AddWaypoint(1, 3341.527039, -694.725891, 161.124542, 4000); - ruul_snowhoofAI->AddWaypoint(2, 3338.351074, -686.088138, 163.444000); - ruul_snowhoofAI->AddWaypoint(3, 3352.744873, -677.721741, 162.316269); - ruul_snowhoofAI->AddWaypoint(4, 3370.291016, -669.366943, 160.751358); - ruul_snowhoofAI->AddWaypoint(5, 3381.479492, -659.449097, 162.545303); - ruul_snowhoofAI->AddWaypoint(6, 3389.554199, -648.500000, 163.651825); - ruul_snowhoofAI->AddWaypoint(7, 3396.645020, -641.508911, 164.216019); - ruul_snowhoofAI->AddWaypoint(8, 3410.498535, -634.299622, 165.773453); - ruul_snowhoofAI->AddWaypoint(9, 3418.461426, -631.791992, 166.477615); - ruul_snowhoofAI->AddWaypoint(10, 3429.500000, -631.588745, 166.921265); - ruul_snowhoofAI->AddWaypoint(11,3434.950195, -629.245483, 168.333969); - ruul_snowhoofAI->AddWaypoint(12,3438.927979, -618.503235, 171.503143); - ruul_snowhoofAI->AddWaypoint(13,3444.217529, -609.293640, 173.077972, 1000); // Ambush 1 - ruul_snowhoofAI->AddWaypoint(14,3460.505127, -593.794189, 174.342255); - ruul_snowhoofAI->AddWaypoint(15,3480.283203, -578.210327, 176.652313); - ruul_snowhoofAI->AddWaypoint(16,3492.912842, -562.335449, 181.396301); - ruul_snowhoofAI->AddWaypoint(17,3495.230957, -550.977600, 184.652267); - ruul_snowhoofAI->AddWaypoint(18,3496.247070, -529.194214, 188.172028); - ruul_snowhoofAI->AddWaypoint(19,3497.619385, -510.411499, 188.345322, 1000); // Ambush 2 - ruul_snowhoofAI->AddWaypoint(20,3498.498047, -497.787506, 185.806274); - ruul_snowhoofAI->AddWaypoint(21,3484.218750, -489.717529, 182.389862, 4000); // End + ruul_snowhoofAI->FillPointMovementListForCreature(); return (CreatureAI*)ruul_snowhoofAI; } diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp index cd5dffd164c..d834488409a 100644 --- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp @@ -378,41 +378,11 @@ bool QuestAccept_npc_magwin(Player* player, Creature* creature, Quest const* que return true; } -CreatureAI* GetAI_npc_magwinAI(Creature *_Creature) +CreatureAI* GetAI_npc_magwinAI(Creature* pCreature) { - npc_magwinAI* magwinAI = new npc_magwinAI(_Creature); - - magwinAI->AddWaypoint(0, -4784.532227, -11051.060547, 3.484263); - magwinAI->AddWaypoint(1, -4805.509277, -11037.293945, 3.043942); - magwinAI->AddWaypoint(2, -4827.826172, -11034.398438, 1.741959); - magwinAI->AddWaypoint(3, -4852.630859, -11033.695313, 2.208656); - magwinAI->AddWaypoint(4, -4876.791992, -11034.517578, 3.175228); - magwinAI->AddWaypoint(5, -4895.486816, -11038.306641, 9.390890); - magwinAI->AddWaypoint(6, -4915.464844, -11048.402344, 12.369793); - magwinAI->AddWaypoint(7, -4937.288086, -11067.041992, 13.857983); - magwinAI->AddWaypoint(8, -4966.577637, -11067.507813, 15.754786); - magwinAI->AddWaypoint(9, -4993.799805, -11056.544922, 19.175295); - magwinAI->AddWaypoint(10, -5017.836426, -11052.569336, 22.476587); - magwinAI->AddWaypoint(11, -5039.706543, -11058.459961, 25.831593); - magwinAI->AddWaypoint(12, -5057.289063, -11045.474609, 26.972496); - magwinAI->AddWaypoint(13, -5078.828125, -11037.601563, 29.053417); - magwinAI->AddWaypoint(14, -5104.158691, -11039.195313, 29.440195); - magwinAI->AddWaypoint(15, -5120.780273, -11039.518555, 30.142139); - magwinAI->AddWaypoint(16, -5140.833008, -11039.810547, 28.788074); - magwinAI->AddWaypoint(17, -5161.201660, -11040.050781, 27.879545, 4000); - magwinAI->AddWaypoint(18, -5171.842285, -11046.803711, 27.183821); - magwinAI->AddWaypoint(19, -5185.995117, -11056.359375, 20.234867); - magwinAI->AddWaypoint(20, -5198.485840, -11065.065430, 18.872593); - magwinAI->AddWaypoint(21, -5214.062500, -11074.653320, 19.215731); - magwinAI->AddWaypoint(22, -5220.157227, -11088.377930, 19.818476); - magwinAI->AddWaypoint(23, -5233.652832, -11098.846680, 18.349432); - magwinAI->AddWaypoint(24, -5250.163086, -11111.653320, 16.438959); - magwinAI->AddWaypoint(25, -5268.194336, -11125.639648, 12.668313); - magwinAI->AddWaypoint(26, -5286.270508, -11130.669922, 6.912246); - magwinAI->AddWaypoint(27, -5317.449707, -11137.392578, 4.963446); - magwinAI->AddWaypoint(28, -5334.854492, -11154.384766, 6.742664); - magwinAI->AddWaypoint(29, -5353.874512, -11171.595703, 6.903912, 20000); - magwinAI->AddWaypoint(30, -5354.240000, -11171.940000, 6.890000); + npc_magwinAI* magwinAI = new npc_magwinAI(pCreature); + + magwinAI->FillPointMovementListForCreature(); return (CreatureAI*)magwinAI; } diff --git a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp index f6a5c5bd4a2..aca3bb9bb37 100644 --- a/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp +++ b/src/bindings/scripts/scripts/zone/eversong_woods/eversong_woods.cpp @@ -81,18 +81,11 @@ struct TRINITY_DLL_DECL npc_prospector_anvilwardAI : public npc_escortAI } }; -CreatureAI* GetAI_npc_prospector_anvilward(Creature *_Creature) +CreatureAI* GetAI_npc_prospector_anvilward(Creature* pCreature) { - npc_prospector_anvilwardAI* thisAI = new npc_prospector_anvilwardAI(_Creature); - - thisAI->AddWaypoint(0, 9294.78, -6682.51, 22.42); - thisAI->AddWaypoint(1, 9298.27, -6667.99, 22.42); - thisAI->AddWaypoint(2, 9309.63, -6658.84, 22.43); - thisAI->AddWaypoint(3, 9304.43, -6649.31, 26.46); - thisAI->AddWaypoint(4, 9298.83, -6648.00, 28.61); - thisAI->AddWaypoint(5, 9291.06, -6653.46, 31.83, 2500); - thisAI->AddWaypoint(6, 9289.08, -6660.17, 31.85, 5000); - thisAI->AddWaypoint(7, 9291.06, -6653.46, 31.83); + npc_prospector_anvilwardAI* thisAI = new npc_prospector_anvilwardAI(pCreature); + + thisAI->FillPointMovementListForCreature(); return (CreatureAI*)thisAI; } diff --git a/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp b/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp index 61c31fb0fba..41112bad200 100644 --- a/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp +++ b/src/bindings/scripts/scripts/zone/hellfire_peninsula/hellfire_peninsula.cpp @@ -347,38 +347,11 @@ struct TRINITY_DLL_DECL npc_wounded_blood_elfAI : public npc_escortAI } }; -CreatureAI* GetAI_npc_wounded_blood_elf(Creature *_Creature) +CreatureAI* GetAI_npc_wounded_blood_elf(Creature* pCreature) { - npc_wounded_blood_elfAI* welfAI = new npc_wounded_blood_elfAI(_Creature); - - welfAI->AddWaypoint(0, -1137.72, 4272.10, 14.04, 5000); - welfAI->AddWaypoint(1, -1141.34, 4232.42, 14.63); - welfAI->AddWaypoint(2, -1133.47, 4220.88, 11.78); - welfAI->AddWaypoint(3, -1126.18, 4213.26, 13.51); - welfAI->AddWaypoint(4, -1100.12, 4204.32, 16.41); - welfAI->AddWaypoint(5, -1063.68, 4197.92, 15.51); - welfAI->AddWaypoint(6, -1027.28, 4194.36, 15.52); - welfAI->AddWaypoint(7, -995.68, 4189.59, 19.84); - welfAI->AddWaypoint(8, -970.90, 4188.60, 24.61); - welfAI->AddWaypoint(9, -961.93, 4193.34, 26.11, 15000); // Summon 1 - welfAI->AddWaypoint(10, -935.52, 4210.99, 31.98); - welfAI->AddWaypoint(11, -913.42, 4218.27, 37.29); - welfAI->AddWaypoint(12, -896.53, 4207.73, 43.23); - welfAI->AddWaypoint(13, -868.49, 4194.77, 46.75, 30000);// Kneel and Rest Here - welfAI->AddWaypoint(14, -852.83, 4198.29, 47.28, 15000);// Summon 2 - welfAI->AddWaypoint(15, -819.85, 4200.50, 46.37); - welfAI->AddWaypoint(16, -791.92, 4201.96, 44.19); - welfAI->AddWaypoint(17, -774.42, 4202.46, 47.41); - welfAI->AddWaypoint(18, -762.90, 4202.17, 48.81); - welfAI->AddWaypoint(19, -728.25, 4195.35, 50.68); - welfAI->AddWaypoint(20, -713.58, 4192.07, 53.98); - welfAI->AddWaypoint(21, -703.09, 4189.74, 56.96); - welfAI->AddWaypoint(22, -693.70, 4185.43, 57.06); - welfAI->AddWaypoint(23, -686.38, 4159.81, 60.26); - welfAI->AddWaypoint(24, -679.88, 4147.04, 64.20); - welfAI->AddWaypoint(25, -656.74, 4147.72, 64.11); - welfAI->AddWaypoint(26, -652.22, 4137.50, 64.58); - welfAI->AddWaypoint(27, -649.99, 4136.38, 64.63, 30000);// Award Quest Credit + npc_wounded_blood_elfAI* welfAI = new npc_wounded_blood_elfAI(pCreature); + + welfAI->FillPointMovementListForCreature(); return (CreatureAI*)welfAI; } diff --git a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp index 33899c4cd83..fdc8d0f1453 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp @@ -577,6 +577,8 @@ struct TRINITY_DLL_DECL boss_croneAI : public ScriptedAI lDoor->SetGoState(0); if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) rDoor->SetGoState(0); + if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } } @@ -770,6 +772,8 @@ struct TRINITY_DLL_DECL boss_bigbadwolfAI : public ScriptedAI lDoor->SetGoState(0); if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) rDoor->SetGoState(0); + if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } } @@ -1015,6 +1019,8 @@ struct TRINITY_DLL_DECL boss_julianneAI : public ScriptedAI lDoor->SetGoState(0); if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) rDoor->SetGoState(0); + if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } } @@ -1098,10 +1104,12 @@ struct TRINITY_DLL_DECL boss_romuloAI : public ScriptedAI { pInstance->SetData(DATA_OPERA_EVENT, DONE); - if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT))) + if (GameObject* lDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORLEFT))) lDoor->SetGoState(0); if (GameObject* rDoor = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GAMEOBJECT_STAGEDOORRIGHT))) rDoor->SetGoState(0); + if (GameObject* pSideEntrance = GameObject::GetGameObject((*m_creature), pInstance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR))) + pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); } } diff --git a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h index 4304477de2a..47162ec2599 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h +++ b/src/bindings/scripts/scripts/zone/karazhan/def_karazhan.h @@ -2,43 +2,50 @@ * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + #ifndef DEF_KARAZHAN_H #define DEF_KARAZHAN_H -#define DATA_ATTUMEN_EVENT 1 -#define DATA_MOROES_EVENT 2 -#define DATA_MAIDENOFVIRTUE_EVENT 3 -#define DATA_OPTIONAL_BOSS_EVENT 4 -#define DATA_OPERA_EVENT 5 -#define DATA_CURATOR_EVENT 6 -#define DATA_SHADEOFARAN_EVENT 7 -#define DATA_TERESTIAN_EVENT 8 -#define DATA_NETHERSPITE_EVENT 9 -#define DATA_CHESS_EVENT 10 -#define DATA_MALCHEZZAR_EVENT 11 -#define DATA_NIGHTBANE_EVENT 12 -#define DATA_OPERA_PERFORMANCE 13 -#define DATA_OPERA_OZ_DEATHCOUNT 14 -#define DATA_KILREK 15 -#define DATA_TERESTIAN 16 -#define DATA_MOROES 17 -#define DATA_GAMEOBJECT_CURTAINS 18 -#define DATA_GAMEOBJECT_STAGEDOORLEFT 19 -#define DATA_GAMEOBJECT_STAGEDOORRIGHT 20 -#define DATA_GAMEOBJECT_LIBRARY_DOOR 21 -#define DATA_GAMEOBJECT_MASSIVE_DOOR 22 -#define DATA_GAMEOBJECT_NETHER_DOOR 23 -#define DATA_GAMEOBJECT_GAME_DOOR 24 -#define DATA_GAMEOBJECT_GAME_EXIT_DOOR 25 -#define DATA_IMAGE_OF_MEDIVH 26 -#define DATA_MASTERS_TERRACE_DOOR_1 27 -#define DATA_MASTERS_TERRACE_DOOR_2 28 +enum +{ + DATA_ATTUMEN_EVENT = 1, + DATA_MOROES_EVENT = 2, + DATA_MAIDENOFVIRTUE_EVENT = 3, + DATA_OPTIONAL_BOSS_EVENT = 4, + DATA_OPERA_EVENT = 5, + DATA_CURATOR_EVENT = 6, + DATA_SHADEOFARAN_EVENT = 7, + DATA_TERESTIAN_EVENT = 8, + DATA_NETHERSPITE_EVENT = 9, + DATA_CHESS_EVENT = 10, + DATA_MALCHEZZAR_EVENT = 11, + DATA_NIGHTBANE_EVENT = 12, + DATA_OPERA_PERFORMANCE = 13, + DATA_OPERA_OZ_DEATHCOUNT = 14, + DATA_KILREK = 15, + DATA_TERESTIAN = 16, + DATA_MOROES = 17, + DATA_GAMEOBJECT_CURTAINS = 18, + DATA_GAMEOBJECT_STAGEDOORLEFT = 19, + DATA_GAMEOBJECT_STAGEDOORRIGHT = 20, + DATA_GAMEOBJECT_LIBRARY_DOOR = 21, + DATA_GAMEOBJECT_MASSIVE_DOOR = 22, + DATA_GAMEOBJECT_NETHER_DOOR = 23, + DATA_GAMEOBJECT_GAME_DOOR = 24, + DATA_GAMEOBJECT_GAME_EXIT_DOOR = 25, + DATA_IMAGE_OF_MEDIVH = 26, + DATA_MASTERS_TERRACE_DOOR_1 = 27, + DATA_MASTERS_TERRACE_DOOR_2 = 28, + DATA_GO_SIDE_ENTRANCE_DOOR = 29 +}; -// Opera Performances -#define EVENT_OZ 1 -#define EVENT_HOOD 2 -#define EVENT_RAJ 3 +enum OperaEvents +{ + EVENT_OZ = 1, + EVENT_HOOD = 2, + EVENT_RAJ = 3 +}; -#define ERROR_INST_DATA(a) error_log("SD2: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry()); +#define ERROR_INST_DATA(a) error_log("TSCR: Instance Data for Karazhan not set properly. Encounter for Creature Entry %u may not work properly.", a->GetEntry()); #endif diff --git a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp index 185c44c6cdc..e8dccdd62a4 100644 --- a/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp +++ b/src/bindings/scripts/scripts/zone/karazhan/instance_karazhan.cpp @@ -59,6 +59,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance uint64 MoroesGUID; uint64 LibraryDoor; // Door at Shade of Aran uint64 MassiveDoor; // Door at Netherspite + uint64 SideEntranceDoor; // Side Entrance uint64 GamesmansDoor; // Door before Chess uint64 GamesmansExitDoor; // Door after Chess uint64 NetherspaceDoor; // Door at Malchezaar @@ -83,6 +84,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance LibraryDoor = 0; MassiveDoor = 0; + SideEntranceDoor = 0; GamesmansDoor = 0; GamesmansExitDoor = 0; NetherspaceDoor = 0; @@ -146,6 +148,7 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance case DATA_GAMEOBJECT_CURTAINS: return CurtainGUID; case DATA_GAMEOBJECT_LIBRARY_DOOR: return LibraryDoor; case DATA_GAMEOBJECT_MASSIVE_DOOR: return MassiveDoor; + case DATA_GO_SIDE_ENTRANCE_DOOR: return SideEntranceDoor; case DATA_GAMEOBJECT_GAME_DOOR: return GamesmansDoor; case DATA_GAMEOBJECT_GAME_EXIT_DOOR: return GamesmansExitDoor; case DATA_GAMEOBJECT_NETHER_DOOR: return NetherspaceDoor; @@ -221,6 +224,13 @@ struct TRINITY_DLL_DECL instance_karazhan : public ScriptedInstance case 185134: NetherspaceDoor = go->GetGUID(); break; case 184274: MastersTerraceDoor[0] = go->GetGUID(); break; case 184280: MastersTerraceDoor[1] = go->GetGUID(); break; + case 184275: + SideEntranceDoor = go->GetGUID(); + if (GetData(DATA_OPERA_EVENT) != DONE) + go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + else + go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED); + break; } switch(OperaEvent) diff --git a/src/bindings/scripts/scripts/zone/razorfen_downs/razorfen_downs.cpp b/src/bindings/scripts/scripts/zone/razorfen_downs/razorfen_downs.cpp new file mode 100644 index 00000000000..d5c09e504a8 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/razorfen_downs/razorfen_downs.cpp @@ -0,0 +1,85 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Razorfen_Downs +SD%Complete: 100 +SDComment: Support for Henry Stern(2 recipes) +SDCategory: Razorfen Downs +EndScriptData */ + +/* ContentData +npc_henry_stern +EndContentData */ + +#include "precompiled.h" + +/*### +# npc_henry_stern +####*/ + +enum +{ + SPELL_GOLDTHORN_TEA = 13028, + SPELL_TEACHING_GOLDTHORN_TEA = 13029, + SPELL_MIGHT_TROLLS_BLOOD_POTION = 3451, + SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION = 13030, + GOSSIP_TEXT_TEA_ANSWER = 2114, + GOSSIP_TEXT_POTION_ANSWER = 2115, +}; + +#define GOSSIP_ITEM_TEA "Teach me the cooking recipe" +#define GOSSIP_ITEM_POTION "Teach me the alchemy recipe" + +bool GossipHello_npc_henry_stern (Player* pPlayer, Creature* pCreature) +{ + if (pPlayer->GetBaseSkillValue(SKILL_COOKING) >= 175 && !pPlayer->HasSpell(SPELL_GOLDTHORN_TEA)) + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_TEA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); + + if (pPlayer->GetBaseSkillValue(SKILL_ALCHEMY) >= 180 && !pPlayer->HasSpell(SPELL_MIGHT_TROLLS_BLOOD_POTION)) + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_POTION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); + return true; +} + +bool GossipSelect_npc_henry_stern (Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action) +{ + if (action == GOSSIP_ACTION_INFO_DEF + 1) + { + pCreature->CastSpell(pPlayer, SPELL_TEACHING_GOLDTHORN_TEA, true); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_TEA_ANSWER, pCreature->GetGUID()); + } + + if (action == GOSSIP_ACTION_INFO_DEF + 2) + { + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_POTION_ANSWER, pCreature->GetGUID()); + pCreature->CastSpell(pPlayer, SPELL_TEACHING_MIGHTY_TROLLS_BLOOD_POTION, true); + } + + return true; +} + +void AddSC_razorfen_downs() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_henry_stern"; + newscript->pGossipHello = &GossipHello_npc_henry_stern; + newscript->pGossipSelect = &GossipSelect_npc_henry_stern; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp index bccbcb62c33..956fa26bdac 100644 --- a/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp +++ b/src/bindings/scripts/scripts/zone/scarlet_monastery/boss_herod.cpp @@ -105,45 +105,22 @@ struct TRINITY_DLL_DECL boss_herodAI : public ScriptedAI } }; -CreatureAI* GetAI_boss_herod(Creature *_Creature) +CreatureAI* GetAI_boss_herod(Creature* pCreature) { - return new boss_herodAI (_Creature); + return new boss_herodAI(pCreature); } -float Location[12][3]= -{ - {1945.81, -431.54, 16.36}, - {1946.21, -436.41, 16.36}, - {1950.01, -444.11, 14.63}, - {1956.08, -449.34, 13.12}, - {1966.59, -450.55, 11.27}, - {1976.09, -447.51, 11.27}, - {1983.42, -435.85, 11.27}, - {1978.17, -428.81, 11.27}, - {1973.97, -422.08, 9.04}, - {1963.84, -418.90, 6.17}, - {1961.22, -422.74, 6.17}, - {1964.80, -431.26, 6.17} -}; - -uint32 Wait[12][1]= -{ - {0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{600000} -}; - struct TRINITY_DLL_DECL mob_scarlet_traineeAI : public npc_escortAI { - mob_scarlet_traineeAI(Creature *c) : npc_escortAI(c) {} - - uint32 Start_Timer; - - void WaypointReached(uint32 i) { } - - void Reset() + mob_scarlet_traineeAI(Creature *c) : npc_escortAI(c) { - Start_Timer = urand(1500,4500); + Start_Timer = urand(1000,6000); } + uint32 Start_Timer; + + void Reset() { } + void WaypointReached(uint32 uiPoint) { } void Aggro(Unit* who) { } void UpdateAI(const uint32 diff) @@ -161,14 +138,13 @@ struct TRINITY_DLL_DECL mob_scarlet_traineeAI : public npc_escortAI } }; -CreatureAI* GetAI_mob_scarlet_trainee(Creature* _Creature) +CreatureAI* GetAI_mob_scarlet_trainee(Creature* pCreature) { - mob_scarlet_traineeAI* thisAI = new mob_scarlet_traineeAI(_Creature); + mob_scarlet_traineeAI* thisAI = new mob_scarlet_traineeAI(pCreature); - for(uint32 i = 0; i < 12; ++i) - thisAI->AddWaypoint(i, Location[i][0], Location[i][1], Location[i][2], Wait[i][0]); + thisAI->FillPointMovementListForCreature(); - return ((CreatureAI*)thisAI); + return (CreatureAI*)thisAI; } void AddSC_boss_herod() diff --git a/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp b/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp index 717849bc07f..6c8f0939b5c 100644 --- a/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp +++ b/src/bindings/scripts/scripts/zone/shadowfang_keep/shadowfang_keep.cpp @@ -33,7 +33,11 @@ EndContentData */ ## npc_shadowfang_prisoner ######*/ -#define SAY_FREE -1033000 +enum +{ + SAY_FREE = -1033000 +}; + #define GOSSIP_ITEM_DOOR "Thanks, I'll follow you to the door." struct TRINITY_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI @@ -58,48 +62,33 @@ struct TRINITY_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI void Aggro(Unit* who) {} }; -CreatureAI* GetAI_npc_shadowfang_prisoner(Creature *_Creature) +CreatureAI* GetAI_npc_shadowfang_prisoner(Creature* pCreature) { - npc_shadowfang_prisonerAI* prisonerAI = new npc_shadowfang_prisonerAI(_Creature); - - uint32 eCreature = _Creature->GetEntry(); + npc_shadowfang_prisonerAI* prisonerAI = new npc_shadowfang_prisonerAI(pCreature); - if( eCreature==3849) //adamant - prisonerAI->AddWaypoint(0, -254.47, 2117.48, 81.17); - if( eCreature==3850) //ashcrombe - prisonerAI->AddWaypoint(0, -252.35, 2126.71, 81.17); - - prisonerAI->AddWaypoint(1, -253.63, 2131.27, 81.28); - prisonerAI->AddWaypoint(2, -249.66, 2142.45, 87.01); - prisonerAI->AddWaypoint(3, -248.08, 2143.68, 87.01); - prisonerAI->AddWaypoint(4, -238.87, 2139.93, 87.01); - prisonerAI->AddWaypoint(5, -235.47, 2149.18, 90.59); - prisonerAI->AddWaypoint(6, -239.89, 2156.06, 90.62, 20000); + prisonerAI->FillPointMovementListForCreature(); return (CreatureAI*)prisonerAI; } -bool GossipHello_npc_shadowfang_prisoner(Player *player, Creature *_Creature) +bool GossipHello_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature) { - ScriptedInstance* pInstance = ((ScriptedInstance*)_Creature->GetInstanceData()); - - if (!pInstance) - return false; - - if (pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) - player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + ScriptedInstance* pInstance = ((ScriptedInstance*)pCreature->GetInstanceData()); - player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE) + pPlayer->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID()); return true; } -bool GossipSelect_npc_shadowfang_prisoner(Player *player, Creature *_Creature, uint32 sender, uint32 action) +bool GossipSelect_npc_shadowfang_prisoner(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) { - if (action == GOSSIP_ACTION_INFO_DEF+1) + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) { - player->CLOSE_GOSSIP_MENU(); - ((npc_escortAI*)(_Creature->AI()))->Start(false, false, false); + pPlayer->CLOSE_GOSSIP_MENU(); + ((npc_escortAI*)(pCreature->AI()))->Start(false, true, false); } return true; } diff --git a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp index bbd5cdf2235..d299efb3ea8 100644 --- a/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp +++ b/src/bindings/scripts/scripts/zone/shattrath/shattrath_city.cpp @@ -350,64 +350,7 @@ CreatureAI* GetAI_npc_kservantAI(Creature *_Creature) { npc_kservantAI* kservantAI = new npc_kservantAI(_Creature); - kservantAI->AddWaypoint(0, -1863.369019, 5419.517090, -10.463668, 4000); - kservantAI->AddWaypoint(1, -1861.749023, 5416.465332, -10.508068); - kservantAI->AddWaypoint(2, -1857.036133, 5410.966309, -12.428039); - kservantAI->AddWaypoint(3, -1831.539185, 5365.472168, -12.428039); - kservantAI->AddWaypoint(4, -1813.416504, 5333.776855, -12.428039); - kservantAI->AddWaypoint(5, -1800.354370, 5313.290039, -12.428039); - kservantAI->AddWaypoint(6, -1775.624878, 5268.786133, -38.809181); - kservantAI->AddWaypoint(7, -1770.147339, 5259.268066, -38.829231); - kservantAI->AddWaypoint(8, -1762.814209, 5261.098145, -38.848995); - kservantAI->AddWaypoint(9, -1740.110474, 5268.858398, -40.208965); - kservantAI->AddWaypoint(10, -1725.837402, 5270.936035, -40.208965); - kservantAI->AddWaypoint(11, -1701.580322, 5290.323242, -40.209187); - kservantAI->AddWaypoint(12, -1682.877808, 5291.406738, -34.429646); - kservantAI->AddWaypoint(13, -1670.101685, 5291.201172, -32.786007); - kservantAI->AddWaypoint(14, -1656.666870, 5294.333496, -37.862648); - kservantAI->AddWaypoint(15, -1652.035767, 5295.413086, -40.245499); - kservantAI->AddWaypoint(16, -1620.860596, 5300.133301, -40.208992); - kservantAI->AddWaypoint(17, -1607.630981, 5293.983398, -38.577045, 5000); - kservantAI->AddWaypoint(18, -1607.630981, 5293.983398, -38.577045, 5000); - kservantAI->AddWaypoint(19, -1607.630981, 5293.983398, -38.577045, 5000); - kservantAI->AddWaypoint(20, -1622.140869, 5301.955566, -40.208897); - kservantAI->AddWaypoint(21, -1621.131836, 5333.112793, -40.208897); - kservantAI->AddWaypoint(22, -1637.598999, 5342.134277, -40.208790); - kservantAI->AddWaypoint(23, -1648.521606, 5352.309570, -47.496170); - kservantAI->AddWaypoint(24, -1654.606934, 5357.419434, -45.870892); - kservantAI->AddWaypoint(25, -1633.670044, 5422.067871, -42.835541); - kservantAI->AddWaypoint(25, -1656.567505, 5426.236328, -40.405815); - kservantAI->AddWaypoint(26, -1664.932373, 5425.686523, -38.846405); - kservantAI->AddWaypoint(27, -1681.406006, 5425.871094, -38.810928); - kservantAI->AddWaypoint(28, -1730.875977, 5427.413574, -12.427910); - kservantAI->AddWaypoint(29, -1743.509521, 5369.599121, -12.427910); - kservantAI->AddWaypoint(30, -1877.217041, 5303.710449, -12.427989); - kservantAI->AddWaypoint(31, -1890.371216, 5289.273438, -12.428268); - kservantAI->AddWaypoint(32, -1905.505737, 5266.534668, 2.630672); - kservantAI->AddWaypoint(33, -1909.381348, 5273.008301, 1.663714, 10000); - kservantAI->AddWaypoint(34, -1909.381348, 5273.008301, 1.663714, 12000); - kservantAI->AddWaypoint(35, -1909.381348, 5273.008301, 1.663714, 8000); - kservantAI->AddWaypoint(36, -1909.381348, 5273.008301, 1.663714, 15000); - kservantAI->AddWaypoint(37, -1927.561401, 5275.324707, 1.984987); - kservantAI->AddWaypoint(38, -1927.385498, 5300.879883, -12.427236); - kservantAI->AddWaypoint(39, -1921.063965, 5314.318359, -12.427236); - kservantAI->AddWaypoint(40, -1965.425415, 5379.298828, -12.427236); - kservantAI->AddWaypoint(41, -1981.233154, 5450.743652, -12.427236); - kservantAI->AddWaypoint(42, -1958.022461, 5455.904297, 0.487659); - kservantAI->AddWaypoint(43, -1951.991455, 5463.580566, 0.874490, 10000); - kservantAI->AddWaypoint(44, -1951.991455, 5463.580566, 0.874490, 12000); - kservantAI->AddWaypoint(45, -1968.730225, 5481.752930, -12.427846); - kservantAI->AddWaypoint(46, -1881.839844, 5554.040039, -12.427846); - kservantAI->AddWaypoint(47, -1841.566650, 5545.965332, -12.427846); - kservantAI->AddWaypoint(48, -1837.658325, 5523.780273, 0.558756); - kservantAI->AddWaypoint(49, -1831.321777, 5534.821777, 1.221819, 6000); - kservantAI->AddWaypoint(50, -1831.321777, 5534.821777, 1.221819, 8000); - kservantAI->AddWaypoint(51, -1831.321777, 5534.821777, 1.221819, 5000); - kservantAI->AddWaypoint(52, -1850.060669, 5472.610840, 0.857320, 6000); - kservantAI->AddWaypoint(53, -1850.060669, 5472.610840, 0.857320, 8000); - kservantAI->AddWaypoint(54, -1850.060669, 5472.610840, 0.857320, 9000); - kservantAI->AddWaypoint(55, -1850.060669, 5472.610840, 0.857320, 9000); - kservantAI->AddWaypoint(56, -1850.060669, 5472.610840, 0.857320, 4000); + kservantAI->FillPointMovementListForCreature(); return (CreatureAI*)kservantAI; } diff --git a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp index ab83d78e266..bb1280a8ba6 100644 --- a/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp +++ b/src/bindings/scripts/scripts/zone/tanaris/tanaris.cpp @@ -211,38 +211,11 @@ struct TRINITY_DLL_DECL npc_custodian_of_timeAI : public npc_escortAI } }; -CreatureAI* GetAI_npc_custodian_of_time(Creature *_Creature) +CreatureAI* GetAI_npc_custodian_of_time(Creature* pCreature) { - npc_custodian_of_timeAI* custodian_of_timeAI = new npc_custodian_of_timeAI(_Creature); - - custodian_of_timeAI->AddWaypoint(0, -8535.57,-4212.61, -212.04); - custodian_of_timeAI->AddWaypoint(1, -8456.48,-4211.77, -213.30); - custodian_of_timeAI->AddWaypoint(2, -8374.93,-4250.21, -205.05,5000); - custodian_of_timeAI->AddWaypoint(3, -8374.93,-4250.21, -204.38,16000); - custodian_of_timeAI->AddWaypoint(4, -8374.93,-4250.21, -204.38,10000); - custodian_of_timeAI->AddWaypoint(5, -8374.93,-4250.21, -204.38,2000); - custodian_of_timeAI->AddWaypoint(6, -8439.40,-4180.05, -209.25); - custodian_of_timeAI->AddWaypoint(7, -8437.82,-4120.84, -208.59,10000); - custodian_of_timeAI->AddWaypoint(8, -8437.82,-4120.84, -208.59,16000); - custodian_of_timeAI->AddWaypoint(9, -8437.82,-4120.84, -208.59,13000); - custodian_of_timeAI->AddWaypoint(10, -8437.82,-4120.84, -208.59,18000); - custodian_of_timeAI->AddWaypoint(11, -8437.82,-4120.84, -208.59,15000); - custodian_of_timeAI->AddWaypoint(12, -8437.82,-4120.84, -208.59,2000); - custodian_of_timeAI->AddWaypoint(13, -8467.26,-4198.63, -214.21); - custodian_of_timeAI->AddWaypoint(14, -8667.76,-4252.13, -209.56); - custodian_of_timeAI->AddWaypoint(15, -8703.71,-4234.58, -209.5,14000); - custodian_of_timeAI->AddWaypoint(16, -8703.71,-4234.58, -209.5,2000); - custodian_of_timeAI->AddWaypoint(17, -8642.81,-4304.37, -209.57); - custodian_of_timeAI->AddWaypoint(18, -8649.06,-4394.36, -208.46,6000); - custodian_of_timeAI->AddWaypoint(19, -8649.06,-4394.36, -208.46,18000); - custodian_of_timeAI->AddWaypoint(20, -8649.06,-4394.36, -208.46,2000); - custodian_of_timeAI->AddWaypoint(21, -8468.72,-4437.67, -215.45); - custodian_of_timeAI->AddWaypoint(22, -8427.54,-4426, -211.13); - custodian_of_timeAI->AddWaypoint(23, -8364.83,-4393.32, -205.91); - custodian_of_timeAI->AddWaypoint(24, -8304.54,-4357.2, -208.2,18000); - custodian_of_timeAI->AddWaypoint(25, -8304.54,-4357.2, -208.2,2000); - custodian_of_timeAI->AddWaypoint(26, -8375.42,-4250.41, -205.14,5000); - custodian_of_timeAI->AddWaypoint(27, -8375.42,-4250.41, -205.14,5000); + npc_custodian_of_timeAI* custodian_of_timeAI = new npc_custodian_of_timeAI(pCreature); + + custodian_of_timeAI->FillPointMovementListForCreature(); return (CreatureAI*)custodian_of_timeAI; } diff --git a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp index fe83eb68bb9..5e392e138d6 100644 --- a/src/bindings/scripts/scripts/zone/westfall/westfall.cpp +++ b/src/bindings/scripts/scripts/zone/westfall/westfall.cpp @@ -117,55 +117,11 @@ bool QuestAccept_npc_defias_traitor(Player* player, Creature* creature, Quest co return true; } -CreatureAI* GetAI_npc_defias_traitor(Creature *_Creature) +CreatureAI* GetAI_npc_defias_traitor(Creature* pCreature) { - npc_defias_traitorAI* thisAI = new npc_defias_traitorAI(_Creature); - - thisAI->AddWaypoint(0, -10508.40, 1068.00, 55.21); - thisAI->AddWaypoint(1, -10518.30, 1074.84, 53.96); - thisAI->AddWaypoint(2, -10534.82, 1081.92, 49.88); - thisAI->AddWaypoint(3, -10546.51, 1084.88, 50.13); - thisAI->AddWaypoint(4, -10555.29, 1084.45, 45.75); - thisAI->AddWaypoint(5, -10566.57, 1083.53, 42.10); - thisAI->AddWaypoint(6, -10575.83, 1082.34, 39.46); - thisAI->AddWaypoint(7, -10585.67, 1081.08, 37.77); - thisAI->AddWaypoint(8, -10600.08, 1078.19, 36.23); - thisAI->AddWaypoint(9, -10608.69, 1076.08, 35.88); - thisAI->AddWaypoint(10, -10621.26, 1073.00, 35.40); - thisAI->AddWaypoint(11, -10638.12, 1060.18, 33.61); - thisAI->AddWaypoint(12, -10655.87, 1038.99, 33.48); - thisAI->AddWaypoint(13, -10664.68, 1030.54, 32.70); - thisAI->AddWaypoint(14, -10708.68, 1033.86, 33.32); - thisAI->AddWaypoint(15, -10754.43, 1017.93, 32.79); - thisAI->AddWaypoint(16, -10802.26, 1018.01, 32.16); - thisAI->AddWaypoint(17, -10832.60, 1009.04, 32.71); - thisAI->AddWaypoint(18, -10866.56, 1006.51, 31.71); // Fix waypoints from roughly this point, test first to get proper one - thisAI->AddWaypoint(19, -10879.98, 1005.10, 32.84); - thisAI->AddWaypoint(20, -10892.45, 1001.32, 34.46); - thisAI->AddWaypoint(21, -10906.14, 997.11, 36.15); - thisAI->AddWaypoint(22, -10922.26, 1002.23, 35.74); - thisAI->AddWaypoint(23, -10936.32, 1023.38, 36.52); - thisAI->AddWaypoint(24, -10933.35, 1052.61, 35.85); - thisAI->AddWaypoint(25, -10940.25, 1077.66, 36.49); - thisAI->AddWaypoint(26, -10957.09, 1099.33, 36.83); - thisAI->AddWaypoint(27, -10956.53, 1119.90, 36.73); - thisAI->AddWaypoint(28, -10939.30, 1150.75, 37.42); - thisAI->AddWaypoint(29, -10915.14, 1202.09, 36.55); - thisAI->AddWaypoint(30, -10892.59, 1257.03, 33.37); - thisAI->AddWaypoint(31, -10891.93, 1306.66, 35.45); - thisAI->AddWaypoint(32, -10896.17, 1327.86, 37.77); - thisAI->AddWaypoint(33, -10906.03, 1368.05, 40.91); - thisAI->AddWaypoint(34, -10910.18, 1389.33, 42.62); - thisAI->AddWaypoint(35, -10915.42, 1417.72, 42.93); - thisAI->AddWaypoint(36, -10926.37, 1421.18, 43.04); // walk here and say - thisAI->AddWaypoint(37, -10952.31, 1421.74, 43.40); - thisAI->AddWaypoint(38, -10980.04, 1411.38, 42.79); - thisAI->AddWaypoint(39, -11006.06, 1420.47, 43.26); - thisAI->AddWaypoint(40, -11021.98, 1450.59, 43.09); - thisAI->AddWaypoint(41, -11025.36, 1491.59, 43.15); - thisAI->AddWaypoint(42, -11036.09, 1508.32, 43.28); - thisAI->AddWaypoint(43, -11060.68, 1526.72, 43.19); - thisAI->AddWaypoint(44, -11072.75, 1527.77, 43.20, 5000);// say and quest credit + npc_defias_traitorAI* thisAI = new npc_defias_traitorAI(pCreature); + + thisAI->FillPointMovementListForCreature(); return (CreatureAI*)thisAI; } |