diff options
| -rw-r--r-- | sql/updates/world/2013_08_28_06_world_sai.sql | 35 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_28_07_world_sai.sql | 16 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_28_08_world_update.sql | 4 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_29_00_world_sai.sql | 181 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_29_01_world_update.sql | 1 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_29_02_world_sai.sql | 21 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_29_03_world_quest_template.sql | 4 | ||||
| -rw-r--r-- | sql/updates/world/2013_08_29_04_world_db_errors.sql | 122 | ||||
| -rw-r--r-- | src/server/game/AI/SmartScripts/SmartAI.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Entities/Player/Player.cpp | 12 | ||||
| -rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 64 | ||||
| -rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 39 | ||||
| -rw-r--r-- | src/server/game/Quests/QuestDef.h | 1 | ||||
| -rw-r--r-- | src/server/scripts/Commands/cs_quest.cpp | 7 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_quest.cpp | 161 |
15 files changed, 575 insertions, 95 deletions
diff --git a/sql/updates/world/2013_08_28_06_world_sai.sql b/sql/updates/world/2013_08_28_06_world_sai.sql new file mode 100644 index 00000000000..7cb970fa485 --- /dev/null +++ b/sql/updates/world/2013_08_28_06_world_sai.sql @@ -0,0 +1,35 @@ +-- Fuel for the Fire (12690) +-- http://www.youtube.com/watch?v=3rC1yU1ytl8 +SET @CREDIT :=52590; -- Credit to Master +SET @CREDIT_MASTER :=52587; -- Assign Kill Credit to Master +SET @TEXPLOSION :=52565; -- Troll Explosion +SET @FFTF_EXPL :=52575; -- Fuel for the Fire:Troll Explosion +SET @MEAT_EXPL :=52578; -- Explode Troll:Meat +SET @BMEAT_EXPL :=52580; -- Explode Troll:Bloody Meat +SET @SUICIDE_NL :=51744; -- Suicide (No Log) +SET @DSC :=28844; -- Drakkari Skullcrusher +SET @B_ABOM :=28843; -- Bloated Abomination + +DELETE FROM `spell_script_names` WHERE `spell_id`=52510; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(52510, 'spell_q12690_burst_at_the_seams'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@B_ABOM; +DELETE FROM `smart_scripts` WHERE entryorguid =@B_ABOM; + +DELETE FROM `conditions` WHERE `SourceEntry`IN (52510); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 2, 52510, 0, 0, 31, 0, 3, 28844, 0, 0, 0, 0, '', 'Spell Burst at the Seams targets Drakkari Skullcrusher'); + +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@DSC; +DELETE FROM `smart_scripts` WHERE `source_type`IN (0,9) AND `entryorguid`IN (@DSC,@DSC*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 +(@DSC,0,0,0,8,0,100,0,52510,0,0,0,80,@DSC*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Spellhit - Start Timed Action Script'), +(@DSC*100,9,0,0,0,0,100,0,0,0,0,0,11,@TEXPLOSION,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Script - Cast Troll Explosion'), +(@DSC*100,9,1,0,0,0,100,0,0,0,0,0,11,@MEAT_EXPL,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Script - Cast Meat Explosion'), +(@DSC*100,9,2,0,0,0,100,0,0,0,0,0,11,@SUICIDE_NL,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakkari Skullcrusher - On Script - Cast Suicide'); + +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`IN (@TEXPLOSION,@MEAT_EXPL); +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(@TEXPLOSION,@FFTF_EXPL,1,'Trigger Troll Explosion with FFTF explosion'), +(@MEAT_EXPL,@BMEAT_EXPL,1,'Trigger Meat Explosion with Bloody Meat Explosion'); diff --git a/sql/updates/world/2013_08_28_07_world_sai.sql b/sql/updates/world/2013_08_28_07_world_sai.sql new file mode 100644 index 00000000000..73a123c22e2 --- /dev/null +++ b/sql/updates/world/2013_08_28_07_world_sai.sql @@ -0,0 +1,16 @@ +SET @MATT2 := 32404; -- Matthias Lehner +SET @PLSP_FC := 58989; -- Prodigal Leader Force Cast +SET @L_CAPTAIN := 32414; -- Lordaeron Captain +SET @L_FOOTSOLDIER := 31254; -- Lordaeron Footsoldier + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@MATT2 AND `source_type`=0; +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 +(@MATT2,0,0,0,19,0,100,0,13395,0,0,0,11,@PLSP_FC,0,0,0,0,0,7,0,0,0,0,0,0,0,'On Quest accept - Cast spell - Cast Invoker'), +(@MATT2,0,1,0,19,0,100,0,13236,0,0,0,11,@PLSP_FC,0,0,0,0,0,7,0,0,0,0,0,0,0,'On Quest accept - Cast spell - Cast Invoker'), +(@MATT2,0,2,3,62,0,100,0,10226,0,0,0,11,@PLSP_FC,0,0,0,0,0,7,0,0,0,0,0,0,0,'On Gossip Select - Cast spell - Cast Invoker'), +(@MATT2,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'On Gossip Select - Close Gossip - Invoker'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=10226; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,10226,0,0,0,9,0,13395,0,0,0,0,0,'','Show Gossip Menu Option only when quest is active'), +(15,10226,0,0,1,9,0,13236,0,0,0,0,0,'','Show Gossip Menu Option only when quest is active'); diff --git a/sql/updates/world/2013_08_28_08_world_update.sql b/sql/updates/world/2013_08_28_08_world_update.sql new file mode 100644 index 00000000000..e929583ae76 --- /dev/null +++ b/sql/updates/world/2013_08_28_08_world_update.sql @@ -0,0 +1,4 @@ +UPDATE `quest_template` SET `requiredspellcast1`=0 WHERE `id` IN (10545,10512); + + + diff --git a/sql/updates/world/2013_08_29_00_world_sai.sql b/sql/updates/world/2013_08_29_00_world_sai.sql new file mode 100644 index 00000000000..bf2d983d967 --- /dev/null +++ b/sql/updates/world/2013_08_29_00_world_sai.sql @@ -0,0 +1,181 @@ +-- Escape from Silverbrook +SET @ENTRY := 27499; -- Caged Prisoner +SET @PRISONER := 27411; -- Freed Alliance Scout +SET @HORSE := 27409; -- The Qorse (Reference to Machiavelli) +SET @SUMM_HORSE := 48651; -- Summon Ducal's Horse +SET @SUMM_WORG := 48681; -- Summon Worgen +SET @WORG := 27417; -- Silverbrook Worgen + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (48682,48681); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(48682, 'spell_q12308_escape_from_silverbrook'), +(48681, 'spell_q12308_escape_from_silverbrook_summon_worgen'); + +UPDATE `creature_template` SET AIName='SmartAI' WHERE `entry` IN (@ENTRY,@PRISONER,@HORSE,@WORG); +DELETE FROM `smart_scripts` WHERE `entryorguid`IN (@ENTRY,@PRISONER,@PRISONER*100,@HORSE,@HORSE*100,@WORG) AND `source_type`IN (0,9); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (@ENTRY,@PRISONER,@HORSE,@WORG); +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 +(@ENTRY,0,0,1,19,0,100,0,12308,0,0,0,11,48710,0,0,0,0,0,19,24042,10,0,0,0,0,0,'Caged Prisoner - on quest accepted - Summon Freed Alliance Scout'), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,9,0,0,0,0,0,0,15,188706,10,0,0,0,0,0,'Caged Prisoner - On Link - Activate Cage'), +(@ENTRY,0,2,0,61,0,100,0,0,0,0,0,41,500,0,0,0,0,0,1,0,0,0,0,0,0,0,'Caged Prisoner - On quest accepted - Summon Freed Alliance Scout'), +-- +(@PRISONER,0,0,0,54,0,100,0,0,0,0,0,80,@PRISONER*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Respawn - Start Timed Action Script'), +(@PRISONER,0,1,2,40,0,100,1,6,0,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On WP Reached - Say 3'), +(@PRISONER,0,2,3,61,0,100,0,0,0,0,0,11,@SUMM_HORSE,0,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Link - Summon Horse'), +(@PRISONER,0,3,0,61,0,100,0,0,0,0,0,11,46598,0,0,0,0,0,19,@HORSE,10,0,0,0,0,0,'Freed Alliance Scout - On Link - Mount Horse'), +(@PRISONER,0,4,0,38,0,100,0,1,1,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Link - Say'), +-- +(@PRISONER*100,9,0,0,0,0,100,0,3000,3000,3000,3000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Script - Say 0'), +(@PRISONER*100,9,1,0,0,0,100,0,5000,5000,5000,5000,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Script - Say 1'), +(@PRISONER*100,9,2,0,0,0,100,0,4000,4000,4000,4000,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Script - Say 2'), +(@PRISONER*100,9,3,0,0,0,100,0,9000,9000,9000,9000,53,1,@PRISONER,0,0,0,0,1,0,0,0,0,0,0,0,'Freed Alliance Scout - On Script - Start WP movement'), +-- +(@HORSE,0,0,1,27,0,100,0,0,0,0,0,80,@HORSE*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ducal''s Horse - On Passanger Boarded - Start Timed Action Script'), +(@HORSE,0,1,0,61,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ducal''s Horse - On Link - Allow Combat Movement'), +(@HORSE,0,2,5,40,0,100,0,102,0,0,0,11,48678,0,0,0,0,0,21,10,0,0,0,0,0,0,'Ducal''s Horse - On WP Reached - Dismount Player'), +(@HORSE,0,3,0,40,0,100,0,36,0,0,0,97,25,10,0,0,0,0,1,0,0,0,4063.238525,-2261.991211,215.988922,0,'Ducal''s Horse - On WP Reached - Jump to PoS'), +(@HORSE,0,4,0,40,0,100,0,74,0,0,0,97,25,10,0,0,0,0,1,0,0,0,3900.396484,-2743.329346, 219.152481,0,'Ducal''s Horse - On WP Reached - Jump to PoS'), +(@HORSE,0,5,6,61,0,100,0,0,0,0,0,33,28019,0,0,0,0,0,21,10,0,0,0,0,0,0,'Ducal''s Horse - On WP Reached - Give Credit'), +(@HORSE,0,6,0,61,0,100,0,0,0,0,0,41,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Ducal''s Horse - On WP Reached - Despawn'), +-- 48678 +(@HORSE*100,9,0,0,0,0,100,0,5000,5000,5000,5000,53,1,@HORSE,0,12308,0,0,1,0,0,0,0,0,0,0,'Ducal''s Horse - Script - Start WP Movement'), +(@HORSE*100,9,1,0,0,0,100,0,1000,1000,1000,1000,45,1,1,0,0,0,0,19,@PRISONER,10,0,0,0,0,0,'Ducal''s Horse - Script - Start WP Movement'), +(@HORSE*100,9,2,0,0,0,100,0,0,0,0,0,11,48683,2,0,0,0,0,1,0,0,0,0,0,0,0,'Ducal''s Horse - Script - Cast On self'), +-- +(@WORG,0,0,0,54,0,100,0,9,0,0,0,49,0,0,0,0,0,0,19,@HORSE,60,0,0,0,0,0,'Silverbrook Worgen - On Spawn - Attack Horse'), +(@WORG,0,1,0,4,0,100,0,9,0,0,0,11,36589,0,0,0,0,0,1,0,0,0,0,0,0,0,'Silverbrook Worgen - On Aggro - Cast Dash'); + +DELETE FROM `creature_text` WHERE entry = 27411; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(27411, 0, 0, 'Were you bitten?', 12, 0, 100, 6, 0, 0, 'Freed Alliance Scout Say1'), +(27411, 1, 1, 'Answer me! Were you bloody bitten?', 14, 0, 100, 22, 0, 0, 'Freed Alliance Scout Yell'), +(27411, 2, 2, 'You don''t even know, do you? The trappers? They''re not human... we have to get out of here! Come, quick!', 12, 0, 100, 0, 0, 0, 'Freed Alliance Scout Say2'), +(27411, 3, 3, 'Take Ducal''s horse, he''s one of them now!', 12, 0, 100, 0, 0, 0, 'Freed Alliance Scout Say3'), +(27411, 4, 4, 'There''s lamp oil in the back - make use of it. The fiends hate fire!', 12, 0, 100, 0, 0, 0, 'Freed Alliance Scout Say4'); + +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`= 27409; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(27409, 48678, 1, 0); -- Mount Ducal's Horse (for player) + +UPDATE `creature_template` SET `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `dynamicflags`=0 WHERE `entry`=27499; -- Caged Prisoner +UPDATE `creature_template` SET `VehicleId` = 51, `IconName`= 'vehichleCursor', `npcflag` =16777216, `unit_flags`=0, `spell1` = 48677, `spell2` = 48768, `spell3` = 48783 WHERE `entry` = 27409; +UPDATE `creature_template` SET `faction_A`=1891,`faction_H`=1891,`baseattacktime`=1500,`unit_flags`=768 WHERE `entry`=27411; +UPDATE `creature_template` SET `faction_A` = 16, `faction_H` = 16 WHERE entry = 27417; + +-- Ducal's Horse waypoints +DELETE FROM `waypoints` WHERE entry = 27409; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(27409, 0, 4431.638672, -2481.546143, 245.497971, ''), +(27409, 1, 4449.238281, -2471.332031, 242.360382, ''), +(27409, 2, 4461.925293, -2462.848145, 239.519882, ''), +(27409, 3, 4462.994141, -2448.238037, 237.881256, ''), +(27409, 4, 4479.575684, -2434.093506, 235.040390, ''), +(27409, 5, 4488.495605, -2420.688477, 233.043091, ''), +(27409, 6, 4494.654785, -2414.143066, 230.241013, ''), +(27409, 7, 4499.730469, -2414.861572, 230.952850, ''), +(27409, 8, 4510.846191, -2401.806641, 226.618698, ''), +(27409, 9, 4517.005371, -2388.016357, 220.151077, ''), +(27409, 10, 4520.017578, -2373.915283, 213.041779, ''), +(27409, 11, 4524.577637, -2355.400391, 202.208481, ''), +(27409, 12, 4520.500977, -2332.202148, 190.853638, ''), +(27409, 13, 4509.677734, -2314.525635, 182.408096, ''), +(27409, 14, 4488.281250, -2309.130127, 184.351913, ''), +(27409, 15, 4480.724609, -2311.419434, 185.420715, ''), +(27409, 16, 4470.293457, -2314.579346, 183.929382, ''), +(27409, 17, 4453.349121, -2318.290771, 189.487000, ''), +(27409, 18, 4442.953613, -2311.859375, 192.656219, ''), +(27409, 19, 4414.564941, -2297.739258, 191.105362, ''), +(27409, 20, 4396.023438, -2286.889648, 192.638016, ''), +(27409, 21, 4383.112305, -2278.546631, 188.321487, ''), +(27409, 22, 4369.118652, -2256.089844, 187.592911, ''), +(27409, 23, 4339.653320, -2250.217529, 188.636993, ''), +(27409, 24, 4299.784180, -2260.091309, 205.303589, ''), +(27409, 25, 4292.068848, -2261.806885, 209.099808, ''), +(27409, 26, 4258.068359, -2270.728027, 212.053543, ''), +(27409, 27, 4224.148926, -2276.497559, 214.878052, ''), +(27409, 28, 4210.618652, -2280.829346, 214.910553, ''), +(27409, 29, 4193.759766, -2285.936035, 219.885529, ''), +(27409, 30, 4168.561523, -2272.436279, 221.375009, ''), +(27409, 31, 4151.019531, -2269.352783, 223.433472, ''), +(27409, 32, 4131.847168, -2271.157715, 221.920700, ''), +(27409, 33, 4112.480469, -2276.041748, 219.916550, ''), +(27409, 34, 4103.597656, -2274.198730, 219.276031, ''), +(27409, 35, 4093.837158, -2276.393066, 219.042526, ''), +(27409, 36, 4084.734375, -2272.286133, 217.870331, ''), -- Jump PoS +(27409, 37, 4063.238525, -2261.991211, 215.988922, ''), -- Jump continuation +(27409, 38, 4059.935547, -2260.473145, 216.993256, ''), +(27409, 39, 4028.185791, -2252.874512, 218.258530, ''), +(27409, 40, 4020.977539, -2249.354004, 217.129837, ''), +(27409, 41, 4005.426025, -2256.105957, 218.451675, ''), +(27409, 42, 3988.108398, -2262.058350, 217.109756, ''), +(27409, 43, 3968.364014, -2267.235840, 215.268341, ''), +(27409, 44, 3953.139893, -2268.633057, 212.391113, ''), +(27409, 45, 3935.732422, -2276.518066, 209.669937, ''), +(27409, 46, 3922.170898, -2282.024414, 211.200699, ''), +(27409, 47, 3913.766846, -2300.279541, 209.620239, ''), +(27409, 48, 3914.160156, -2317.614990, 208.949615, ''), +(27409, 49, 3911.533936, -2330.580078, 207.751999, ''), +(27409, 50, 3907.095947, -2346.107422, 204.630707, ''), +(27409, 51, 3901.425537, -2362.481201, 206.197708, ''), +(27409, 52, 3885.374756, -2368.482178, 202.270737, ''), +(27409, 53, 3871.682617, -2371.436035, 196.694305, ''), +(27409, 54, 3858.806396, -2374.236816, 194.038589, ''), +(27409, 55, 3833.323975, -2390.121582, 187.584473, ''), +(27409, 56, 3818.713379, -2403.767090, 183.718597, ''), +(27409, 57, 3812.403564, -2425.267334, 185.086273, ''), +(27409, 58, 3812.611328, -2432.785400, 186.023727, ''), +(27409, 59, 3812.221680, -2453.928711, 188.508041, ''), +(27409, 60, 3815.669189, -2479.355957, 192.388458, ''), +(27409, 61, 3819.468262, -2503.677002, 195.024658, ''), +(27409, 62, 3822.264648, -2517.937256, 194.068130, ''), +(27409, 63, 3825.485107, -2534.361572, 196.379684, ''), +(27409, 64, 3829.201660, -2554.680664, 196.714203, ''), +(27409, 65, 3836.672119, -2578.528076, 196.706253, ''), +(27409, 66, 3847.536133, -2609.345459, 200.060410, ''), +(27409, 67, 3861.525879, -2624.756592, 202.314850, ''), +(27409, 68, 3882.063232, -2655.939209, 203.425415, ''), +(27409, 69, 3886.698975, -2663.550293, 208.091705, ''), +(27409, 70, 3900.575928, -2672.409912, 212.662750, ''), +(27409, 71, 3909.817383, -2687.583008, 217.098572, ''), +(27409, 72, 3911.782959, -2695.853027, 220.364487, ''), +(27409, 73, 3916.008301, -2703.185791, 221.175446, ''), +(27409, 74, 3912.544678, -2712.180420, 221.059509, ''), -- Jump location +(27409, 75, 3900.396484, -2743.329346, 219.152481, ''), -- Jump continue +(27409, 76, 3889.821777, -2751.587646, 221.798737, ''), +(27409, 77, 3883.421875, -2756.963379, 223.885544, ''), +(27409, 78, 3851.103027, -2769.906494, 227.460480, ''), +(27409, 79, 3837.903076, -2769.537842, 226.115402, ''), +(27409, 80, 3813.292725, -2770.593018, 220.927460, ''), +(27409, 81, 3801.162109, -2771.017578, 219.535080, ''), +(27409, 82, 3780.501709, -2772.391602, 213.905884, ''), +(27409, 83, 3767.551025, -2775.388672, 211.281708, ''), +(27409, 84, 3759.778320, -2782.290771, 209.165924, ''), +(27409, 85, 3752.759277, -2787.596436, 206.495926, ''), +(27409, 86, 3729.982422, -2803.813721, 210.023056, ''), +(27409, 87, 3723.949951, -2808.085693, 211.655594, ''), +(27409, 88, 3705.986328, -2819.675537, 215.066315, ''), +(27409, 89, 3685.556152, -2832.987549, 217.602127, ''), +(27409, 90, 3674.411377, -2843.797852, 217.875214, ''), +(27409, 91, 3662.455811, -2853.292480, 216.581512, ''), +(27409, 92, 3647.392822, -2857.280518, 213.150558, ''), +(27409, 93, 3630.625977, -2860.268555, 214.962250, ''), +(27409, 94, 3610.744141, -2858.618164, 208.903931, ''), +(27409, 95, 3587.919189, -2854.562500, 203.447754, ''), +(27409, 96, 3562.793213, -2842.607666, 197.044495, ''), +(27409, 97, 3534.265625, -2828.214600, 197.154617, ''), +(27409, 98, 3515.692871, -2829.376709, 201.276230, ''), +(27409, 99, 3487.658691, -2829.192871, 202.143524, ''), +(27409, 100, 3472.460693, -2821.599365, 201.429428, ''), +(27409, 101, 3460.582031, -2817.212402, 201.804962, ''), +(27409, 102, 3443.644531, -2811.332520, 202.097687, ''); + +-- Freed Alliance Scout waypoints +DELETE FROM `waypoints` WHERE entry = 27411; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(27411, 0, 4394.648438, -2502.304688, 252.802429, ''), +(27411, 1, 4389.777832, -2502.323242, 252.251602, ''), +(27411, 2, 4382.442383, -2501.507080, 246.809448, ''), +(27411, 3, 4381.006836, -2497.183838, 247.235260, ''), +(27411, 4, 4393.843750, -2484.841553, 248.717392, ''), +(27411, 5, 4416.043457, -2481.504150, 247.175400, ''), +(27411, 6, 4425.312500, -2486.656006, 246.555176, ''); diff --git a/sql/updates/world/2013_08_29_01_world_update.sql b/sql/updates/world/2013_08_29_01_world_update.sql new file mode 100644 index 00000000000..4017c4a0454 --- /dev/null +++ b/sql/updates/world/2013_08_29_01_world_update.sql @@ -0,0 +1 @@ +UPDATE `conditions` SET `NegativeCondition`=0 WHERE `SourceTypeOrReferenceId`=1 AND `SourceGroup` IN (36597,39166,39167,39168) AND `SourceEntry`=51315 AND `ConditionTypeOrReference`=3; diff --git a/sql/updates/world/2013_08_29_02_world_sai.sql b/sql/updates/world/2013_08_29_02_world_sai.sql new file mode 100644 index 00000000000..b44264bc6e6 --- /dev/null +++ b/sql/updates/world/2013_08_29_02_world_sai.sql @@ -0,0 +1,21 @@ +-- Suppression (7583) +SET @NPC_DEMON := 12396; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@NPC_DEMON; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@NPC_DEMON; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_DEMON); +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 +(@NPC_DEMON,0,0,0,0,0,100,0,5000,8000,18000,24000,11,16005,0,0,0,0,0,2,0,0,0,0,0,0,0,'Doomguard Commander - Cast Rain of Fire'), +(@NPC_DEMON,0,1,0,0,0,100,0,12000,15000,20000,25000,11,16727,0,0,0,0,0,2,0,0,0,0,0,0,0,'Doomguard Commander - Cast War Stomp'), +(@NPC_DEMON,0,2,0,0,0,100,0,2000,4000,25000,32000,11,20812,0,0,0,0,0,2,0,0,0,0,0,0,0,'Doomguard Commander - Cast Cripple'), +(@NPC_DEMON,0,3,0,0,0,100,0,7000,14000,17000,22000,11,15090,0,0,0,0,0,2,0,0,0,0,0,0,0,'Doomguard Commander - Cast Dispel Magic'), +-- +(@NPC_DEMON,0,4,5,8,0,100,0,23019,0,0,0,56,18605,1,0,0,0,0,18,20,0,0,0,0,0,0,'Doomguard Commander - On spellhit - Add item Imprisoned Doomguard'), +(@NPC_DEMON,0,5,6,61,0,100,0,0,0,0,0,11,23020,0,0,0,0,0,1,0,0,0,0,0,0,0,'Doomguard Commander - On spellhit - Cast Crystal Imprisonment'), +(@NPC_DEMON,0,6,0,61,0,100,0,0,0,0,0,41,2000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Doomguard Commander - On spellhit - Despawn'); + +-- Conditions for Glowing Crystal Prison +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=23015; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,23015,0,0,31,1,3,12396,0,0,173,0,'','Glowing Crystal Prison target limit to Doomguard Commander'); diff --git a/sql/updates/world/2013_08_29_03_world_quest_template.sql b/sql/updates/world/2013_08_29_03_world_quest_template.sql new file mode 100644 index 00000000000..a93e111b590 --- /dev/null +++ b/sql/updates/world/2013_08_29_03_world_quest_template.sql @@ -0,0 +1,4 @@ +ALTER TABLE `quest_template` DROP `RequiredSpellCast1`; +ALTER TABLE `quest_template` DROP `RequiredSpellCast2`; +ALTER TABLE `quest_template` DROP `RequiredSpellCast3`; +ALTER TABLE `quest_template` DROP `RequiredSpellCast4`; diff --git a/sql/updates/world/2013_08_29_04_world_db_errors.sql b/sql/updates/world/2013_08_29_04_world_db_errors.sql new file mode 100644 index 00000000000..4fd7d03acb9 --- /dev/null +++ b/sql/updates/world/2013_08_29_04_world_db_errors.sql @@ -0,0 +1,122 @@ +-- Update sai to correlate with the pointid changes, otherwise we get a cluster of bad movement +UPDATE `smart_scripts` SET `event_param1`=7 WHERE `entryorguid`=27411 AND `source_type`=0 AND `id`=1 AND `link`=2; +UPDATE `smart_scripts` SET `event_param1`=37 WHERE `entryorguid`=27409 AND `source_type`=0 AND `id`=3 AND `link`=0; +UPDATE `smart_scripts` SET `event_param1`=75 WHERE `entryorguid`=27409 AND `source_type`=0 AND `id`=4 AND `link`=0; +UPDATE `smart_scripts` SET `event_param1`=103 WHERE `entryorguid`=27409 AND `source_type`=0 AND `id`=2 AND `link`=5; + +DELETE FROM `waypoints` WHERE entry = 27409; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(27409, 1, 4431.638672, -2481.546143, 245.497971, ''), +(27409, 2, 4449.238281, -2471.332031, 242.360382, ''), +(27409, 3, 4461.925293, -2462.848145, 239.519882, ''), +(27409, 4, 4462.994141, -2448.238037, 237.881256, ''), +(27409, 5, 4479.575684, -2434.093506, 235.040390, ''), +(27409, 6, 4488.495605, -2420.688477, 233.043091, ''), +(27409, 7, 4494.654785, -2414.143066, 230.241013, ''), +(27409, 8, 4499.730469, -2414.861572, 230.952850, ''), +(27409, 9, 4510.846191, -2401.806641, 226.618698, ''), +(27409, 10, 4517.005371, -2388.016357, 220.151077, ''), +(27409, 11, 4520.017578, -2373.915283, 213.041779, ''), +(27409, 12, 4524.577637, -2355.400391, 202.208481, ''), +(27409, 13, 4520.500977, -2332.202148, 190.853638, ''), +(27409, 14, 4509.677734, -2314.525635, 182.408096, ''), +(27409, 15, 4488.281250, -2309.130127, 184.351913, ''), +(27409, 16, 4480.724609, -2311.419434, 185.420715, ''), +(27409, 17, 4470.293457, -2314.579346, 183.929382, ''), +(27409, 18, 4453.349121, -2318.290771, 189.487000, ''), +(27409, 19, 4442.953613, -2311.859375, 192.656219, ''), +(27409, 20, 4414.564941, -2297.739258, 191.105362, ''), +(27409, 21, 4396.023438, -2286.889648, 192.638016, ''), +(27409, 22, 4383.112305, -2278.546631, 188.321487, ''), +(27409, 23, 4369.118652, -2256.089844, 187.592911, ''), +(27409, 24, 4339.653320, -2250.217529, 188.636993, ''), +(27409, 25, 4299.784180, -2260.091309, 205.303589, ''), +(27409, 26, 4292.068848, -2261.806885, 209.099808, ''), +(27409, 27, 4258.068359, -2270.728027, 212.053543, ''), +(27409, 28, 4224.148926, -2276.497559, 214.878052, ''), +(27409, 29, 4210.618652, -2280.829346, 214.910553, ''), +(27409, 30, 4193.759766, -2285.936035, 219.885529, ''), +(27409, 31, 4168.561523, -2272.436279, 221.375009, ''), +(27409, 32, 4151.019531, -2269.352783, 223.433472, ''), +(27409, 33, 4131.847168, -2271.157715, 221.920700, ''), +(27409, 34, 4112.480469, -2276.041748, 219.916550, ''), +(27409, 35, 4103.597656, -2274.198730, 219.276031, ''), +(27409, 36, 4093.837158, -2276.393066, 219.042526, ''), +(27409, 37, 4084.734375, -2272.286133, 217.870331, ''), -- Jump PoS +(27409, 38, 4063.238525, -2261.991211, 215.988922, ''), -- Jump continuation +(27409, 39, 4059.935547, -2260.473145, 216.993256, ''), +(27409, 40, 4028.185791, -2252.874512, 218.258530, ''), +(27409, 41, 4020.977539, -2249.354004, 217.129837, ''), +(27409, 42, 4005.426025, -2256.105957, 218.451675, ''), +(27409, 43, 3988.108398, -2262.058350, 217.109756, ''), +(27409, 44, 3968.364014, -2267.235840, 215.268341, ''), +(27409, 45, 3953.139893, -2268.633057, 212.391113, ''), +(27409, 46, 3935.732422, -2276.518066, 209.669937, ''), +(27409, 47, 3922.170898, -2282.024414, 211.200699, ''), +(27409, 48, 3913.766846, -2300.279541, 209.620239, ''), +(27409, 49, 3914.160156, -2317.614990, 208.949615, ''), +(27409, 50, 3911.533936, -2330.580078, 207.751999, ''), +(27409, 51, 3907.095947, -2346.107422, 204.630707, ''), +(27409, 52, 3901.425537, -2362.481201, 206.197708, ''), +(27409, 53, 3885.374756, -2368.482178, 202.270737, ''), +(27409, 54, 3871.682617, -2371.436035, 196.694305, ''), +(27409, 55, 3858.806396, -2374.236816, 194.038589, ''), +(27409, 56, 3833.323975, -2390.121582, 187.584473, ''), +(27409, 57, 3818.713379, -2403.767090, 183.718597, ''), +(27409, 58, 3812.403564, -2425.267334, 185.086273, ''), +(27409, 59, 3812.611328, -2432.785400, 186.023727, ''), +(27409, 60, 3812.221680, -2453.928711, 188.508041, ''), +(27409, 61, 3815.669189, -2479.355957, 192.388458, ''), +(27409, 62, 3819.468262, -2503.677002, 195.024658, ''), +(27409, 63, 3822.264648, -2517.937256, 194.068130, ''), +(27409, 64, 3825.485107, -2534.361572, 196.379684, ''), +(27409, 65, 3829.201660, -2554.680664, 196.714203, ''), +(27409, 66, 3836.672119, -2578.528076, 196.706253, ''), +(27409, 67, 3847.536133, -2609.345459, 200.060410, ''), +(27409, 68, 3861.525879, -2624.756592, 202.314850, ''), +(27409, 69, 3882.063232, -2655.939209, 203.425415, ''), +(27409, 70, 3886.698975, -2663.550293, 208.091705, ''), +(27409, 71, 3900.575928, -2672.409912, 212.662750, ''), +(27409, 72, 3909.817383, -2687.583008, 217.098572, ''), +(27409, 73, 3911.782959, -2695.853027, 220.364487, ''), +(27409, 74, 3916.008301, -2703.185791, 221.175446, ''), +(27409, 75, 3912.544678, -2712.180420, 221.059509, ''), -- Jump location +(27409, 76, 3900.396484, -2743.329346, 219.152481, ''), -- Jump continue +(27409, 77, 3889.821777, -2751.587646, 221.798737, ''), +(27409, 78, 3883.421875, -2756.963379, 223.885544, ''), +(27409, 79, 3851.103027, -2769.906494, 227.460480, ''), +(27409, 80, 3837.903076, -2769.537842, 226.115402, ''), +(27409, 81, 3813.292725, -2770.593018, 220.927460, ''), +(27409, 82, 3801.162109, -2771.017578, 219.535080, ''), +(27409, 83, 3780.501709, -2772.391602, 213.905884, ''), +(27409, 84, 3767.551025, -2775.388672, 211.281708, ''), +(27409, 85, 3759.778320, -2782.290771, 209.165924, ''), +(27409, 86, 3752.759277, -2787.596436, 206.495926, ''), +(27409, 87, 3729.982422, -2803.813721, 210.023056, ''), +(27409, 88, 3723.949951, -2808.085693, 211.655594, ''), +(27409, 89, 3705.986328, -2819.675537, 215.066315, ''), +(27409, 90, 3685.556152, -2832.987549, 217.602127, ''), +(27409, 91, 3674.411377, -2843.797852, 217.875214, ''), +(27409, 92, 3662.455811, -2853.292480, 216.581512, ''), +(27409, 93, 3647.392822, -2857.280518, 213.150558, ''), +(27409, 94, 3630.625977, -2860.268555, 214.962250, ''), +(27409, 95, 3610.744141, -2858.618164, 208.903931, ''), +(27409, 96, 3587.919189, -2854.562500, 203.447754, ''), +(27409, 97, 3562.793213, -2842.607666, 197.044495, ''), +(27409, 98, 3534.265625, -2828.214600, 197.154617, ''), +(27409, 99, 3515.692871, -2829.376709, 201.276230, ''), +(27409, 100, 3487.658691, -2829.192871, 202.143524, ''), +(27409, 101, 3472.460693, -2821.599365, 201.429428, ''), +(27409, 102, 3460.582031, -2817.212402, 201.804962, ''), +(27409, 103, 3443.644531, -2811.332520, 202.097687, ''); + +-- Freed Alliance Scout waypoints +DELETE FROM `waypoints` WHERE entry = 27411; +INSERT INTO `waypoints` (`entry`, `pointid`, `position_x`, `position_y`, `position_z`, `point_comment`) VALUES +(27411, 1, 4394.648438, -2502.304688, 252.802429, ''), +(27411, 2, 4389.777832, -2502.323242, 252.251602, ''), +(27411, 3, 4382.442383, -2501.507080, 246.809448, ''), +(27411, 4, 4381.006836, -2497.183838, 247.235260, ''), +(27411, 5, 4393.843750, -2484.841553, 248.717392, ''), +(27411, 6, 4416.043457, -2481.504150, 247.175400, ''), +(27411, 7, 4425.312500, -2486.656006, 246.555176, ''); diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp index febf2e789a2..a1862c07d14 100644 --- a/src/server/game/AI/SmartScripts/SmartAI.cpp +++ b/src/server/game/AI/SmartScripts/SmartAI.cpp @@ -312,7 +312,7 @@ void SmartAI::UpdatePath(const uint32 diff) mWPReached = false; } } - if (me->IsInCombat() || HasEscortState(SMART_ESCORT_PAUSED | SMART_ESCORT_RETURNING)) + if ((!me->HasReactState(REACT_PASSIVE) && me->IsInCombat()) || HasEscortState(SMART_ESCORT_PAUSED | SMART_ESCORT_RETURNING)) return; // handle next wp if (mWPReached)//reached WP diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 594d33357b4..7ec9f30acdf 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -16372,10 +16372,6 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid /*= 0*/) if (qInfo->RequiredNpcOrGo[j] <= 0) continue; - // skip Cast at creature objective - if (qInfo->RequiredSpellCast[j] != 0) - continue; - uint32 reqkill = qInfo->RequiredNpcOrGo[j]; if (reqkill == real_entry) @@ -16465,10 +16461,6 @@ void Player::CastedCreatureOrGO(uint32 entry, uint64 guid, uint32 spell_id) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { - // skip kill creature objective (0) or wrong spell casts - if (qInfo->RequiredSpellCast[j] != spell_id) - continue; - uint32 reqTarget = 0; if (isCreature) @@ -16548,8 +16540,8 @@ void Player::TalkedToCreature(uint32 entry, uint64 guid) { for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { - // skip spell casts and Gameobject objectives - if (qInfo->RequiredSpellCast[j] > 0 || qInfo->RequiredNpcOrGo[j] < 0) + // skip gameobject objectives + if (qInfo->RequiredNpcOrGo[j] < 0) continue; uint32 reqTarget = 0; diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 38971cd3e30..d383da5c9f6 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -3552,19 +3552,17 @@ void ObjectMgr::LoadQuests() "RequiredSourceItemId1, RequiredSourceItemId2, RequiredSourceItemId3, RequiredSourceItemId4, RequiredSourceItemCount1, RequiredSourceItemCount2, RequiredSourceItemCount3, RequiredSourceItemCount4, " // 111 112 113 114 115 116 117 118 119 120 121 122 "RequiredItemId1, RequiredItemId2, RequiredItemId3, RequiredItemId4, RequiredItemId5, RequiredItemId6, RequiredItemCount1, RequiredItemCount2, RequiredItemCount3, RequiredItemCount4, RequiredItemCount5, RequiredItemCount6, " - // 123 124 125 126 127 128 129 130 131 - "RequiredSpell, RequiredSpellCast1, RequiredSpellCast2, RequiredSpellCast3, RequiredSpellCast4, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4, " - // 132 133 134 135 136 137 138 139 - "RewardCurrencyId1, RewardCurrencyId2, RewardCurrencyId3, RewardCurrencyId4, RewardCurrencyCount1, RewardCurrencyCount2, RewardCurrencyCount3, RewardCurrencyCount4, " - // 140 141 142 143 144 145 146 147 + // 123 124 125 126 127 128 129 130 131 132 133 134 136 + "RequiredSpell, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4, RewardCurrencyId1, RewardCurrencyId2, RewardCurrencyId3, RewardCurrencyId4, RewardCurrencyCount1, RewardCurrencyCount2, RewardCurrencyCount3, RewardCurrencyCount4, " + // 137 138 139 140 141 142 143 144 "RequiredCurrencyId1, RequiredCurrencyId2, RequiredCurrencyId3, RequiredCurrencyId4, RequiredCurrencyCount1, RequiredCurrencyCount2, RequiredCurrencyCount3, RequiredCurrencyCount4, " - // 148 149 150 151 152 153 + // 145 146 147 148 149 150 "QuestGiverTextWindow, QuestGiverTargetName, QuestTurnTextWindow, QuestTurnTargetName, SoundAccept, SoundTurnIn, " - // 154 155 156 157 158 159 160 161 162 163 + // 151 152 153 154 155 156 157 158 159 160 "DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4, DetailsEmoteDelay1, DetailsEmoteDelay2, DetailsEmoteDelay3, DetailsEmoteDelay4, EmoteOnIncomplete, EmoteOnComplete, " - // 164 165 166 167 168 169 170 171 + // 161 162 163 164 165 166 167 168 "OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4, OfferRewardEmoteDelay1, OfferRewardEmoteDelay2, OfferRewardEmoteDelay3, OfferRewardEmoteDelay4, " - // 173 + // 169 "WDBVerified" " FROM quest_template"); if (!result) @@ -3593,7 +3591,7 @@ void ObjectMgr::LoadQuests() if (DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, iter->first, NULL)) continue; - Quest * qinfo = iter->second; + Quest* qinfo = iter->second; // additional quest integrity checks (GO, creature_template and item_template must be loaded already) @@ -3902,52 +3900,6 @@ void ObjectMgr::LoadQuests() for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) { - uint32 id = qinfo->RequiredSpellCast[j]; - if (id) - { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(id); - if (!spellInfo) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ReqSpellCast%d` = %u but spell %u does not exist, quest can't be done.", - qinfo->GetQuestId(), j+1, id, id); - continue; - } - - if (!qinfo->RequiredNpcOrGo[j]) - { - bool found = false; - for (uint8 k = 0; k < MAX_SPELL_EFFECTS; ++k) - { - if ((spellInfo->Effects[k].Effect == SPELL_EFFECT_QUEST_COMPLETE && uint32(spellInfo->Effects[k].MiscValue) == qinfo->Id) || - spellInfo->Effects[k].Effect == SPELL_EFFECT_SEND_EVENT) - { - found = true; - break; - } - } - - if (found) - { - if (!qinfo->HasSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT)) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Spell (id: %u) have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT for quest %u and RequiredNpcOrGo%d = 0, but quest not have flag QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT. Quest flags or RequiredNpcOrGo%d must be fixed, quest modified to enable objective.", spellInfo->Id, qinfo->Id, j+1, j+1); - - // this will prevent quest completing without objective - const_cast<Quest*>(qinfo)->SetSpecialFlag(QUEST_SPECIAL_FLAGS_EXPLORATION_OR_EVENT); - } - } - else - { - TC_LOG_ERROR(LOG_FILTER_SQL, "Quest %u has `ReqSpellCast%d` = %u and RequiredNpcOrGo%d = 0 but spell %u does not have SPELL_EFFECT_QUEST_COMPLETE or SPELL_EFFECT_SEND_EVENT effect for this quest, quest can't be done.", - qinfo->GetQuestId(), j+1, id, j+1, id); - // no changes, quest can't be done for this requirement - } - } - } - } - - for (uint8 j = 0; j < QUEST_OBJECTIVES_COUNT; ++j) - { int32 id = qinfo->RequiredNpcOrGo[j]; if (id < 0 && !sObjectMgr->GetGameObjectTemplate(-id)) { diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 8d4f3b42e72..9f374dec8e4 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -126,47 +126,44 @@ Quest::Quest(Field* questRecord) RequiredSpell = questRecord[123].GetUInt32(); - for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) // To be removed - RequiredSpellCast[i] = questRecord[124+i].GetUInt32(); - for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i) - ObjectiveText[i] = questRecord[128+i].GetString(); + ObjectiveText[i] = questRecord[124+i].GetString(); for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i) - RewardCurrencyId[i] = questRecord[132+i].GetUInt16(); + RewardCurrencyId[i] = questRecord[128+i].GetUInt16(); for (int i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i) - RewardCurrencyCount[i] = questRecord[136+i].GetUInt8(); + RewardCurrencyCount[i] = questRecord[132+i].GetUInt8(); for (int i = 0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i) - RequiredCurrencyId[i] = questRecord[140+i].GetUInt16(); + RequiredCurrencyId[i] = questRecord[136+i].GetUInt16(); for (int i = 0; i < QUEST_REQUIRED_CURRENCY_COUNT; ++i) - RequiredCurrencyCount[i] = questRecord[144+i].GetUInt8(); + RequiredCurrencyCount[i] = questRecord[140+i].GetUInt8(); - QuestGiverTextWindow = questRecord[148].GetString(); - QuestGiverTargetName = questRecord[149].GetString(); - QuestTurnTextWindow = questRecord[150].GetString(); - QuestTurnTargetName = questRecord[151].GetString(); - SoundAccept = questRecord[152].GetUInt16(); - SoundTurnIn = questRecord[153].GetUInt16(); + QuestGiverTextWindow = questRecord[144].GetString(); + QuestGiverTargetName = questRecord[145].GetString(); + QuestTurnTextWindow = questRecord[146].GetString(); + QuestTurnTargetName = questRecord[147].GetString(); + SoundAccept = questRecord[148].GetUInt16(); + SoundTurnIn = questRecord[149].GetUInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - DetailsEmote[i] = questRecord[154+i].GetUInt16(); + DetailsEmote[i] = questRecord[150+i].GetUInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - DetailsEmoteDelay[i] = questRecord[158+i].GetUInt32(); + DetailsEmoteDelay[i] = questRecord[154+i].GetUInt32(); - EmoteOnIncomplete = questRecord[162].GetUInt16(); - EmoteOnComplete = questRecord[163].GetUInt16(); + EmoteOnIncomplete = questRecord[158].GetUInt16(); + EmoteOnComplete = questRecord[159].GetUInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmote[i] = questRecord[164+i].GetInt16(); + OfferRewardEmote[i] = questRecord[160+i].GetInt16(); for (int i = 0; i < QUEST_EMOTE_COUNT; ++i) - OfferRewardEmoteDelay[i] = questRecord[168+i].GetInt32(); + OfferRewardEmoteDelay[i] = questRecord[164+i].GetInt32(); - // int32 WDBVerified = questRecord[172].GetInt32(); + // int32 WDBVerified = questRecord[168].GetInt32(); if (SpecialFlags & QUEST_SPECIAL_FLAGS_AUTO_ACCEPT) Flags |= QUEST_FLAGS_AUTO_ACCEPT; diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 93db5c0ce65..8156c5b062d 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -302,7 +302,6 @@ class Quest uint32 RequiredSourceItemCount[QUEST_SOURCE_ITEM_IDS_COUNT]; int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]; // >0 Creature <0 Gameobject uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]; - uint32 RequiredSpellCast[QUEST_OBJECTIVES_COUNT]; uint32 RewardChoiceItemId[QUEST_REWARD_CHOICES_COUNT]; uint32 RewardChoiceItemCount[QUEST_REWARD_CHOICES_COUNT]; uint32 RewardItemId[QUEST_REWARDS_COUNT]; diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp index 6b7d10ff7b1..12912f68bd5 100644 --- a/src/server/scripts/Commands/cs_quest.cpp +++ b/src/server/scripts/Commands/cs_quest.cpp @@ -207,12 +207,7 @@ public: int32 creature = quest->RequiredNpcOrGo[i]; uint32 creaturecount = quest->RequiredNpcOrGoCount[i]; - if (uint32 spell_id = quest->RequiredSpellCast[i]) - { - for (uint16 z = 0; z < creaturecount; ++z) - player->CastedCreatureOrGO(creature, 0, spell_id); - } - else if (creature > 0) + if (creature > 0) { if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(creature)) for (uint16 z = 0; z < creaturecount; ++z) diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index ca94f871d03..2a23d6d8135 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -1876,6 +1876,164 @@ class spell_q13086_cannons_target : public SpellScriptLoader } }; +enum BurstAtTheSeams +{ + NPC_DRAKKARI_CHIEFTAINK = 29099, + + QUEST_BURST_AT_THE_SEAMS = 12690, + + SPELL_BURST_AT_THE_SEAMS = 52510, // Burst at the Seams + SPELL_BURST_AT_THE_SEAMS_DMG = 52508, // Damage spell + SPELL_BURST_AT_THE_SEAMS_DMG_2 = 59580, // Abomination self damage spell + SPELL_BURST_AT_THE_SEAMS_BONE = 52516, // Burst at the Seams:Bone + SPELL_BURST_AT_THE_SEAMS_MEAT = 52520, // Explode Abomination:Meat + SPELL_BURST_AT_THE_SEAMS_BMEAT = 52523, // Explode Abomination:Bloody Meat + SPELL_DRAKKARI_SKULLCRUSHER_CREDIT = 52590, // Credit for Drakkari Skullcrusher + SPELL_SUMMON_DRAKKARI_CHIEFTAIN = 52616, // Summon Drakkari Chieftain + SPELL_DRAKKARI_CHIEFTAINK_KILL_CREDIT = 52620 // Drakkari Chieftain Kill Credit +}; + +class spell_q12690_burst_at_the_seams : public SpellScriptLoader +{ + public: + spell_q12690_burst_at_the_seams() : SpellScriptLoader("spell_q12690_burst_at_the_seams") { } + + class spell_q12690_burst_at_the_seams_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12690_burst_at_the_seams_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_BURST_AT_THE_SEAMS) + || !sSpellMgr->GetSpellInfo(SPELL_BURST_AT_THE_SEAMS_DMG) + || !sSpellMgr->GetSpellInfo(SPELL_BURST_AT_THE_SEAMS_DMG_2) + || !sSpellMgr->GetSpellInfo(SPELL_BURST_AT_THE_SEAMS_BONE) + || !sSpellMgr->GetSpellInfo(SPELL_BURST_AT_THE_SEAMS_MEAT) + || !sSpellMgr->GetSpellInfo(SPELL_BURST_AT_THE_SEAMS_BMEAT)) + return false; + return true; + } + + bool Load() OVERRIDE + { + return GetCaster()->GetTypeId() == TYPEID_UNIT; + } + + void HandleKnockBack(SpellEffIndex /*effIndex*/) + { + if (Unit* creature = GetHitCreature()) + { + if (Unit* charmer = GetCaster()->GetCharmerOrOwner()) + { + if (Player* player = charmer->ToPlayer()) + { + if (player->GetQuestStatus(QUEST_BURST_AT_THE_SEAMS) == QUEST_STATUS_INCOMPLETE) + { + creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BONE, true); + creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_MEAT, true); + creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_BMEAT, true); + creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_DMG, true); + creature->CastSpell(creature, SPELL_BURST_AT_THE_SEAMS_DMG_2, true); + + player->CastSpell(player, SPELL_DRAKKARI_SKULLCRUSHER_CREDIT, true); + uint16 count = player->GetReqKillOrCastCurrentCount(QUEST_BURST_AT_THE_SEAMS, NPC_DRAKKARI_CHIEFTAINK); + if ((count % 20) == 0) + player->CastSpell(player, SPELL_SUMMON_DRAKKARI_CHIEFTAIN, true); + } + } + } + } + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + GetCaster()->ToCreature()->DespawnOrUnsummon(2 * IN_MILLISECONDS); + } + + void Register() OVERRIDE + { + OnEffectHitTarget += SpellEffectFn(spell_q12690_burst_at_the_seams_SpellScript::HandleKnockBack, EFFECT_1, SPELL_EFFECT_KNOCK_BACK); + OnEffectHitTarget += SpellEffectFn(spell_q12690_burst_at_the_seams_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q12690_burst_at_the_seams_SpellScript(); + } +}; + +enum EscapeFromSilverbrook +{ + SPELL_SUMMON_WORGEN = 48681 +}; + +// 48682 - Escape from Silverbrook - Periodic Dummy +class spell_q12308_escape_from_silverbrook : public SpellScriptLoader +{ + public: + spell_q12308_escape_from_silverbrook() : SpellScriptLoader("spell_q12308_escape_from_silverbrook") { } + + class spell_q12308_escape_from_silverbrook_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12308_escape_from_silverbrook_SpellScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_SUMMON_WORGEN)) + return false; + return true; + } + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + GetCaster()->CastSpell(GetCaster(), SPELL_SUMMON_WORGEN, true); + } + + void Register() OVERRIDE + { + OnEffectHit += SpellEffectFn(spell_q12308_escape_from_silverbrook_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q12308_escape_from_silverbrook_SpellScript(); + } +}; + +// 48681 - Summon Silverbrook Worgen +class spell_q12308_escape_from_silverbrook_summon_worgen : public SpellScriptLoader +{ + public: + spell_q12308_escape_from_silverbrook_summon_worgen() : SpellScriptLoader("spell_q12308_escape_from_silverbrook_summon_worgen") { } + + class spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript); + + void ModDest(SpellEffIndex effIndex) + { + float dist = GetSpellInfo()->Effects[effIndex].CalcRadius(GetCaster()); + float angle = (urand(0, 1) ? -1 : 1) * (frand(0.75f, 1.0f) * M_PI); + + Position pos; + GetCaster()->GetNearPosition(pos, dist, angle); + GetHitDest()->Relocate(&pos); + } + + void Register() OVERRIDE + { + OnEffectHit += SpellEffectFn(spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript::ModDest, EFFECT_0, SPELL_EFFECT_SUMMON); + } + }; + + SpellScript* GetSpellScript() const OVERRIDE + { + return new spell_q12308_escape_from_silverbrook_summon_worgen_SpellScript(); + } +}; + void AddSC_quest_spell_scripts() { new spell_q55_sacred_cleansing(); @@ -1922,4 +2080,7 @@ void AddSC_quest_spell_scripts() new spell_q12847_summon_soul_moveto_bunny(); new spell_q13011_bear_flank_master(); new spell_q13086_cannons_target(); + new spell_q12690_burst_at_the_seams(); + new spell_q12308_escape_from_silverbrook_summon_worgen(); + new spell_q12308_escape_from_silverbrook(); } |
