diff options
-rw-r--r-- | sql/updates/world/2012_09_13_00_world_spell_script_name.sql | 4 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql (renamed from sql/updates/world/2012_09_13_00_fires_over_skettis.sql) | 12 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_01_world_ogrila.sql (renamed from sql/updates/world/2012_09_13_00_world_ogrila.sql) | 48 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_01_world_spell_script_name.sql | 14 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_02_world_spell_script_name.sql | 4 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_03_world_spell_script_name.sql | 4 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_04_world_spell_script_name.sql | 4 | ||||
-rw-r--r-- | sql/updates/world/2012_09_13_05_world_spell_script_name.sql | 4 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 75 |
9 files changed, 58 insertions, 111 deletions
diff --git a/sql/updates/world/2012_09_13_00_world_spell_script_name.sql b/sql/updates/world/2012_09_13_00_world_spell_script_name.sql deleted file mode 100644 index e987a1a30a0..00000000000 --- a/sql/updates/world/2012_09_13_00_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Knockdown Fel Cannon: Choose Loc -DELETE FROM `spell_script_names` WHERE `spell_id`=40056; -INSERT INTO `spell_script_names` VALUES -(40056,'spell_q11010_q11102_q11023_choose_loc');
\ No newline at end of file diff --git a/sql/updates/world/2012_09_13_00_fires_over_skettis.sql b/sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql index 538cda81fad..de9ba5a78fe 100644 --- a/sql/updates/world/2012_09_13_00_fires_over_skettis.sql +++ b/sql/updates/world/2012_09_13_01_world_fires_over_skettis.sql @@ -1,21 +1,19 @@ -- Add support for quest ID: 11008 - "Fires Over Skettis" based on Warpten fix and Nelegalno/shlomi1515 updates -- Also add support for achievement - http://www.wowhead.com/achievement=1275/bombs-away SET @TRIGGER := 22991; -SET @Script := 2299100; SET @EGG := 185549; SET @SKYBLAST := 39844; SET @SUMMEGG := 39843; -- Adds SAI support for Monstrous Kaliri Egg Trigger and the GO UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@TRIGGER; DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0; -DELETE FROM `smart_scripts` WHERE `entryorguid`=@Script AND `source_type`=9; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER*100 AND `source_type`=9; INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES (@TRIGGER,0,0,0,25,0,100,0,0,0,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On spawn/reset - Summon Monstrous Kaliri Egg (object wild)'), (@TRIGGER,0,1,2,8,0,100,0,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit to invoker party'), (@TRIGGER,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@EGG,1,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Despawn'), -(@TRIGGER,0,3,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Start script 0'), --- Script 0 -(@Script,9,0,0,0,0,100,0,44000,44000,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger /On actionlist/ - Action 0 - Cast Summon Monstrous Kaliri Egg'); +(@TRIGGER,0,3,0,61,0,100,0,0,0,0,0,80,@TRIGGER*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Start script 0'), +(@TRIGGER*100,9,0,0,0,0,100,0,44000,44000,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger /On actionlist/ - Action 0 - Cast Summon Monstrous Kaliri Egg'); -- Add SAI for Cannonball Stack UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@EGG; DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@EGG; @@ -24,7 +22,7 @@ INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type -- Remove achievement from disabled DELETE FROM `disables` WHERE `sourceType`=4 AND `entry`=3922; -- Insert GO spawns taken directly from already spawned triggers coordinates = no need to sniff them -SET @guid := 164249; -- this is taken from clean trinity next free slot at 13.09.2012 +SET @guid := 74685; DELETE FROM `gameobject` WHERE `id`=@EGG; INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`) VALUES (@guid+0,@EGG,530,1,1,-3857.69,3426.25,363.733,-0.087267,180), @@ -90,4 +88,4 @@ INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x` (@guid+60,@EGG,530,1,1,-3884.89,3684.98,374.492,-2.53073,180), (@guid+61,@EGG,530,1,1,-3800.8,3789.62,314,6.0912,180), (@guid+62,@EGG,530,1,1,-3799.02,3788.06,314.158,3.19395,180), -(@guid+63,@EGG,530,1,1,-3798.91,3790.61,313.852,3.63029,180);
\ No newline at end of file +(@guid+63,@EGG,530,1,1,-3798.91,3790.61,313.852,3.63029,180); diff --git a/sql/updates/world/2012_09_13_00_world_ogrila.sql b/sql/updates/world/2012_09_13_01_world_ogrila.sql index 763ade3a894..4ccb02e02e5 100644 --- a/sql/updates/world/2012_09_13_00_world_ogrila.sql +++ b/sql/updates/world/2012_09_13_01_world_ogrila.sql @@ -3,7 +3,6 @@ -- Based on Warpten Script SET @SKYGUARD_BOMB := 32456; SET @Run_Dummy := 23118; -SET @Script := 2311800; SET @Explosion_Bunny := 23119; SET @Flak_Cannon := 23076; SET @Flak_Cannon2 := 23082; @@ -20,15 +19,14 @@ UPDATE `quest_template` SET `RequiredClasses`=1024 WHERE `Id`=11102; UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=`flags_extra`|128 WHERE `entry`=@Run_Dummy; DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@Run_Dummy; DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@Run_Dummy; -DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Script; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid`=@Run_Dummy*100; INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES -(@Run_Dummy,0,0,1,8,0,100,0,@THROW_BOMB,0,1000,1000,33,23118,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Run Target Dummy - On spell Throw Bomb hit - Give kill credit to invoker party'), +(@Run_Dummy,0,0,1,8,0,100,0,@THROW_BOMB,0,1000,1000,33,@Run_Dummy,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Run Target Dummy - On spell Throw Bomb hit - Give kill credit to invoker party'), (@Run_Dummy,0,1,2,61,0,100,0,0,0,0,0,28,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Remove auras from hunter mark'), (@Run_Dummy,0,2,3,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,20,@CANNONBALL_STACK,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Cannonball Stack'), (@Run_Dummy,0,3,4,61,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@Explosion_Bunny,3,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Data set 0 1 on Explosion Bunny'), -(@Run_Dummy,0,4,0,61,0,100,0,0,0,0,0,80,@Script,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Start script 0'), --- Script 0 -(@Script,9,0,0,0,0,100,0,29000,29000,0,0,11,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Action 0 - Cast run mark on self'); +(@Run_Dummy,0,4,0,61,0,100,0,0,0,0,0,80,@Run_Dummy*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Linked with previous event - Start script 0'), +(@Run_Dummy*100,9,0,0,0,0,100,0,29000,29000,0,0,11,@RUN_MARK,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Run Target Dummy - Action 0 - Cast run mark on self'); -- Add SAI for Cannonball Stack UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@CANNONBALL_STACK; DELETE FROM `smart_scripts` WHERE `source_type`=1 AND `entryorguid`=@CANNONBALL_STACK; @@ -92,26 +90,26 @@ DELETE FROM `spell_area` WHERE `spell`=40200; INSERT INTO `spell_area` (`spell`,`area`,`quest_start`,`quest_start_active`,`quest_end`,`aura_spell`,`racemask`,`gender`,`autocast`) VALUES (40200,3522,0,0,0,@See_Invisibility,0,2,1); -- Insert cannonballs spawns /based on sniffs/ -SET @guid := 164235; -- Free slot on trinity clean core marked on 12.09.2012 -DELETE FROM `gameobject` WHERE `guid` IN (@guid+0,@guid+1,@guid+2,@guid+3,@guid+4,@guid+5,@guid+6,@guid+7,@guid+8,@guid+9,@guid+10,@guid+11,@guid+12,@guid+13); +SET @guid := 14811; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @guid+0 AND @guid+13; INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES -(@guid+0,185861,530,1,1,2825.11,7024.05,369.982,5.69617,0,0,0.289313,-0.957235,300,0,1), -(@guid+1,185861,530,1,1,2938.26,7094.72,369.413,2.78314,0,0,0.983982,0.178267,300,0,1), -(@guid+2,185861,530,1,1,2924.84,7031.46,367.857,4.26205,0,0,0.847134,-0.53138,300,0,1), -(@guid+3,185861,530,1,1,2938.02,7015.59,365.75,3.65778,0,0,0.966879,-0.255237,300,0,1), -(@guid+4,185861,530,1,1,2998.57,7043.55,368.539,5.91266,0,0,0.184206,-0.982888,300,0,1), -(@guid+5,185861,530,1,1,2982,7054.94,368.32,4.99766,0,0,0.599411,-0.800442,300,0,1), -(@guid+6,185861,530,1,1,2978.73,6889.19,369.701,0.689745,0,0,0.338077,0.941119,300,0,1), -(@guid+7,185861,530,1,1,2941.56,6827.17,367.3,4.08109,0,0,0.891683,-0.452661,300,0,1), -(@guid+8,185861,530,1,1,2953.55,6859.3,369.954,6.14433,0,0,0.0693712,-0.997591,300,0,1), -(@guid+9,185861,530,1,1,3023.13,6799.74,374.46,1.58666,0,0,0.712695,0.701474,300,0,1), -(@guid+10,185861,530,1,1,3028.3,6824.84,373.591,5.0275,0,0,0.587401,-0.809296,300,0,1), -(@guid+11,185861,530,1,1,3022.15,6859.05,369.546,3.44885,0,0,0.988222,-0.153025,300,0,1), -(@guid+12,185861,530,1,1,3016.28,6876.11,370.188,3.47791,0,0,0.985895,-0.167365,300,0,1), -(@guid+13,185861,530,1,1,2940.6,7106.65,370.123,0.88561,0,0,0.428475,0.903553,300,0,1); +(@guid+0,@CANNONBALL_STACK,530,1,1,2825.11,7024.05,369.982,5.69617,0,0,0.289313,-0.957235,300,0,1), +(@guid+1,@CANNONBALL_STACK,530,1,1,2938.26,7094.72,369.413,2.78314,0,0,0.983982,0.178267,300,0,1), +(@guid+2,@CANNONBALL_STACK,530,1,1,2924.84,7031.46,367.857,4.26205,0,0,0.847134,-0.53138,300,0,1), +(@guid+3,@CANNONBALL_STACK,530,1,1,2938.02,7015.59,365.75,3.65778,0,0,0.966879,-0.255237,300,0,1), +(@guid+4,@CANNONBALL_STACK,530,1,1,2998.57,7043.55,368.539,5.91266,0,0,0.184206,-0.982888,300,0,1), +(@guid+5,@CANNONBALL_STACK,530,1,1,2982,7054.94,368.32,4.99766,0,0,0.599411,-0.800442,300,0,1), +(@guid+6,@CANNONBALL_STACK,530,1,1,2978.73,6889.19,369.701,0.689745,0,0,0.338077,0.941119,300,0,1), +(@guid+7,@CANNONBALL_STACK,530,1,1,2941.56,6827.17,367.3,4.08109,0,0,0.891683,-0.452661,300,0,1), +(@guid+8,@CANNONBALL_STACK,530,1,1,2953.55,6859.3,369.954,6.14433,0,0,0.0693712,-0.997591,300,0,1), +(@guid+9,@CANNONBALL_STACK,530,1,1,3023.13,6799.74,374.46,1.58666,0,0,0.712695,0.701474,300,0,1), +(@guid+10,@CANNONBALL_STACK,530,1,1,3028.3,6824.84,373.591,5.0275,0,0,0.587401,-0.809296,300,0,1), +(@guid+11,@CANNONBALL_STACK,530,1,1,3022.15,6859.05,369.546,3.44885,0,0,0.988222,-0.153025,300,0,1), +(@guid+12,@CANNONBALL_STACK,530,1,1,3016.28,6876.11,370.188,3.47791,0,0,0.985895,-0.167365,300,0,1), +(@guid+13,@CANNONBALL_STACK,530,1,1,2940.6,7106.65,370.123,0.88561,0,0,0.428475,0.903553,300,0,1); -- Insert spawns for Fel Flak Cannons, Run Target Dummies and Explosion Bunnies /based on sniffs/ -SET @guid := 209183; -- Free slot on trinity clean core marked on 12.09.2012 -DELETE FROM `creature` WHERE `guid` IN (@guid+0,@guid+1,@guid+2,@guid+3,@guid+4,@guid+5,@guid+6,@guid+7,@guid+8,@guid+9,@guid+10,@guid+11,@guid+12,@guid+13,@guid+14,@guid+15,@guid+16,@guid+17,@guid+18,@guid+19,@guid+20,@guid+21,@guid+22,@guid+23,@guid+24,@guid+25,@guid+26,@guid+27,@guid+28,@guid+29,@guid+30,@guid+31,@guid+32,@guid+33,@guid+34,@guid+35,@guid+36,@guid+37,@guid+38,@guid+39,@guid+40,@guid+41,@guid+42,@guid+43,@guid+44); +SET @guid := 85656; +DELETE FROM `creature` WHERE `guid` BETWEEN @guid+0 AND @guid+44; INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`,`npcflag`,`unit_flags`,`dynamicflags`) VALUES (@guid+0,23118,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,42,0,0,0,33554432,0), (@guid+1,23119,530,1,1,0,0,2764.71,7024.45,370.203,0,300,0,0,6986,0,0,0,33554432,0), @@ -157,4 +155,4 @@ INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equ (@guid+41,23076,530,1,1,0,0,3022.21,6864.61,369.93,0.100696,300,0,0,22140,0,0,0,0,0), (@guid+42,23118,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,42,0,0,0,33554432,0), (@guid+43,23119,530,1,1,0,0,3016.28,6876.11,370.188,3.47791,300,0,0,6986,0,0,0,33554432,0), -(@guid+44,23076,530,1,1,0,0,2816.74,7057.61,369.779,1.4555,300,0,0,21543,0,0,0,0,0);
\ No newline at end of file +(@guid+44,23076,530,1,1,0,0,2816.74,7057.61,369.779,1.4555,300,0,0,21543,0,0,0,0,0); diff --git a/sql/updates/world/2012_09_13_01_world_spell_script_name.sql b/sql/updates/world/2012_09_13_01_world_spell_script_name.sql index 0a6074716a6..61e4067c544 100644 --- a/sql/updates/world/2012_09_13_01_world_spell_script_name.sql +++ b/sql/updates/world/2012_09_13_01_world_spell_script_name.sql @@ -1,4 +1,14 @@ --- Add spell script name for Knockdown Fel Cannon: The Aggro Check +-- Add spell script name for Fires Over Skettis and Bombing Run quests +DELETE FROM `spell_script_names` WHERE `spell_id`=40113; +DELETE FROM `spell_script_names` WHERE `spell_id`=40160; +DELETE FROM `spell_script_names` WHERE `spell_id`=39844; +DELETE FROM `spell_script_names` WHERE `spell_id`=40056; DELETE FROM `spell_script_names` WHERE `spell_id`=40112; +DELETE FROM `spell_script_names` WHERE `spell_id`=40119; INSERT INTO `spell_script_names` VALUES -(40112,'spell_q11010_q11102_q11023_aggro_check');
\ No newline at end of file +(39844,'spell_q11010_q11102_q11023_q11008_check_fly_mount'), +(40160,'spell_q11010_q11102_q11023_q11008_check_fly_mount'), +(40113,'spell_q11010_q11102_q11023_aggro_check_aura'), +(40056,'spell_q11010_q11102_q11023_choose_loc'), +(40112,'spell_q11010_q11102_q11023_aggro_check'), +(40119,'spell_q11010_q11102_q11023_aggro_burst'); diff --git a/sql/updates/world/2012_09_13_02_world_spell_script_name.sql b/sql/updates/world/2012_09_13_02_world_spell_script_name.sql deleted file mode 100644 index a9ac55b8ac4..00000000000 --- a/sql/updates/world/2012_09_13_02_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Knockdown Fel Cannon: The Aggro Burst -DELETE FROM `spell_script_names` WHERE `spell_id`=40119; -INSERT INTO `spell_script_names` VALUES -(40119,'spell_q11010_q11102_q11023_aggro_burst');
\ No newline at end of file diff --git a/sql/updates/world/2012_09_13_03_world_spell_script_name.sql b/sql/updates/world/2012_09_13_03_world_spell_script_name.sql deleted file mode 100644 index ea55a199f4c..00000000000 --- a/sql/updates/world/2012_09_13_03_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Knockdown Fel Cannon: The Aggro Check Aura -DELETE FROM `spell_script_names` WHERE `spell_id`=40113; -INSERT INTO `spell_script_names` VALUES -(40113,'spell_q11010_q11102_q11023_aggro_check_aura');
\ No newline at end of file diff --git a/sql/updates/world/2012_09_13_04_world_spell_script_name.sql b/sql/updates/world/2012_09_13_04_world_spell_script_name.sql deleted file mode 100644 index 0a0cf3f610b..00000000000 --- a/sql/updates/world/2012_09_13_04_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Trhow Bomb -DELETE FROM `spell_script_names` WHERE `spell_id`=40160; -INSERT INTO `spell_script_names` VALUES -(40160,'spell_q11010_q11102_q11023_throw_bomb');
\ No newline at end of file diff --git a/sql/updates/world/2012_09_13_05_world_spell_script_name.sql b/sql/updates/world/2012_09_13_05_world_spell_script_name.sql deleted file mode 100644 index 1d2d73eccdd..00000000000 --- a/sql/updates/world/2012_09_13_05_world_spell_script_name.sql +++ /dev/null @@ -1,4 +0,0 @@ --- Add spell script name for Skyguard Blasting Charge -DELETE FROM `spell_script_names` WHERE `spell_id`=39844; -INSERT INTO `spell_script_names` VALUES -(39844,'spell_q11008_blasting_charge');
\ No newline at end of file diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 1ab1cd05771..76fe756f79e 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1315,15 +1315,15 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad } }; -// http://www.wowhead.com/quest=11010 "Bombing Run", http://www.wowhead.com/quest=11102 "Bombing Run" /druid/ and http://www.wowhead.com/quest=11023 "Bomb Them Again!" +// "Bombing Run" and "Bomb Them Again!" enum Quest11010_11102_11023Data { // Spell - SPELL_FLAK_CANNON_TRIGGER = 40110, - SPELL_CHOOSE_LOC = 40056, - SPELL_AGGRO_CHECK = 40112, + SPELL_FLAK_CANNON_TRIGGER = 40110, + SPELL_CHOOSE_LOC = 40056, + SPELL_AGGRO_CHECK = 40112, // NPCs - NPC_FEL_CANNON2 = 23082 + NPC_FEL_CANNON2 = 23082 }; // 40113 Knockdown Fel Cannon: The Aggro Check Aura @@ -1339,10 +1339,8 @@ class spell_q11010_q11102_q11023_aggro_check_aura : public SpellScriptLoader void HandleTriggerSpell(AuraEffect const* /*aurEff*/) { if (Unit* target = GetTarget()) - { // On trigger proccing target->CastSpell(target, SPELL_AGGRO_CHECK); - } } void Register() @@ -1372,9 +1370,7 @@ class spell_q11010_q11102_q11023_aggro_check : public SpellScriptLoader if (Player* playerTarget = GetHitPlayer()) // Check if found player target is on fly mount or using flying form if (playerTarget->HasAuraType(SPELL_AURA_FLY) || playerTarget->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) - { playerTarget->CastSpell(playerTarget, SPELL_FLAK_CANNON_TRIGGER, TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE); - } } void Register() @@ -1402,10 +1398,8 @@ class spell_q11010_q11102_q11023_aggro_burst : public SpellScriptLoader void HandleEffectPeriodic(AuraEffect const* /*aurEff*/) { if (Unit* target = GetTarget()) - { // On each tick cast Choose Loc to trigger summon target->CastSpell(target, SPELL_CHOOSE_LOC); - } } void Register() @@ -1434,17 +1428,15 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader { Unit* caster = GetCaster(); // Check for player that is in 65 y range - std::list<Player*> PlayerList; + std::list<Player*> playerList; Trinity::AnyPlayerInObjectRangeCheck checker(caster, 765.0f); - Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, PlayerList, checker); + Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(caster, playerList, checker); caster->VisitNearbyWorldObject(65.0f, searcher); - for (std::list<Player*>::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr) + for (std::list<Player*>::const_iterator itr = playerList.begin(); itr != playerList.end(); ++itr) // Check if found player target is on fly mount or using flying form if ((*itr)->HasAuraType(SPELL_AURA_FLY) || (*itr)->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED)) - { // Summom Fel Cannon (bunny version) at found player caster->SummonCreature(NPC_FEL_CANNON2, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ()); - } } void Register() @@ -1459,51 +1451,21 @@ class spell_q11010_q11102_q11023_choose_loc : public SpellScriptLoader } }; -class spell_q11010_q11102_q11023_throw_bomb : public SpellScriptLoader -{ - public: - spell_q11010_q11102_q11023_throw_bomb() : SpellScriptLoader("spell_q11010_q11102_q11023_throw_bomb") { } - - class spell_q11010_q11102_q11023_throw_bomb_SpellScript : public SpellScript - { - PrepareSpellScript(spell_q11010_q11102_q11023_throw_bomb_SpellScript); - - SpellCastResult CheckRequirement() - { - Unit* caster = GetCaster(); - // This spell will be casted only if caster has one of these auras - if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) - return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; - return SPELL_CAST_OK; - } - - void Register() - { - OnCheckCast += SpellCheckCastFn(spell_q11010_q11102_q11023_throw_bomb_SpellScript::CheckRequirement); - } - }; - - SpellScript* GetSpellScript() const - { - return new spell_q11010_q11102_q11023_throw_bomb_SpellScript(); - } -}; - -// http://www.wowhead.com/quest=11008 "Fires Over Skettis" // 39844 - Skyguard Blasting Charge -class spell_q11008_blasting_charge : public SpellScriptLoader +// 40160 - Throw Bomb +class spell_q11010_q11102_q11023_q11008_check_fly_mount : public SpellScriptLoader { public: - spell_q11008_blasting_charge() : SpellScriptLoader("spell_q11008_blasting_charge") { } + spell_q11010_q11102_q11023_q11008_check_fly_mount() : SpellScriptLoader("spell_q11010_q11102_q11023_q11008_check_fly_mount") { } - class spell_q11008_blasting_charge_SpellScript : public SpellScript + class spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript : public SpellScript { - PrepareSpellScript(spell_q11008_blasting_charge_SpellScript); + PrepareSpellScript(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript); SpellCastResult CheckRequirement() { Unit* caster = GetCaster(); - // This spell will be casted only if caster has one of these auras + // This spell will be cast only if caster has one of these auras if (!(caster->HasAuraType(SPELL_AURA_FLY) || caster->HasAuraType(SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED))) return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW; return SPELL_CAST_OK; @@ -1511,13 +1473,13 @@ class spell_q11008_blasting_charge : public SpellScriptLoader void Register() { - OnCheckCast += SpellCheckCastFn(spell_q11008_blasting_charge_SpellScript::CheckRequirement); + OnCheckCast += SpellCheckCastFn(spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript::CheckRequirement); } }; SpellScript* GetSpellScript() const { - return new spell_q11008_blasting_charge_SpellScript(); + return new spell_q11010_q11102_q11023_q11008_check_fly_mount_SpellScript(); } }; @@ -1556,6 +1518,5 @@ void AddSC_quest_spell_scripts() new spell_q11010_q11102_q11023_aggro_check(); new spell_q11010_q11102_q11023_aggro_burst(); new spell_q11010_q11102_q11023_choose_loc(); - new spell_q11010_q11102_q11023_throw_bomb(); - new spell_q11008_blasting_charge(); -}
\ No newline at end of file + new spell_q11010_q11102_q11023_q11008_check_fly_mount(); +} |