diff options
-rw-r--r-- | sql/FULL/world_script_texts.sql | 5 | ||||
-rw-r--r-- | sql/FULL/world_script_waypoints.sql | 118 | ||||
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 1 | ||||
-rw-r--r-- | sql/updates/6877_world_script_texts.sql | 8 | ||||
-rw-r--r-- | sql/updates/6877_world_script_waypoints.sql | 118 | ||||
-rw-r--r-- | sql/updates/6877_world_scriptnames.sql | 2 | ||||
-rw-r--r-- | src/bindings/scripts/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/eastern_kingdoms/redridge_mountains.cpp | 171 | ||||
-rw-r--r-- | src/bindings/scripts/system/ScriptLoader.cpp | 2 |
10 files changed, 430 insertions, 0 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index 734dea95aff..5bfab83de77 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -413,6 +413,11 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (1754,-1000461,'Hmm, it could be that meddle Shaw. I will see what I can discover. Be off with you. I''ll contact you again soon.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), (7766,-1000462,'That''s it! That''s what you were waiting for! KILL THEM!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''), (1755,-1000463,'The Defias shall succeed! No meek adventurer will stop us!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000464,'My wounds are grave. Forgive my slow pace but my injuries won''t allow me to walk any faster.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000465,'Ah, fresh air, at last! I need a moment to reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000466,'The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let''s go!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000467,'Marshal Marris, sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000468,'Brave adventurer, thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), -- -1 033 000 SHADOWFANG KEEP (0,-1033000,'Follow me and I''ll open the courtyard door for you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,7,1,'prisoner ashcrombe SAY_FREE_AS'), diff --git a/sql/FULL/world_script_waypoints.sql b/sql/FULL/world_script_waypoints.sql index 9733793b775..749b9d0a3d5 100644 --- a/sql/FULL/world_script_waypoints.sql +++ b/sql/FULL/world_script_waypoints.sql @@ -1845,3 +1845,121 @@ INSERT INTO `script_waypoint` (`entry`,`pointid`,`location_x`, `location_y`, `lo (25589, 28,'4387.11','5450.98','48.6992',0), (25589, 29,'4364.52','5468.98','48.8229',0), (25589, 30,'4344.02','5483.26','48.0509',0); + +DELETE FROM `script_waypoint` WHERE `entry`=349; +INSERT INTO `script_waypoint` VALUES +(349,1,-8763.9,-2185.21,141.217,0,''), +(349,2,-8768.76,-2185.94,141.949,0,''), +(349,3,-8772.1,-2189.18,141.443,0,''), +(349,4,-8778.78,-2195.66,140.662,0,''), +(349,5,-8789.74,-2191.46,141.634,0,''), +(349,6,-8802.37,-2185.99,141.96,0,''), +(349,7,-8818,-2184.8,139.153,0,''), +(349,8,-8828.42,-2193.02,138.973,0,''), +(349,9,-8826.45,-2203.82,140.293,0,''), +(349,10,-8822.54,-2211.43,142.884,0,''), +(349,11,-8813.51,-2225.08,143.327,0,''), +(349,12,-8807.5,-2233.92,144.441,0,''), +(349,13,-8801.3,-2239.04,146.476,0,''), +(349,14,-8797.57,-2243.61,146.594,0,''), +(349,15,-8794.38,-2250.83,146.723,0,''), +(349,16,-8788.1,-2255.1,147.309,0,''), +(349,17,-8775.37,-2259.82,149.18,0,''), +(349,18,-8768.09,-2259.54,150.52,0,''), +(349,19,-8754.65,-2255.62,152.253,0,''), +(349,20,-8748.51,-2252.62,153.098,0,''), +(349,21,-8743.2,-2251.67,154.038,0,''), +(349,22,-8738.4,-2250.23,154.028,0,''), +(349,23,-8734.35,-2251.56,154.363,0,''), +(349,24,-8727.41,-2248.64,154.919,0,''), +(349,25,-8717.66,-2246.3,154.926,0,''), +(349,26,-8709.05,-2245.83,154.767,0,''), +(349,27,-8700.13,-2243.28,153.872,0,''), +(349,28,-8690.15,-2242.54,153.733,0,''), +(349,29,-8683.49,-2244.31,155.356,0,''), +(349,30,-8674.53,-2247.89,155.574,0,''), +(349,31,-8669.86,-2252.77,154.854,0,''), +(349,32,-8669.07,-2258.88,156.424,0,''), +(349,33,-8670.56,-2264.69,156.978,0,''), +(349,34,-8673.45,-2269.45,156.007,0,''), +(349,35,-8674.4,-2275.9,155.747,0,''), +(349,36,-8674.82,-2282.75,155.496,0,''), +(349,37,-8675.17,-2289.5,157.049,0,''), +(349,38,-8676.43,-2297.67,156.701,0,''), +(349,39,-8677.59,-2304.85,155.917,0,''), +(349,40,-8682.32,-2312.88,155.928,0,''), +(349,41,-8687.78,-2324.44,156.024,0,''), +(349,42,-8695.71,-2334.87,156.06,0,''), +(349,43,-8705.17,-2345.13,156.021,0,''), +(349,44,-8715.1,-2353.95,156.188,0,''), +(349,45,-8725.8,-2359.17,156.253,0,''), +(349,46,-8735.92,-2363.27,157.151,0,''), +(349,47,-8746.82,-2367.99,158.13,0,''), +(349,48,-8755.38,-2375.72,157.271,0,''), +(349,49,-8765.12,-2388.08,156.092,0,''), +(349,50,-8768.84,-2395.58,155.926,0,''), +(349,51,-8772.85,-2405.27,156.418,0,''), +(349,52,-8776.95,-2414.94,156.388,0,''), +(349,53,-8781.69,-2430.11,153.264,0,''), +(349,54,-8786.76,-2440.34,147.849,0,''), +(349,55,-8792.01,-2453.38,142.746,0,''), +(349,56,-8797.41,-2462.21,138.171,0,''), +(349,57,-8804.78,-2472.43,134.192,0,''), +(349,58,-8815.26,-2478.45,133.079,0,''), +(349,59,-8823.74,-2491.21,132.911,0,''), +(349,60,-8835.25,-2496.44,132.057,0,''), +(349,61,-8841.04,-2503.01,132.199,0,''), +(349,62,-8850.81,-2509.63,132.865,0,''), +(349,63,-8858.64,-2522.29,133.852,0,''), +(349,64,-8862.25,-2527.1,134.279,0,''), +(349,65,-8870.67,-2542.08,131.044,0,''), +(349,66,-8880.4,-2550.79,130.505,0,''), +(349,67,-8892.87,-2560.3,130.558,0,''), +(349,68,-8908.74,-2573.64,131.616,0,''), +(349,69,-8922.05,-2585.31,132.446,0,''), +(349,70,-8935.86,-2591.19,132.446,0,''), +(349,71,-8949.08,-2596.87,132.537,0,''), +(349,72,-8959.17,-2599.72,132.507,0,''), +(349,73,-8969.43,-2601.96,132.471,0,''), +(349,74,-8979.77,-2603.66,132.39,0,''), +(349,75,-8991.61,-2604.16,131.196,0,''), +(349,76,-9000.2,-2602.38,128.954,0,''), +(349,77,-9011.57,-2594.23,127.435,0,''), +(349,78,-9019.77,-2587.67,126.618,0,''), +(349,79,-9028.35,-2582.26,125.787,0,''), +(349,80,-9038.96,-2572.71,124.748,0,''), +(349,81,-9046.92,-2560.64,124.447,0,''), +(349,82,-9059.29,-2550.1,123.756,0,''), +(349,83,-9068.15,-2547.28,122.965,0,''), +(349,84,-9077.54,-2541.67,121.17,0,''), +(349,85,-9085.61,-2532.98,118.85,0,''), +(349,86,-9097.8,-2520.49,117.401,0,''), +(349,87,-9110.18,-2507.01,117.098,0,''), +(349,88,-9119.21,-2498.23,116.627,0,''), +(349,89,-9124.61,-2487.07,115.972,0,''), +(349,90,-9127.42,-2478.53,114.843,0,''), +(349,91,-9133.18,-2465.77,113.029,0,''), +(349,92,-9137.54,-2456.22,111.051,0,''), +(349,93,-9146.73,-2441.6,107.979,0,''), +(349,94,-9155.62,-2430.79,106.251,0,''), +(349,95,-9158.06,-2420.36,104.838,0,''), +(349,96,-9157.25,-2410.2,103.858,0,''), +(349,97,-9152.95,-2401.47,102.679,0,''), +(349,98,-9153.63,-2393.46,100.63,0,''), +(349,99,-9156.48,-2385.68,98.2937,0,''), +(349,100,-9161.01,-2379.87,96.2066,0,''), +(349,101,-9169.08,-2373.14,93.8832,0,''), +(349,102,-9175.61,-2368.72,92.5178,0,''), +(349,103,-9187.1,-2360.52,89.9231,0,''), +(349,104,-9194.27,-2352.89,87.593,0,''), +(349,105,-9201.07,-2344.88,85.8516,0,''), +(349,106,-9205.62,-2339.56,85.0342,0,''), +(349,107,-9212.44,-2331.58,83.8068,0,''), +(349,108,-9219.26,-2323.6,82.29,0,''), +(349,109,-9229.98,-2313.25,79.4506,0,''), +(349,110,-9240.03,-2303.51,76.7841,0,''), +(349,111,-9249.34,-2298.82,74.3911,0,''), +(349,112,-9254.95,-2296.68,72.8144,0,''), +(349,113,-9264.73,-2292.92,70.0089,0,''), +(349,114,-9272.24,-2293.79,68.6096,0,''), +(349,115,-9277.03,-2295.98,68.1135,10000,''); diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 871f2a7b21b..1d717fd1af5 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -904,6 +904,7 @@ UPDATE `instance_template` SET `script`='instance_razorfen_kraul' WHERE `map`=47 UPDATE `creature_template` SET `ScriptName`='npc_deaths_head_ward_keeper' WHERE `entry`=4625; /* REDRIDGE MOUNTAINS */ +UPDATE `creature_template` SET `ScriptName`='npc_corporal_keeshan' WHERE `entry`=349; /* RUINS OF AHN'QIRAJ */ UPDATE `creature_template` SET `ScriptName`='boss_kurinnaxx' WHERE `entry`=15348; diff --git a/sql/updates/6877_world_script_texts.sql b/sql/updates/6877_world_script_texts.sql new file mode 100644 index 00000000000..607a2455fc3 --- /dev/null +++ b/sql/updates/6877_world_script_texts.sql @@ -0,0 +1,8 @@ +DELETE FROM `script_texts` WHERE `entry` IN (-1000464,-1000465,-1000466,-1000467,-1000468); +INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES + (349,-1000464,'My wounds are grave. Forgive my slow pace but my injuries won''t allow me to walk any faster.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000465,'Ah, fresh air, at last! I need a moment to reset.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000466,'The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let''s go!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000467,'Marshal Marris, sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), + (349,-1000468,'Brave adventurer, thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''); + diff --git a/sql/updates/6877_world_script_waypoints.sql b/sql/updates/6877_world_script_waypoints.sql new file mode 100644 index 00000000000..3e86967627d --- /dev/null +++ b/sql/updates/6877_world_script_waypoints.sql @@ -0,0 +1,118 @@ +DELETE FROM `script_waypoint` WHERE `entry`=349; +INSERT INTO `script_waypoint` VALUES +(349,1,-8763.9,-2185.21,141.217,0,''), +(349,2,-8768.76,-2185.94,141.949,0,''), +(349,3,-8772.1,-2189.18,141.443,0,''), +(349,4,-8778.78,-2195.66,140.662,0,''), +(349,5,-8789.74,-2191.46,141.634,0,''), +(349,6,-8802.37,-2185.99,141.96,0,''), +(349,7,-8818,-2184.8,139.153,0,''), +(349,8,-8828.42,-2193.02,138.973,0,''), +(349,9,-8826.45,-2203.82,140.293,0,''), +(349,10,-8822.54,-2211.43,142.884,0,''), +(349,11,-8813.51,-2225.08,143.327,0,''), +(349,12,-8807.5,-2233.92,144.441,0,''), +(349,13,-8801.3,-2239.04,146.476,0,''), +(349,14,-8797.57,-2243.61,146.594,0,''), +(349,15,-8794.38,-2250.83,146.723,0,''), +(349,16,-8788.1,-2255.1,147.309,0,''), +(349,17,-8775.37,-2259.82,149.18,0,''), +(349,18,-8768.09,-2259.54,150.52,0,''), +(349,19,-8754.65,-2255.62,152.253,0,''), +(349,20,-8748.51,-2252.62,153.098,0,''), +(349,21,-8743.2,-2251.67,154.038,0,''), +(349,22,-8738.4,-2250.23,154.028,0,''), +(349,23,-8734.35,-2251.56,154.363,0,''), +(349,24,-8727.41,-2248.64,154.919,0,''), +(349,25,-8717.66,-2246.3,154.926,0,''), +(349,26,-8709.05,-2245.83,154.767,0,''), +(349,27,-8700.13,-2243.28,153.872,0,''), +(349,28,-8690.15,-2242.54,153.733,0,''), +(349,29,-8683.49,-2244.31,155.356,0,''), +(349,30,-8674.53,-2247.89,155.574,0,''), +(349,31,-8669.86,-2252.77,154.854,0,''), +(349,32,-8669.07,-2258.88,156.424,0,''), +(349,33,-8670.56,-2264.69,156.978,0,''), +(349,34,-8673.45,-2269.45,156.007,0,''), +(349,35,-8674.4,-2275.9,155.747,0,''), +(349,36,-8674.82,-2282.75,155.496,0,''), +(349,37,-8675.17,-2289.5,157.049,0,''), +(349,38,-8676.43,-2297.67,156.701,0,''), +(349,39,-8677.59,-2304.85,155.917,0,''), +(349,40,-8682.32,-2312.88,155.928,0,''), +(349,41,-8687.78,-2324.44,156.024,0,''), +(349,42,-8695.71,-2334.87,156.06,0,''), +(349,43,-8705.17,-2345.13,156.021,0,''), +(349,44,-8715.1,-2353.95,156.188,0,''), +(349,45,-8725.8,-2359.17,156.253,0,''), +(349,46,-8735.92,-2363.27,157.151,0,''), +(349,47,-8746.82,-2367.99,158.13,0,''), +(349,48,-8755.38,-2375.72,157.271,0,''), +(349,49,-8765.12,-2388.08,156.092,0,''), +(349,50,-8768.84,-2395.58,155.926,0,''), +(349,51,-8772.85,-2405.27,156.418,0,''), +(349,52,-8776.95,-2414.94,156.388,0,''), +(349,53,-8781.69,-2430.11,153.264,0,''), +(349,54,-8786.76,-2440.34,147.849,0,''), +(349,55,-8792.01,-2453.38,142.746,0,''), +(349,56,-8797.41,-2462.21,138.171,0,''), +(349,57,-8804.78,-2472.43,134.192,0,''), +(349,58,-8815.26,-2478.45,133.079,0,''), +(349,59,-8823.74,-2491.21,132.911,0,''), +(349,60,-8835.25,-2496.44,132.057,0,''), +(349,61,-8841.04,-2503.01,132.199,0,''), +(349,62,-8850.81,-2509.63,132.865,0,''), +(349,63,-8858.64,-2522.29,133.852,0,''), +(349,64,-8862.25,-2527.1,134.279,0,''), +(349,65,-8870.67,-2542.08,131.044,0,''), +(349,66,-8880.4,-2550.79,130.505,0,''), +(349,67,-8892.87,-2560.3,130.558,0,''), +(349,68,-8908.74,-2573.64,131.616,0,''), +(349,69,-8922.05,-2585.31,132.446,0,''), +(349,70,-8935.86,-2591.19,132.446,0,''), +(349,71,-8949.08,-2596.87,132.537,0,''), +(349,72,-8959.17,-2599.72,132.507,0,''), +(349,73,-8969.43,-2601.96,132.471,0,''), +(349,74,-8979.77,-2603.66,132.39,0,''), +(349,75,-8991.61,-2604.16,131.196,0,''), +(349,76,-9000.2,-2602.38,128.954,0,''), +(349,77,-9011.57,-2594.23,127.435,0,''), +(349,78,-9019.77,-2587.67,126.618,0,''), +(349,79,-9028.35,-2582.26,125.787,0,''), +(349,80,-9038.96,-2572.71,124.748,0,''), +(349,81,-9046.92,-2560.64,124.447,0,''), +(349,82,-9059.29,-2550.1,123.756,0,''), +(349,83,-9068.15,-2547.28,122.965,0,''), +(349,84,-9077.54,-2541.67,121.17,0,''), +(349,85,-9085.61,-2532.98,118.85,0,''), +(349,86,-9097.8,-2520.49,117.401,0,''), +(349,87,-9110.18,-2507.01,117.098,0,''), +(349,88,-9119.21,-2498.23,116.627,0,''), +(349,89,-9124.61,-2487.07,115.972,0,''), +(349,90,-9127.42,-2478.53,114.843,0,''), +(349,91,-9133.18,-2465.77,113.029,0,''), +(349,92,-9137.54,-2456.22,111.051,0,''), +(349,93,-9146.73,-2441.6,107.979,0,''), +(349,94,-9155.62,-2430.79,106.251,0,''), +(349,95,-9158.06,-2420.36,104.838,0,''), +(349,96,-9157.25,-2410.2,103.858,0,''), +(349,97,-9152.95,-2401.47,102.679,0,''), +(349,98,-9153.63,-2393.46,100.63,0,''), +(349,99,-9156.48,-2385.68,98.2937,0,''), +(349,100,-9161.01,-2379.87,96.2066,0,''), +(349,101,-9169.08,-2373.14,93.8832,0,''), +(349,102,-9175.61,-2368.72,92.5178,0,''), +(349,103,-9187.1,-2360.52,89.9231,0,''), +(349,104,-9194.27,-2352.89,87.593,0,''), +(349,105,-9201.07,-2344.88,85.8516,0,''), +(349,106,-9205.62,-2339.56,85.0342,0,''), +(349,107,-9212.44,-2331.58,83.8068,0,''), +(349,108,-9219.26,-2323.6,82.29,0,''), +(349,109,-9229.98,-2313.25,79.4506,0,''), +(349,110,-9240.03,-2303.51,76.7841,0,''), +(349,111,-9249.34,-2298.82,74.3911,0,''), +(349,112,-9254.95,-2296.68,72.8144,0,''), +(349,113,-9264.73,-2292.92,70.0089,0,''), +(349,114,-9272.24,-2293.79,68.6096,0,''), +(349,115,-9277.03,-2295.98,68.1135,10000,''); + diff --git a/sql/updates/6877_world_scriptnames.sql b/sql/updates/6877_world_scriptnames.sql new file mode 100644 index 00000000000..6b665d35a57 --- /dev/null +++ b/sql/updates/6877_world_scriptnames.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_corporal_keeshan' WHERE `entry`=349; + diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 39b38dd6dac..89927d39228 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -192,6 +192,7 @@ SET(trinityscript_LIB_SRCS scripts/eastern_kingdoms/ironforge.cpp scripts/eastern_kingdoms/isle_of_queldanas.cpp scripts/eastern_kingdoms/loch_modan.cpp + scripts/eastern_kingdoms/redridge_mountains.cpp scripts/eastern_kingdoms/searing_gorge.cpp scripts/eastern_kingdoms/silvermoon_city.cpp scripts/eastern_kingdoms/silverpine_forest.cpp diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 315d1aa5cda..4a035d03b3b 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -459,6 +459,10 @@ RelativePath="..\scripts\eastern_kingdoms\loch_modan.cpp" > </File> + <File + RelativePath="..\scripts\eastern_kingdoms\redridge_mountains.cpp" + > + </File> <File RelativePath="..\scripts\eastern_kingdoms\searing_gorge.cpp" > diff --git a/src/bindings/scripts/scripts/eastern_kingdoms/redridge_mountains.cpp b/src/bindings/scripts/scripts/eastern_kingdoms/redridge_mountains.cpp new file mode 100644 index 00000000000..8867106d425 --- /dev/null +++ b/src/bindings/scripts/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -0,0 +1,171 @@ +/* Copyright (C) 2008-2010 Trinity <http://www.trinitycore.org/> + * + * 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 + */ + +/* Script Data Start +SDName: Redridge Mountains +SD%Complete: 100% +SDComment: Support for quest 219. +Script Data End */ + +#include "precompiled.h" +#include "escort_ai.h" + +enum eCorporalKeeshan +{ + QUEST_MISSING_IN_ACTION = 219, + + SAY_CORPORAL_1 = -1000464, + SAY_CORPORAL_2 = -1000465, + SAY_CORPORAL_3 = -1000466, + SAY_CORPORAL_4 = -1000467, + SAY_CORPORAL_5 = -1000468, + + SPELL_MOCKING_BLOW = 21008, + SPELL_SHIELD_BASH = 11972, +}; + +struct TRINITY_DLL_DECL npc_corporal_keeshanAI : public npc_escortAI +{ + npc_corporal_keeshanAI(Creature* pCreature) : npc_escortAI(pCreature) {} + + uint32 uiPhase; + uint32 uiTimer; + uint32 uiMockingBlowTimer; + uint32 uiShieldBashTimer; + + void Reset() + { + uiTimer = 0; + uiPhase = 0; + uiMockingBlowTimer = 5000; + uiShieldBashTimer = 8000; + } + + void WaypointReached(uint32 uiI) + { + Player* pPlayer = GetPlayerForEscort(); + + if (!pPlayer) + return; + + if (uiI >= 65 && m_creature->GetUnitMovementFlags() == MOVEMENTFLAG_WALK_MODE) + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + + switch(uiI) + { + case 39: + SetEscortPaused(true); + uiTimer = 2000; + uiPhase = 1; + break; + case 65: + m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); + break; + case 115: + uiTimer = 2000; + uiPhase = 4; + break; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (HasEscortState(STATE_ESCORT_NONE)) + return; + + npc_escortAI::UpdateAI(uiDiff); + + if (uiPhase) + { + if (uiTimer <= uiDiff) + { + switch(uiPhase) + { + case 1: + m_creature->SetStandState(UNIT_STAND_STATE_SIT); + uiTimer = 1000; + uiPhase = 2; + break; + case 2: + DoScriptText(SAY_CORPORAL_2,m_creature); + uiTimer = 15000; + uiPhase = 3; + break; + case 3: + DoScriptText(SAY_CORPORAL_3,m_creature); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + SetEscortPaused(false); + uiTimer = 0; + uiPhase = 0; + break; + case 4: + DoScriptText(SAY_CORPORAL_4, m_creature); + uiTimer = 2500; + uiPhase = 5; + case 5: + DoScriptText(SAY_CORPORAL_5, m_creature); + uiTimer = 0; + uiPhase = 0; + } + } else uiTimer -= uiDiff; + } + + if (!UpdateVictim()) + return; + + if (uiMockingBlowTimer <= uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MOCKING_BLOW); + uiMockingBlowTimer = 5000; + } else uiMockingBlowTimer -= uiDiff; + + if (uiShieldBashTimer <= uiDiff) + { + DoCast(m_creature->getVictim(),SPELL_MOCKING_BLOW); + uiShieldBashTimer = 8000; + } else uiShieldBashTimer -= uiDiff; + + DoMeleeAttackIfReady(); + } +}; + +bool QuestAccept_npc_corporal_keeshan(Player* pPlayer, Creature* pCreature, Quest const *pQuest) +{ + if (pQuest->GetQuestId() == QUEST_MISSING_IN_ACTION) + { + CAST_AI(npc_corporal_keeshanAI,pCreature->AI())->Start(true, false, pPlayer->GetGUID(),pQuest); + DoScriptText(SAY_CORPORAL_1, pCreature); + } + + return false; +} + +CreatureAI* GetAI_npc_corporal_keeshan(Creature* pCreature) +{ + return new npc_corporal_keeshanAI(pCreature); +} + +void AddSC_redridge_mountains() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_corporal_keeshan"; + newscript->GetAI = &GetAI_npc_corporal_keeshan; + newscript->pQuestAccept = &QuestAccept_npc_corporal_keeshan; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/system/ScriptLoader.cpp b/src/bindings/scripts/system/ScriptLoader.cpp index 0981d64aae2..9ae99b6fc24 100644 --- a/src/bindings/scripts/system/ScriptLoader.cpp +++ b/src/bindings/scripts/system/ScriptLoader.cpp @@ -187,6 +187,7 @@ extern void AddSC_hinterlands(); extern void AddSC_ironforge(); extern void AddSC_isle_of_queldanas(); extern void AddSC_loch_modan(); +extern void AddSC_redridge_mountains(); extern void AddSC_searing_gorge(); extern void AddSC_silvermoon_city(); extern void AddSC_silverpine_forest(); @@ -644,6 +645,7 @@ void AddScripts() AddSC_ironforge(); AddSC_isle_of_queldanas(); AddSC_loch_modan(); + AddSC_redridge_mountains(); AddSC_searing_gorge(); AddSC_silvermoon_city(); AddSC_silverpine_forest(); |