From 1a576fa7b2b4e37471e9b6e9185690a85be76557 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Sun, 23 Jun 2013 16:16:42 -0230 Subject: Core/Scripting: UBRS Boss Pyroguard Emberseer closer to being fully scripted. --- sql/updates/world/2013_06_23_01_world_misc.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2013_06_23_01_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_23_01_world_misc.sql b/sql/updates/world/2013_06_23_01_world_misc.sql new file mode 100644 index 00000000000..f98b1f2f7ab --- /dev/null +++ b/sql/updates/world/2013_06_23_01_world_misc.sql @@ -0,0 +1,3 @@ +-- Move Blackhand Incarcerator to core scripting +UPDATE `creature_template` SET `AIName`= '',`ScriptName`= 'npc_blackhand_incarcerator' WHERE `entry`=10316; +DELETE FROM `smart_scripts` WHERE `entryorguid`=10316; -- cgit v1.2.3 From 9726a5174e22097373581bb5e20fad49e45b9a61 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Mon, 24 Jun 2013 03:47:44 -0230 Subject: Core/Scripting: Start Scripting Gyth / Rend event for UBRS. Add creature text. --- .../world/2013_06_24_00_world_creature_text.sql | 22 ++++++ .../BlackwingLair/boss_victor_nefarius.cpp | 92 ++++++++++++++++++++-- 2 files changed, 109 insertions(+), 5 deletions(-) create mode 100644 sql/updates/world/2013_06_24_00_world_creature_text.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_24_00_world_creature_text.sql b/sql/updates/world/2013_06_24_00_world_creature_text.sql new file mode 100644 index 00000000000..6419e43ad14 --- /dev/null +++ b/sql/updates/world/2013_06_24_00_world_creature_text.sql @@ -0,0 +1,22 @@ +-- Text for Lord Victor Nefarius from sniff +SET @VICTOR := 10162; +SET @REND := 10429; +DELETE FROM `creature_text` WHERE `entry` IN (@VICTOR,@REND); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +-- Lord Victor Nefarius texts UBRS +(@VICTOR,0,0,"Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,1,0,"Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,2,0,"Foolsss... Kill the one in the dress!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,3,0,"Inconceivable!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,4,0,"Your efforts will prove fruitless. None shall stand in our way!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,5,0,"Do not force my hand, children! I shall use your hides to line my boots.",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,6,0,"Use the freezing breath, imbecile!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,7,0,"THIS CANNOT BE!!! Rend, deal with these insects.",14,0,100,0,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,8,0,"The Warchief shall make quick work of you, mortals. Prepare yourselves!",14,0,100,25,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,9,0,"Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end! The next time we meet shall be the last.",14,0,100,5,0,0,'Lord Victor Nefarius (UBRS)'), +-- Lord Victor Nefarius texts BWL +(@VICTOR,10,0,"In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...",12,0,100,22,0,0,'Lord Victor Nefarius SAY_GAMESBEGIN_1 (BWL)'), +(@VICTOR,11,0,"Let the games begin!",14,0,100,22,0,8280,'Lord Victor Nefarius SAY_GAMESBEGIN_2 (BWL)'), +(@VICTOR,12,0,"Ah, the heroes. You are persistent, aren't you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!",14,0,100,22,0,8279,'Lord Victor Nefarius SAY_VAEL_INTRO (BWL)'), +-- Warchief Rend Blackhand text +(@REND,0,0,"With pleasure...",14,0,100,0,0,0,'Warchief Rend Blackhand'); diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp index a6138c38f28..84670ed4e0c 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp @@ -30,9 +30,21 @@ EndScriptData */ enum Says { - SAY_GAMESBEGIN_1 = 0, - SAY_GAMESBEGIN_2 = 1, - //SAY_VAEL_INTRO = 2, Not used - when he corrupts Vaelastrasz + // UBRS text + SAY_GYTH_REND_1 = 0, + SAY_GYTH_REND_2 = 1, + SAY_GYTH_REND_3 = 2, + SAY_GYTH_REND_4 = 3, + SAY_GYTH_REND_5 = 4, + SAY_GYTH_REND_6 = 5, + SAY_GYTH_REND_7 = 6, + SAY_GYTH_REND_8 = 7, + SAY_GYTH_REND_9 = 8, + SAY_GYTH_REND_10 = 9, + // BWL text + SAY_GAMESBEGIN_1 = 10, + SAY_GAMESBEGIN_2 = 11, + //SAY_VAEL_INTRO = 12, Not used - when he corrupts Vaelastrasz }; #define GOSSIP_ITEM_1 "I've made no mistakes." @@ -41,6 +53,7 @@ enum Says enum Creatures { + NPC_REND_BLACKHAND = 10429, CREATURE_BRONZE_DRAKANOID = 14263, CREATURE_BLUE_DRAKANOID = 14261, CREATURE_RED_DRAKANOID = 14264, @@ -68,8 +81,23 @@ enum Creatures enum Spells { - SPELL_SHADOWBOLT = 21077, - SPELL_FEAR = 26070 + // UBRS Spells + SPELL_CHROMATIC_CHAOS = 16337, // Self Cast hits 10339 + SPELL_VAELASTRASZZ_SPAWN = 16354, // Self Cast Depawn one sec after + // BWL Spells + SPELL_SHADOWBOLT = 21077, + SPELL_FEAR = 26070 +}; + +enum Events +{ + // UBRS Events + EVENT_PLAYER_CHECK = 0, + EVENT_GYTH_REND_1 = 1, + EVENT_GYTH_REND_2 = 2, + EVENT_GYTH_REND_3 = 3, + EVENT_GYTH_REND_4 = 4, + EVENT_GYTH_REND_5 = 5, }; //This script is complicated @@ -178,6 +206,11 @@ public: void Reset() { + if(me->GetMapId() == 229) + { + _events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); + } + if(me->GetMapId() == 469) { SpawnedAdds = 0; @@ -229,6 +262,51 @@ public: void UpdateAI(uint32 diff) { + + if(me->GetMapId() == 229) // UBRS EVENTS + { + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_PLAYER_CHECK: + // If player found within 30.0f + // _events.ScheduleEvent(EVENT_GYTH_REND_1, 1000); + // else + // events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); + break; + case EVENT_GYTH_REND_1: + Talk(SAY_GYTH_REND_1); + _events.ScheduleEvent(EVENT_GYTH_REND_2, 4000); + break; + case EVENT_GYTH_REND_2: + if (Unit* player = SelectTarget(SELECT_TARGET_NEAREST, 0, 30.0f, false)) + me->SetInFront(player); + me->SendMovementFlagUpdate(); + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); + _events.ScheduleEvent(EVENT_GYTH_REND_3, 4000); + break; + case EVENT_GYTH_REND_3: + Talk(SAY_GYTH_REND_2); + _events.ScheduleEvent(EVENT_GYTH_REND_4, 4000); + break; + case EVENT_GYTH_REND_4: + if (Creature* rend = me->FindNearestCreature(NPC_REND_BLACKHAND, 5.0f, true)) + me->SetInFront(rend); + me->SendMovementFlagUpdate(); + _events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); + break; + case EVENT_GYTH_REND_5: + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + _events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); + default: + break; + } + } + } + if (!UpdateVictim()) return; @@ -348,6 +426,10 @@ public: } private: + EventMap _events; + // UBRS + + // BWL uint32 SpawnedAdds; uint32 AddSpawnTimer; uint32 ShadowBoltTimer; -- cgit v1.2.3 From eb743614703917d2fda8d6e3730dfb8aa6f5176e Mon Sep 17 00:00:00 2001 From: Malcrom Date: Mon, 24 Jun 2013 13:48:02 -0230 Subject: Core/Scripting: Updated BWL Scripts. Thanks to gerripeach for the base. Closes #4952 #9283 --- sql/updates/world/2013_06_24_01_world_misc.sql | 195 +++++++ src/server/game/Scripting/ScriptLoader.cpp | 12 +- .../EasternKingdoms/BlackwingLair/blackwing_lair.h | 81 +++ .../BlackwingLair/boss_broodlord_lashlayer.cpp | 114 ++-- .../BlackwingLair/boss_chromaggus.cpp | 221 ++++---- .../EasternKingdoms/BlackwingLair/boss_ebonroc.cpp | 115 ++-- .../EasternKingdoms/BlackwingLair/boss_firemaw.cpp | 102 ++-- .../BlackwingLair/boss_flamegor.cpp | 97 ++-- .../BlackwingLair/boss_nefarian.cpp | 604 ++++++++++++++++----- .../BlackwingLair/boss_razorgore.cpp | 198 +++++-- .../BlackwingLair/boss_vaelastrasz.cpp | 321 +++++------ .../BlackwingLair/boss_victor_nefarius.cpp | 483 ---------------- .../BlackwingLair/instance_blackwing_lair.cpp | 344 +++++++++++- src/server/scripts/EasternKingdoms/CMakeLists.txt | 2 +- 14 files changed, 1668 insertions(+), 1221 deletions(-) create mode 100644 sql/updates/world/2013_06_24_01_world_misc.sql create mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h delete mode 100644 src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_24_01_world_misc.sql b/sql/updates/world/2013_06_24_01_world_misc.sql new file mode 100644 index 00000000000..1379c6cbc75 --- /dev/null +++ b/sql/updates/world/2013_06_24_01_world_misc.sql @@ -0,0 +1,195 @@ +-- Add Missing Gossip Menu for Lord Victor Nefarius +UPDATE `creature_template` SET `gossip_menu_id`=21330 WHERE `entry`=10162; + +-- Add Missing Gossip Menu items for Lord Victor Nefarius +DELETE FROM `gossip_menu` WHERE `entry`=21330 AND `text_id`=7134; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (21330,7134); +DELETE FROM `gossip_menu` WHERE `entry`=21331 AND `text_id`=7198; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (21331,7198); +DELETE FROM `gossip_menu` WHERE `entry`=21332 AND `text_id`=7199; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (21332,7199); + +-- Add Missing Gossip Menu options for Lord Victor Nefarius +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (21330,21331,21332); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(21330,0,0, 'I''ve made no mistakes.',1,1,21331,0,0,0, ''), +(21331,0,0, 'You have lost your mind, Nefarius. You speak in riddles.',1,1,21332,0,0,0, ''), +(21332,0,0, 'Please do.',1,1,0,0,0,0, ''); + +-- Add Missing Gossip Menu for Vaelastrasz the Corrupt +UPDATE `creature_template` SET `gossip_menu_id`=21333 WHERE `entry`=13020; + +-- Add Missing Gossip Menu items for Vaelastrasz the Corrupt +DELETE FROM `gossip_menu` WHERE `entry`=21333 AND `text_id`=7156; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (21333,7156); +DELETE FROM `gossip_menu` WHERE `entry`=21334 AND `text_id`=7256; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (21334,7256); + +-- Add Missing Gossip Menu options for Vaelastrasz the Corrupt +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (21333,21334); +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(21333,0,0, 'I cannot Vaelastraz! Surely something can be done to heal you!',1,1,21334,0,0,0, ''), +(21334,0,0, 'Vaelastraz, no!!',1,1,21332,0,0,0, ''); + +-- Add missing text for Nefarian +SET @NEFARIAN := 11583; +DELETE FROM `creature_text` WHERE `entry`=@NEFARIAN AND `groupid`=13; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NEFARIAN,13,0,"'Death Knights, get over here!'",14,0,100,0,0,0,'nefarian SAY_DEATH_KNIGHT'); + +-- wrong creature spawn +DELETE FROM creature WHERE guid IN (84511, 84510, 84509, 84505, 84444, 84404, 84393); +DELETE FROM creature WHERE guid IN (84496, 84489, 84487, 84439, 84437, 84405, 84403); +DELETE FROM creature WHERE guid IN (84503, 84494, 84493, 84392); +DELETE FROM creature WHERE guid IN (84486, 84484, 84436); +DELETE FROM creature WHERE guid IN (84495, 84432, 84406); + +UPDATE creature_template SET spell2=19873, spell3=19872, spell4=0 WHERE entry=12435; +UPDATE gameobject_template SET ScriptName='go_orb_of_domination' WHERE entry=177808; + +DELETE FROM spell_script_names WHERE spell_id=19873; +INSERT INTO spell_script_names (spell_id, ScriptName) VALUES +(19873, 'spell_egg_event'); + +DELETE FROM spell_linked_spell WHERE spell_trigger=42013 AND spell_effect=45537; +INSERT INTO spell_linked_spell (spell_trigger, spell_effect, comment) VALUES +(42013, 45537, 'Visual Channel'); + +-- nefarian +REPLACE INTO spell_target_position (id, target_map, target_position_x, target_position_y, target_position_z, target_orientation) VALUES +(22981, 469, -7536.73, -1280.18, 476.799, 2.11467), +(22982, 469, -7503.34, -1163.17, 476.797, 2.57019), +(22983, 469, -7482.73, -1196.49, 476.799, 2.31887), +(22984, 469, -7462.38, -1224.99, 476.786, 2.37385), +(22978, 469, -7534.08, -1198.57, 476.799, 2.23641), +(22979, 469, -7514.02, -1224.35, 476.8, 2.21677), +(22980, 469, -7496.05, -1248.45, 476.799, 2.09111), +(22972, 469, -7516.38, -1263.78, 476.773, 2.18536), +(22975, 469, -7582.36, -1213.9, 476.799, 2.17357), +(22976, 469, -7564.18, -1240.31, 476.799, 2.17357), +(22977, 469, -7550.29, -1260.5, 476.799, 2.17357); + +UPDATE creature_template SET InhabitType=7 WHERE entry=11583; + +-- Add missing go spawns + +-- doors +SET @OGUID = 7226; -- 7230 +DELETE FROM gameobject WHERE guid BETWEEN @OGUID AND @OGUID+4; +INSERT INTO gameobject (guid, id, map, position_x, position_y, position_z, orientation, rotation2, rotation3, spawntimesecs, state) VALUES +(@OGUID , 181125, 469, -7488.35, -1150.67, 476.534, 0.674574, 0.330928, 0.943656, 300, 1), +(@OGUID+1, 185483, 469, -7455.08, -1051.84, 476.556, 2.17155, 0.884665, 0.466227, 300, 1), +(@OGUID+2, 180424, 469, -7565.34, -1029.19, 449.142, 3.75568, 0.953231, -0.302244, 300, 1), +(@OGUID+3, 175185, 469, -7520.27, -972.05, 423.429, 5.32599, 0.460536, -0.887641, 300, 1), +(@OGUID+4, 175946, 469, -7552.26, -1022.92, 408.491, 3.75109, 0.953922, -0.300053, 300, 1); +-- SELECT * FROM gameobject where id IN(181125,185483,180424,175185,175946); + +SET @OGUID := 56158; +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID+0 AND @OGUID+19; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 179121, 469, 1, 1, -7683.71, -1052.777, 440.6431, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+1, 179122, 469, 1, 1, -7691.453, -1040.233, 440.6851, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+2, 153723, 469, 1, 1, -7752.402, -1155.65, 396.6956, 3.33359, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+3, 179148, 469, 1, 1, -7510.984, -1094.69, 476.5545, 5.340709, 0, 0, 0, 1, 7200, 255, 1), +(@OGUID+4, 149045, 469, 1, 1, -6904.809, -1206.778, 178.5116, 2.984498, 0, 0, 1, -4.371139E-08, 7200, 255, 24), +(@OGUID+5, 149046, 469, 1, 1, -6900.417, -1339.326, 239.6519, 3.394674, 0, 0, 1, -4.371139E-08, 7200, 255, 24), +(@OGUID+6, 161536, 469, 1, 1, -6756.733, -1166.698, 187.0418, 1.317723, 0, 0, 0.9969173, -0.07845917, 7200, 255, 1), +(@OGUID+7, 179113, 469, 1, 1, -7629.542, -1017.326, 413.3823, 6.06502, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+8, 179112, 469, 1, 1, -7628.558, -1012.672, 413.3823, 5.750863, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+9, 179114, 469, 1, 1, -7627.558, -1009.027, 413.3823, 5.366888, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+10, 179111, 469, 1, 1, -7623.486, -1009.636, 413.3823, 4.89565, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+11, 179110, 469, 1, 1, -7618.736, -1009.88, 413.3823, 4.651303, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+12, 180632, 469, 1, 1, -7554.886, -1039.864, 449.2131, 2.967041, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+13, 180631, 469, 1, 1, -7545.932, -978.4827, 449.2131, 2.967041, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+14, 179106, 469, 1, 1, -7468.113, -1047.162, 411.971, 0.6108655, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+15, 179105, 469, 1, 1, -7466.616, -1042.562, 411.9711, 2.18166, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+16, 179104, 469, 1, 1, -7464.983, -1041.419, 411.9711, 2.18166, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+17, 179108, 469, 1, 1, -7464.785, -1048.651, 411.971, 2.18166, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+18, 179107, 469, 1, 1, -7459.672, -1041.251, 411.971, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), +(@OGUID+19, 179109, 469, 1, 1, -7459.427, -1044.899, 411.971, 2.18166, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1); + +-- eggs for razorgore +SET @OGUID := 74165; -- 74181 +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+29; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 177807, 469, 1, 1, -7549.479, -1069.964, 408.4904, 5.759587, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+1, 177807, 469, 1, 1, -7554.418, -1061.5, 408.4904, 3.996807, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+2, 177807, 469, 1, 1, -7563.152, -1088.705, 413.3812, 5.829401, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+3, 177807, 469, 1, 1, -7564.887, -1058.87, 408.4904, 2.286379, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+4, 177807, 469, 1, 1, -7566.002, -1045.929, 408.4904, 3.054327, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+5, 177807, 469, 1, 1, -7568.273, -1097.68, 413.3809, 2.792518, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+6, 177807, 469, 1, 1, -7568.621, -1086.578, 413.3812, 0.8552105, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+7, 177807, 469, 1, 1, -7569.38, -1079.727, 413.3812, 3.595379, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+8, 177807, 469, 1, 1, -7572.491, -1095.034, 413.3812, 3.42085, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+9, 177807, 469, 1, 1, -7576.924, -1083.691, 413.3812, 3.38594, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+10, 177807, 469, 1, 1, -7577.844, -1035.97, 408.4904, 5.166176, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+11, 177807, 469, 1, 1, -7578.64, -1089.948, 413.3812, 2.216565, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+12, 177807, 469, 1, 1, -7579.486, -1051.485, 408.1571, 0.523598, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+13, 177807, 469, 1, 1, -7580.799, -1067.292, 408.4904, 3.298687, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+14, 177807, 469, 1, 1, -7584.68, -1075.842, 408.4904, 3.019413, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+15, 177807, 469, 1, 1, -7586.365, -1024.429, 408.4904, 3.351047, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+16, 177807, 469, 1, 1, -7588.843, -1053.786, 408.1571, 4.555311, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+17, 177807, 469, 1, 1, -7592.354, -1010.842, 408.4904, 3.735006, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+18, 177807, 469, 1, 1, -7592.379, -1035.677, 408.1571, 1.623156, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+19, 177807, 469, 1, 1, -7594.374, -1102.896, 408.4904, 5.375615, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+20, 177807, 469, 1, 1, -7597.528, -1094.538, 408.4904, 2.373644, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+21, 177807, 469, 1, 1, -7598.997, -1044.769, 408.1571, 5.253442, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+22, 177807, 469, 1, 1, -7601.142, -1077.111, 408.2178, 5.009095, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+23, 177807, 469, 1, 1, -7604.356, -1060.245, 408.1571, 3.508117, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+24, 177807, 469, 1, 1, -7609.944, -1035.106, 408.4904, 4.34587, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+25, 177807, 469, 1, 1, -7611.604, -1020.322, 413.3812, 3.089183, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+26, 177807, 469, 1, 1, -7618.098, -1069.328, 408.4904, 4.956738, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+27, 177807, 469, 1, 1, -7619.756, -1058.941, 408.4904, 1.815142, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+28, 177807, 469, 1, 1, -7626.688, -1011.714, 413.3809, 0.2268925, 0, 0, 0, 1, 7200, 255, 1), -- Black Dragon Egg (Area: 0) +(@OGUID+29, 177807, 469, 1, 1, -7628.317, -1044.573, 408.4904, 6.108654, 0, 0, 0, 1, 7200, 255, 1); -- Black Dragon Egg (Area: 0) +-- SELECT * FROM gameobject where id IN(177807); + +SET @OGUID := 75120; -- 75157 +DELETE FROM `gameobject` WHERE `guid` BETWEEN @OGUID AND @OGUID+45; +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@OGUID+0, 179784, 469, 1, 1, -7572.59, -1062.572, 449.1642, 0.5410506, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+1, 179784, 469, 1, 1, -7593.775, -1063.449, 449.1642, 0.4712385, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+2, 179784, 469, 1, 1, -7595.269, -1030.421, 449.1642, 0.3141584, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+3, 179784, 469, 1, 1, -7595.774, -1080.002, 449.1642, 0.5585039, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+4, 179784, 469, 1, 1, -7605.952, -1045.063, 449.1642, 0.6457717, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+5, 179784, 469, 1, 1, -7609.894, -1061.456, 449.1642, 0.4188786, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+6, 179784, 469, 1, 1, -7616.209, -997.0844, 440.2823, 0.2094394, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+7, 179784, 469, 1, 1, -7619.151, -1047.152, 449.1642, 0.5061446, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+8, 179784, 469, 1, 1, -7620.089, -1075.735, 449.1642, 0.4712385, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+9, 179784, 469, 1, 1, -7626.954, -981.3593, 440.0226, 0.157079, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+10, 179784, 469, 1, 1, -7627.983, -1095.305, 449.1642, 0.5410506, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+11, 179784, 469, 1, 1, -7629.779, -1061.484, 449.1642, 0.6283169, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+12, 179784, 469, 1, 1, -7630.286, -1005.49, 440.2624, 0.4014249, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+13, 179784, 469, 1, 1, -7637.638, -965.0227, 440.2754, 0.01745246, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+14, 179784, 469, 1, 1, -7637.933, -1081.127, 449.1642, 0.453785, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+15, 179784, 469, 1, 1, -7640.291, -991.3019, 440.2628, 0.453785, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+16, 179784, 469, 1, 1, -7642.733, -1015.651, 440.2449, 0.4712385, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+17, 179784, 469, 1, 1, -7647.777, -1066.966, 449.1642, 0.5585039, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+18, 179784, 469, 1, 1, -7650.901, -975.7917, 440.2633, 0.2268925, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+19, 179784, 469, 1, 1, -7651.322, -1103.534, 449.1642, 0.523598, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+20, 179784, 469, 1, 1, -7653.694, -999.9188, 439.9861, 0.5061446, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+21, 179784, 469, 1, 1, -7656.672, -1024.323, 440.2567, 0.5061446, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+22, 179784, 469, 1, 1, -7663.989, -1084.885, 449.1642, 0.6283169, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+23, 179784, 469, 1, 1, -7664.824, -984.0574, 440.2471, 0.3141584, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+24, 179784, 469, 1, 1, -7665.261, -1113.61, 449.1642, 0.523598, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+25, 179784, 469, 1, 1, -7667.542, -1008.341, 440.2592, 0.523598, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+26, 179784, 469, 1, 1, -7669.463, -1034.205, 440.244, 0.5410506, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+27, 179784, 469, 1, 1, -7677.631, -994.4258, 440.2595, 0.383971, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+28, 179784, 469, 1, 1, -7677.684, -1095.238, 449.1351, 0.6283169, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+29, 179784, 469, 1, 1, -7680.108, -1123.294, 449.1051, 0.523598, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+30, 179784, 469, 1, 1, -7680.508, -1018.701, 439.9826, 0.5585039, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+31, 179784, 469, 1, 1, -7686.851, -1047.039, 440.3709, 0.5585039, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+32, 179784, 469, 1, 1, -7691.257, -1002.378, 440.2438, 0.4188786, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+33, 179784, 469, 1, 1, -7691.966, -1105.405, 449.13, 0.6283169, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+34, 179784, 469, 1, 1, -7699.204, -1030.978, 440.5882, 0.5585039, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+35, 179784, 469, 1, 1, -7709.169, -1017.005, 440.4458, 0.4712385, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+36, 179784, 469, 1, 1, -7713.143, -1060.038, 445.1762, 5.096362, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+37, 179784, 469, 1, 1, -7716.096, -1077.452, 445.1762, 0.8726639, 0, 0, 0, 1, 7200, 255, 1), -- Suppression Device (Area: 0) +(@OGUID+38, 176964, 469, 1, 1, -7639.43, -1083.943, 408.5284, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 0), -- Portcullis (Area: 0) +(@OGUID+39, 179365, 469, 1, 1, -7568.426, -1031.59, 449.1086, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), -- Portcullis (Area: 0) +(@OGUID+40, 176965, 469, 1, 1, -7552.37, -1022.984, 408.5284, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), -- Portcullis (Area: 0) +(@OGUID+41, 179116, 469, 1, 1, -7506.288, -1043.155, 480.03, 0.6108655, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), -- Portcullis (Area: 0) +(@OGUID+42, 176966, 469, 1, 1, -7488.173, -1150.542, 476.712, 0.6108655, 0, 0, 0.9537169, -0.3007059, 7200, 255, 0), -- Portcullis (Area: 0) +(@OGUID+43, 179364, 469, 1, 1, -7531.224, -956.4108, 428.2516, 5.323256, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), -- Portcullis (Area: 0) +(@OGUID+44, 179117, 469, 1, 1, -7464, -1103.549, 480.03, 0.6108655, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), -- Portcullis (Area: 0) +(@OGUID+45, 179115, 469, 1, 1, -7455.243, -1051.711, 480.03, 2.18166, 0, 0, 0.9537169, -0.3007059, 7200, 255, 0); -- Portcullis (Area: 0) diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index b240100f642..f5cb3aea4c0 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -127,17 +127,17 @@ void AddSC_boss_gyth(); void AddSC_boss_rend_blackhand(); void AddSC_instance_blackrock_spire(); void AddSC_boss_razorgore(); //Blackwing lair -void AddSC_boss_vael(); +void AddSC_boss_vaelastrasz(); void AddSC_boss_broodlord(); void AddSC_boss_firemaw(); void AddSC_boss_ebonroc(); void AddSC_boss_flamegor(); void AddSC_boss_chromaggus(); void AddSC_boss_nefarian(); -void AddSC_boss_victor_nefarius(); -void AddSC_boss_mr_smite(); +void AddSC_instance_blackwing_lair(); void AddSC_deadmines(); //Deadmines void AddSC_instance_deadmines(); +void AddSC_boss_mr_smite(); void AddSC_gnomeregan(); //Gnomeregan void AddSC_instance_gnomeregan(); void AddSC_boss_attumen(); //Karazhan @@ -769,16 +769,16 @@ void AddEasternKingdomsScripts() AddSC_boss_rend_blackhand(); AddSC_instance_blackrock_spire(); AddSC_boss_razorgore(); //Blackwing lair - AddSC_boss_vael(); + AddSC_boss_vaelastrasz(); AddSC_boss_broodlord(); AddSC_boss_firemaw(); AddSC_boss_ebonroc(); AddSC_boss_flamegor(); AddSC_boss_chromaggus(); AddSC_boss_nefarian(); - AddSC_boss_victor_nefarius(); - AddSC_boss_mr_smite(); + AddSC_instance_blackwing_lair(); AddSC_deadmines(); //Deadmines + AddSC_boss_mr_smite(); AddSC_instance_deadmines(); AddSC_gnomeregan(); //Gnomeregan AddSC_instance_gnomeregan(); diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h b/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h new file mode 100644 index 00000000000..acdbf0cd483 --- /dev/null +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/blackwing_lair.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * 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, see . + */ + +#ifndef DEF_BLACKWING_LAIR_H +#define DEF_BLACKWING_LAIR_H + +uint32 const EncounterCount = 8; + +#define BRLScriptName "instance_blackwing_lair" + +enum BWLEncounter +{ + BOSS_RAZORGORE = 0, + BOSS_VAELASTRAZ = 1, + BOSS_BROODLORD = 2, + BOSS_FIREMAW = 3, + BOSS_EBONROC = 4, + BOSS_FLAMEGOR = 5, + BOSS_CHROMAGGUS = 6, + BOSS_NEFARIAN = 7 +}; + +enum CreatureIds +{ + NPC_RAZORGORE = 12435, + NPC_BLACKWING_DRAGON = 12422, + NPC_BLACKWING_TASKMASTER = 12458, + NPC_BLACKWING_LEGIONAIRE = 12416, + NPC_BLACKWING_WARLOCK = 12459, + NPC_VAELASTRAZ = 13020, + NPC_BROODLORD = 12017, + NPC_FIRENAW = 11983, + NPC_EBONROC = 14601, + NPC_FLAMEGOR = 11981, + NPC_CHROMAGGUS = 14020, + NPC_VICTOR_NEFARIUS = 10162, + NPC_NEFARIAN = 11583 +}; + +enum BWLData64 +{ + DATA_RAZORGORE_THE_UNTAMED = 1, + DATA_VAELASTRAZ_THE_CORRUPT, + DATA_BROODLORD_LASHLAYER, + DATA_FIRENAW, + DATA_EBONROC, + DATA_FLAMEGOR, + DATA_CHROMAGGUS, + DATA_LORD_VICTOR_NEFARIUS, + DATA_NEFARIAN +}; + +enum BWLEvents +{ + EVENT_RAZOR_SPAWN = 1, + EVENT_RAZOR_PHASE_TWO = 2, + EVENT_RESPAWN_NEFARIUS = 3 +}; + +enum BWLMisc +{ + // Razorgore Egg Event + ACTION_PHASE_TWO = 1, + DATA_EGG_EVENT +}; + +#endif \ No newline at end of file diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp index 5c05d365e00..d4a9d81fdb0 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -16,36 +16,31 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Broodlord_Lashlayer -SD%Complete: 100 -SDComment: -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" enum Say { SAY_AGGRO = 0, - SAY_LEASH = 1, + SAY_LEASH = 1 }; -enum Events +enum Spells { - EVENT_CLEAVE = 1, - EVENT_MORTAL_STRIKE = 2, - EVENT_BLAST_WAVE = 3, - EVENT_KNOCK_BACK = 4, + SPELL_CLEAVE = 26350, + SPELL_BLASTWAVE = 23331, + SPELL_MORTALSTRIKE = 24573, + SPELL_KNOCKBACK = 25778 }; -enum Spells +enum Events { - SPELL_CLEAVE = 26350, - SPELL_BLAST_WAVE = 23331, - SPELL_MORTAL_STRIKE = 24573, - SPELL_KNOCK_BACK = 25778 + EVENT_CLEAVE = 1, + EVENT_BLASTWAVE = 2, + EVENT_MORTALSTRIKE = 3, + EVENT_KNOCKBACK = 4, + EVENT_CHECK = 5 }; class boss_broodlord : public CreatureScript @@ -53,28 +48,26 @@ class boss_broodlord : public CreatureScript public: boss_broodlord() : CreatureScript("boss_broodlord") { } - CreatureAI* GetAI(Creature* creature) const - { - return new boss_broodlordAI (creature); - } - - struct boss_broodlordAI : public ScriptedAI + struct boss_broodlordAI : public BossAI { - boss_broodlordAI(Creature* creature) : ScriptedAI(creature) {} - - void Reset() - { - // These timers are probably wrong - events.ScheduleEvent(EVENT_CLEAVE, 8000); - events.ScheduleEvent(EVENT_BLAST_WAVE, 12000); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, 20000); - events.ScheduleEvent(EVENT_KNOCK_BACK, 30000); - } + boss_broodlordAI(Creature* creature) : BossAI(creature, BOSS_BROODLORD) { } void EnterCombat(Unit* /*who*/) { + if (instance->GetBossState(BOSS_VAELASTRAZ) != DONE) + { + EnterEvadeMode(); + return; + } + + _EnterCombat(); Talk(SAY_AGGRO); - DoZoneInCombat(); + + events.ScheduleEvent(EVENT_CLEAVE, 8000); + events.ScheduleEvent(EVENT_BLASTWAVE, 12000); + events.ScheduleEvent(EVENT_MORTALSTRIKE, 20000); + events.ScheduleEvent(EVENT_KNOCKBACK, 30000); + events.ScheduleEvent(EVENT_CHECK, 1000); } void UpdateAI(uint32 diff) @@ -82,11 +75,7 @@ public: if (!UpdateVictim()) return; - if (EnterEvadeIfOutOfCombatArea(diff)) - Talk(SAY_LEASH); - - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; + events.Update(diff); while (uint32 eventId = events.ExecuteEvent()) { @@ -94,40 +83,41 @@ public: { case EVENT_CLEAVE: DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 8000); + events.ScheduleEvent(EVENT_CLEAVE, 7000); + break; + case EVENT_BLASTWAVE: + DoCastVictim(SPELL_BLASTWAVE); + events.ScheduleEvent(EVENT_BLASTWAVE, urand(8000, 16000)); break; - case EVENT_MORTAL_STRIKE: - DoCastVictim(SPELL_MORTAL_STRIKE); - events.ScheduleEvent(EVENT_MORTAL_STRIKE, 20000); + case EVENT_MORTALSTRIKE: + DoCastVictim(SPELL_MORTALSTRIKE); + events.ScheduleEvent(EVENT_MORTALSTRIKE, urand(25000, 35000)); break; - case EVENT_BLAST_WAVE: - DoCastVictim(SPELL_BLAST_WAVE); - events.ScheduleEvent(EVENT_BLAST_WAVE, 12000); + case EVENT_KNOCKBACK: + DoCastVictim(SPELL_KNOCKBACK); + if (DoGetThreat(me->GetVictim())) + DoModifyThreatPercent(me->GetVictim(), -50); + events.ScheduleEvent(EVENT_KNOCKBACK, urand(15000, 30000)); break; - case EVENT_KNOCK_BACK: - if (Unit* target = me->GetVictim()) + case EVENT_CHECK: + if (me->GetDistance(me->GetHomePosition()) > 150.0f) { - DoCast(target, SPELL_BLAST_WAVE); - // Drop 50% of threat - if (DoGetThreat(target)) - DoModifyThreatPercent(target, -50); + Talk(SAY_LEASH); + EnterEvadeMode(); } - events.ScheduleEvent(EVENT_KNOCK_BACK, 30000); - break; - default: + events.ScheduleEvent(EVENT_CHECK, 1000); break; } } - if (EnterEvadeIfOutOfCombatArea(diff)) - Talk(SAY_LEASH); - DoMeleeAttackIfReady(); } - - private: - EventMap events; /// @todo: change BWL to instance script and bosses to BossAI }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_broodlordAI (creature); + } }; void AddSC_boss_broodlord() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp index 9698d8c147f..ff3a5291dcd 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_chromaggus.cpp @@ -16,15 +16,9 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Chromaggus -SD%Complete: 95 -SDComment: Chromatic Mutation disabled due to lack of core support -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" enum Emotes { @@ -34,22 +28,22 @@ enum Emotes enum Spells { - //These spells are actually called elemental shield - //What they do is decrease all damage by 75% then they increase - //One school of damage by 1100% + // These spells are actually called elemental shield + // What they do is decrease all damage by 75% then they increase + // One school of damage by 1100% SPELL_FIRE_VULNERABILITY = 22277, SPELL_FROST_VULNERABILITY = 22278, SPELL_SHADOW_VULNERABILITY = 22279, SPELL_NATURE_VULNERABILITY = 22280, SPELL_ARCANE_VULNERABILITY = 22281, - //Other spells + // Other spells SPELL_INCINERATE = 23308, //Incinerate 23308, 23309 SPELL_TIMELAPSE = 23310, //Time lapse 23310, 23311(old threat mod that was removed in 2.01) SPELL_CORROSIVEACID = 23313, //Corrosive Acid 23313, 23314 SPELL_IGNITEFLESH = 23315, //Ignite Flesh 23315, 23316 SPELL_FROSTBURN = 23187, //Frost burn 23187, 23189 - //Brood Affliction 23173 - Scripted Spell that cycles through all targets within 100 yards and has a chance to cast one of the afflictions on them - //Since Scripted spells arn't coded I'll just write a function that does the same thing + // Brood Affliction 23173 - Scripted Spell that cycles through all targets within 100 yards and has a chance to cast one of the afflictions on them + // Since Scripted spells arn't coded I'll just write a function that does the same thing SPELL_BROODAF_BLUE = 23153, //Blue affliction 23153 SPELL_BROODAF_BLACK = 23154, //Black affliction 23154 SPELL_BROODAF_RED = 23155, //Red affliction 23155 (23168 on death) @@ -60,27 +54,31 @@ enum Spells SPELL_ENRAGE = 28747 }; +enum Events +{ + EVENT_SHIMMER = 1, + EVENT_BREATH_1 = 2, + EVENT_BREATH_2 = 3, + EVENT_AFFLICTION = 4, + EVENT_FRENZY = 5 +}; + class boss_chromaggus : public CreatureScript { public: boss_chromaggus() : CreatureScript("boss_chromaggus") { } - CreatureAI* GetAI(Creature* creature) const + struct boss_chromaggusAI : public BossAI { - return new boss_chromaggusAI (creature); - } - - struct boss_chromaggusAI : public ScriptedAI - { - boss_chromaggusAI(Creature* creature) : ScriptedAI(creature) + boss_chromaggusAI(Creature* creature) : BossAI(creature, BOSS_CHROMAGGUS) { - //Select the 2 breaths that we are going to use until despawned - //5 possiblities for the first breath, 4 for the second, 20 total possiblites - //This way we don't end up casting 2 of the same breath - //TL TL would be stupid + // Select the 2 breaths that we are going to use until despawned + // 5 possiblities for the first breath, 4 for the second, 20 total possiblites + // This way we don't end up casting 2 of the same breath + // TL TL would be stupid switch (urand(0, 19)) { - //B1 - Incin + // B1 - Incin case 0: Breath1_Spell = SPELL_INCINERATE; Breath2_Spell = SPELL_TIMELAPSE; @@ -98,7 +96,7 @@ public: Breath2_Spell = SPELL_FROSTBURN; break; - //B1 - TL + // B1 - TL case 4: Breath1_Spell = SPELL_TIMELAPSE; Breath2_Spell = SPELL_INCINERATE; @@ -174,117 +172,97 @@ public: EnterEvadeMode(); } - uint32 Breath1_Spell; - uint32 Breath2_Spell; - uint32 CurrentVurln_Spell; - - uint32 Shimmer_Timer; - uint32 Breath1_Timer; - uint32 Breath2_Timer; - uint32 Affliction_Timer; - uint32 Frenzy_Timer; - bool Enraged; - void Reset() { - CurrentVurln_Spell = 0; //We use this to store our last vulnerabilty spell so we can remove it later - - Shimmer_Timer = 0; //Time till we change vurlnerabilites - Breath1_Timer = 30000; //First breath is 30 seconds - Breath2_Timer = 60000; //Second is 1 minute so that we can alternate - Affliction_Timer = 10000; //This is special - 5 seconds means that we cast this on 1 player every 5 sconds - Frenzy_Timer = 15000; + _Reset(); + CurrentVurln_Spell = 0; // We use this to store our last vulnerabilty spell so we can remove it later Enraged = false; } - void EnterCombat(Unit* /*who*/) {} + void EnterCombat(Unit* /*who*/) + { + if (instance && instance->GetBossState(BOSS_FLAMEGOR) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHIMMER, 0); + events.ScheduleEvent(EVENT_BREATH_1, 30000); + events.ScheduleEvent(EVENT_BREATH_2, 60000); + events.ScheduleEvent(EVENT_AFFLICTION, 10000); + events.ScheduleEvent(EVENT_FRENZY, 15000); + } void UpdateAI(uint32 diff) { if (!UpdateVictim()) return; - //Shimmer_Timer Timer - if (Shimmer_Timer <= diff) - { - //Remove old vulnerabilty spell - if (CurrentVurln_Spell) - me->RemoveAurasDueToSpell(CurrentVurln_Spell); - - //Cast new random vulnerabilty on self - uint32 spell = RAND(SPELL_FIRE_VULNERABILITY, SPELL_FROST_VULNERABILITY, - SPELL_SHADOW_VULNERABILITY, SPELL_NATURE_VULNERABILITY, SPELL_ARCANE_VULNERABILITY); - - DoCast(me, spell); - CurrentVurln_Spell = spell; + events.Update(diff); - Talk(EMOTE_SHIMMER); - Shimmer_Timer = 45000; - } else Shimmer_Timer -= diff; - - //Breath1_Timer - if (Breath1_Timer <= diff) - { - DoCastVictim(Breath1_Spell); - Breath1_Timer = 60000; - } else Breath1_Timer -= diff; - - //Breath2_Timer - if (Breath2_Timer <= diff) - { - DoCastVictim(Breath2_Spell); - Breath2_Timer = 60000; - } else Breath2_Timer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - //Affliction_Timer - if (Affliction_Timer <= diff) + while (uint32 eventId = events.ExecuteEvent()) { - ThreatContainer::StorageType threatlist = me->getThreatManager().getThreatList(); - for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i) + switch (eventId) { - if ((*i) && (*i)->GetSource()) - { - if (Unit* unit = Unit::GetUnit(*me, (*i)->getUnitGuid())) + case EVENT_SHIMMER: { - //Cast affliction - DoCast(unit, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, - SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN), true); - - //Chromatic mutation if target is effected by all afflictions - if (unit->HasAura(SPELL_BROODAF_BLUE) - && unit->HasAura(SPELL_BROODAF_BLACK) - && unit->HasAura(SPELL_BROODAF_RED) - && unit->HasAura(SPELL_BROODAF_BRONZE) - && unit->HasAura(SPELL_BROODAF_GREEN)) + // Remove old vulnerabilty spell + if (CurrentVurln_Spell) + me->RemoveAurasDueToSpell(CurrentVurln_Spell); + + // Cast new random vulnerabilty on self + uint32 spell = RAND(SPELL_FIRE_VULNERABILITY, SPELL_FROST_VULNERABILITY, SPELL_SHADOW_VULNERABILITY, SPELL_NATURE_VULNERABILITY, SPELL_ARCANE_VULNERABILITY); + DoCast(me, spell); + CurrentVurln_Spell = spell; + Talk(EMOTE_SHIMMER); + events.ScheduleEvent(EVENT_SHIMMER, 45000); + break; + } + case EVENT_BREATH_1: + DoCastVictim(Breath1_Spell); + events.ScheduleEvent(EVENT_BREATH_1, 60000); + break; + case EVENT_BREATH_2: + DoCastVictim(Breath2_Spell); + events.ScheduleEvent(EVENT_BREATH_2, 60000); + break; + case EVENT_AFFLICTION: + { + Map::PlayerList const &players = me->GetMap()->GetPlayers(); + for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - //target->RemoveAllAuras(); - //DoCast(target, SPELL_CHROMATIC_MUT_1); - - //Chromatic mutation is causing issues - //Assuming it is caused by a lack of core support for Charm - //So instead we instant kill our target - - //WORKAROUND - if (unit->GetTypeId() == TYPEID_PLAYER) - unit->CastSpell(unit, 5, false); + if (Player* player = itr->GetSource()->ToPlayer()) + { + DoCast(player, RAND(SPELL_BROODAF_BLUE, SPELL_BROODAF_BLACK, SPELL_BROODAF_RED, SPELL_BROODAF_BRONZE, SPELL_BROODAF_GREEN), true); + + if (player->HasAura(SPELL_BROODAF_BLUE) && + player->HasAura(SPELL_BROODAF_BLACK) && + player->HasAura(SPELL_BROODAF_RED) && + player->HasAura(SPELL_BROODAF_BRONZE) && + player->HasAura(SPELL_BROODAF_GREEN)) + { + DoCast(player, SPELL_CHROMATIC_MUT_1); + } + + } } } - } + events.ScheduleEvent(EVENT_AFFLICTION, 10000); + break; + case EVENT_FRENZY: + DoCast(me, SPELL_FRENZY); + events.ScheduleEvent(EVENT_FRENZY, urand(10000, 15000)); + break; } + } - Affliction_Timer = 10000; - } else Affliction_Timer -= diff; - - //Frenzy_Timer - if (Frenzy_Timer <= diff) - { - DoCast(me, SPELL_FRENZY); - Talk(EMOTE_FRENZY); - Frenzy_Timer = urand(10000, 15000); - } else Frenzy_Timer -= diff; - - //Enrage if not already enraged and below 20% + // Enrage if not already enraged and below 20% if (!Enraged && HealthBelowPct(20)) { DoCast(me, SPELL_ENRAGE); @@ -293,10 +271,21 @@ public: DoMeleeAttackIfReady(); } + + private: + uint32 Breath1_Spell; + uint32 Breath2_Spell; + uint32 CurrentVurln_Spell; + bool Enraged; }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_chromaggusAI (creature); + } }; void AddSC_boss_chromaggus() { new boss_chromaggus(); -} +} \ No newline at end of file diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp index 04b99c76105..7d21825851a 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_ebonroc.cpp @@ -16,54 +16,45 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Ebonroc -SD%Complete: 50 -SDComment: Shadow of Ebonroc needs core support -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" + +enum Spells +{ + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_SHADOWOFEBONROC = 23340 +}; -#define SPELL_SHADOWFLAME 22539 -#define SPELL_WINGBUFFET 23339 -#define SPELL_SHADOWOFEBONROC 23340 -#define SPELL_HEAL 41386 //The Heal spell of his Shadow -#define SPELL_THRASH 3391 +enum Events +{ + EVENT_SHADOWFLAME = 1, + EVENT_WINGBUFFET = 2, + EVENT_SHADOWOFEBONROC = 3 +}; class boss_ebonroc : public CreatureScript { public: boss_ebonroc() : CreatureScript("boss_ebonroc") { } - CreatureAI* GetAI(Creature* creature) const - { - return new boss_ebonrocAI (creature); - } - - struct boss_ebonrocAI : public ScriptedAI + struct boss_ebonrocAI : public BossAI { - boss_ebonrocAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowFlame_Timer; - uint32 WingBuffet_Timer; - uint32 ShadowOfEbonroc_Timer; - uint32 Heal_Timer; - uint32 Thrash_Timer; - - void Reset() - { - ShadowFlame_Timer = 15000; //These times are probably wrong - WingBuffet_Timer = 30000; - ShadowOfEbonroc_Timer = 45000; - Heal_Timer = 1000; - Thrash_Timer = 10000; - } + boss_ebonrocAI(Creature* creature) : BossAI(creature, BOSS_EBONROC) { } void EnterCombat(Unit* /*who*/) { - DoZoneInCombat(); + if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); } void UpdateAI(uint32 diff) @@ -71,46 +62,38 @@ public: if (!UpdateVictim()) return; - //Shadowflame Timer - if (ShadowFlame_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWFLAME); - ShadowFlame_Timer = urand(12000, 15000); - } else ShadowFlame_Timer -= diff; - - //Thrash Timer - if (Thrash_Timer <= diff) - { - DoCastVictim(SPELL_THRASH); - Thrash_Timer = urand(10000, 15000); - } else Thrash_Timer -= diff; - - //Wing Buffet Timer - if (WingBuffet_Timer <= diff) - { - DoCastVictim(SPELL_WINGBUFFET); - WingBuffet_Timer = 25000; - } else WingBuffet_Timer -= diff; + events.Update(diff); - //Shadow of Ebonroc Timer - if (ShadowOfEbonroc_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWOFEBONROC); - ShadowOfEbonroc_Timer = urand(25000, 350000); - } else ShadowOfEbonroc_Timer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_SHADOWOFEBONROC)) + while (uint32 eventId = events.ExecuteEvent()) { - if (Heal_Timer <= diff) + switch (eventId) { - DoCast(me, SPELL_HEAL); - Heal_Timer = urand(1000, 3000); - } else Heal_Timer -= diff; + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + break; + case EVENT_WINGBUFFET: + DoCastVictim(SPELL_WINGBUFFET); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + break; + case EVENT_SHADOWOFEBONROC: + DoCastVictim(SPELL_SHADOWOFEBONROC); + events.ScheduleEvent(EVENT_SHADOWOFEBONROC, urand(8000, 10000)); + break; + } } DoMeleeAttackIfReady(); } }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_ebonrocAI (creature); + } }; void AddSC_boss_ebonroc() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp index 60564ea1acb..b32db2be450 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_firemaw.cpp @@ -16,48 +16,45 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Firemaw -SD%Complete: 100 -SDComment: -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" -#define SPELL_SHADOWFLAME 22539 -#define SPELL_WINGBUFFET 23339 -#define SPELL_FLAMEBUFFET 23341 +enum Spells +{ + SPELL_SHADOWFLAME = 22539, + SPELL_WINGBUFFET = 23339, + SPELL_FLAMEBUFFET = 23341 +}; + +enum Events +{ + EVENT_SHADOWFLAME = 1, + EVENT_WINGBUFFET = 2, + EVENT_FLAMEBUFFET = 3 +}; class boss_firemaw : public CreatureScript { public: boss_firemaw() : CreatureScript("boss_firemaw") { } - CreatureAI* GetAI(Creature* creature) const - { - return new boss_firemawAI (creature); - } - - struct boss_firemawAI : public ScriptedAI + struct boss_firemawAI : public BossAI { - boss_firemawAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowFlame_Timer; - uint32 WingBuffet_Timer; - uint32 FlameBuffet_Timer; - - void Reset() - { - ShadowFlame_Timer = 30000; //These times are probably wrong - WingBuffet_Timer = 24000; - FlameBuffet_Timer = 5000; - } + boss_firemawAI(Creature* creature) : BossAI(creature, BOSS_FIREMAW) { } void EnterCombat(Unit* /*who*/) { - DoZoneInCombat(); + if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); } void UpdateAI(uint32 diff) @@ -65,35 +62,40 @@ public: if (!UpdateVictim()) return; - //ShadowFlame_Timer - if (ShadowFlame_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWFLAME); - ShadowFlame_Timer = urand(15000, 18000); - } else ShadowFlame_Timer -= diff; + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - //WingBuffet_Timer - if (WingBuffet_Timer <= diff) + while (uint32 eventId = events.ExecuteEvent()) { - if (Unit* target = me->GetVictim()) + switch (eventId) { - DoCast(target, SPELL_WINGBUFFET); - if (DoGetThreat(target)) - DoModifyThreatPercent(target, -75); + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + break; + case EVENT_WINGBUFFET: + DoCastVictim(SPELL_WINGBUFFET); + if (DoGetThreat(me->GetVictim())) + DoModifyThreatPercent(me->GetVictim(), -75); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + break; + case EVENT_FLAMEBUFFET: + DoCastVictim(SPELL_FLAMEBUFFET); + events.ScheduleEvent(EVENT_FLAMEBUFFET, 5000); + break; } - WingBuffet_Timer = 25000; - } else WingBuffet_Timer -= diff; - - //FlameBuffet_Timer - if (FlameBuffet_Timer <= diff) - { - DoCastVictim(SPELL_FLAMEBUFFET); - FlameBuffet_Timer = 5000; - } else FlameBuffet_Timer -= diff; + } DoMeleeAttackIfReady(); } }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_firemawAI (creature); + } }; void AddSC_boss_firemaw() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp index 5035c1e9c89..f5a3cd3e45f 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_flamegor.cpp @@ -16,15 +16,9 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Flamegor -SD%Complete: 100 -SDComment: -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" enum Emotes { @@ -35,7 +29,14 @@ enum Spells { SPELL_SHADOWFLAME = 22539, SPELL_WINGBUFFET = 23339, - SPELL_FRENZY = 23342 //This spell periodically triggers fire nova + SPELL_FRENZY = 23342 //This spell periodically triggers fire nova +}; + +enum Events +{ + EVENT_SHADOWFLAME = 1, + EVENT_WINGBUFFET = 2, + EVENT_FRENZY = 3 }; class boss_flamegor : public CreatureScript @@ -43,29 +44,22 @@ class boss_flamegor : public CreatureScript public: boss_flamegor() : CreatureScript("boss_flamegor") { } - CreatureAI* GetAI(Creature* creature) const + struct boss_flamegorAI : public BossAI { - return new boss_flamegorAI (creature); - } - - struct boss_flamegorAI : public ScriptedAI - { - boss_flamegorAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowFlame_Timer; - uint32 WingBuffet_Timer; - uint32 Frenzy_Timer; - - void Reset() - { - ShadowFlame_Timer = 21000; //These times are probably wrong - WingBuffet_Timer = 35000; - Frenzy_Timer = 10000; - } + boss_flamegorAI(Creature* creature) : BossAI(creature, BOSS_FLAMEGOR) { } void EnterCombat(Unit* /*who*/) { - DoZoneInCombat(); + if (instance && instance->GetBossState(BOSS_BROODLORD) != DONE) + { + EnterEvadeMode(); + return; + } + _EnterCombat(); + + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + events.ScheduleEvent(EVENT_FRENZY, 10000); } void UpdateAI(uint32 diff) @@ -73,36 +67,41 @@ public: if (!UpdateVictim()) return; - //ShadowFlame_Timer - if (ShadowFlame_Timer <= diff) - { - DoCastVictim(SPELL_SHADOWFLAME); - ShadowFlame_Timer = urand(15000, 22000); - } else ShadowFlame_Timer -= diff; + events.Update(diff); - //WingBuffet_Timer - if (WingBuffet_Timer <= diff) + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) { - if (Unit* target = me->GetVictim()) + switch (eventId) { - DoCast(target, SPELL_WINGBUFFET); - if (DoGetThreat(target)) - DoModifyThreatPercent(target, -75); + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, urand(10000, 20000)); + break; + case EVENT_WINGBUFFET: + DoCastVictim(SPELL_WINGBUFFET); + if (DoGetThreat(me->GetVictim())) + DoModifyThreatPercent(me->GetVictim(), -75); + events.ScheduleEvent(EVENT_WINGBUFFET, 30000); + break; + case EVENT_FRENZY: + Talk(EMOTE_FRENZY); + DoCast(me, SPELL_FRENZY); + events.ScheduleEvent(EVENT_FRENZY, urand(8000, 10000)); + break; } - WingBuffet_Timer = 25000; - } else WingBuffet_Timer -= diff; - - //Frenzy_Timer - if (Frenzy_Timer <= diff) - { - Talk(EMOTE_FRENZY); - DoCast(me, SPELL_FRENZY); - Frenzy_Timer = urand(8000, 10000); - } else Frenzy_Timer -= diff; + } DoMeleeAttackIfReady(); } }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_flamegorAI (creature); + } }; void AddSC_boss_flamegor() diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index 77da6e54df0..1348bc7051f 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -16,225 +16,545 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Nefarian -SD%Complete: 80 -SDComment: Some issues with class calls effecting more than one class -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" +#include "ScriptedGossip.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" +#include "Player.h" + +enum Events +{ + // Victor Nefarius + EVENT_SPAWN_ADD = 1, + EVENT_SHADOW_BOLT = 2, + EVENT_FEAR = 3, + EVENT_MIND_CONTROL = 4, + + // Victor Nefarius UBRS Events + EVENT_PLAYER_CHECK = 5, + EVENT_GYTH_REND_1 = 6, + EVENT_GYTH_REND_2 = 7, + EVENT_GYTH_REND_3 = 8, + EVENT_GYTH_REND_4 = 9, + EVENT_GYTH_REND_5 = 10, + + // Nefarian + EVENT_SHADOWFLAME = 11, + EVENT_VEILOFSHADOW = 12, + EVENT_CLEAVE = 13, + EVENT_TAILLASH = 14, + EVENT_CLASSCALL = 15 +}; + +enum Says +{ + // Victor Nefarius + // UBRS text + SAY_GYTH_REND_1 = 0, + SAY_GYTH_REND_2 = 1, + SAY_GYTH_REND_3 = 2, + SAY_GYTH_REND_4 = 3, + SAY_GYTH_REND_5 = 4, + SAY_GYTH_REND_6 = 5, + SAY_GYTH_REND_7 = 6, + SAY_GYTH_REND_8 = 7, + SAY_GYTH_REND_9 = 8, + SAY_GYTH_REND_10 = 9, + // BWL text + SAY_GAMESBEGIN_1 = 10, + SAY_GAMESBEGIN_2 = 11, + // SAY_VAEL_INTRO = 12, Not used - when he corrupts Vaelastrasz + + // Nefarian + SAY_RANDOM = 0, + SAY_RAISE_SKELETONS = 1, + SAY_SLAY = 2, + SAY_DEATH = 3, + + SAY_MAGE = 4, + SAY_WARRIOR = 5, + SAY_DRUID = 6, + SAY_PRIEST = 7, + SAY_PALADIN = 8, + SAY_SHAMAN = 9, + SAY_WARLOCK = 10, + SAY_HUNTER = 11, + SAY_ROGUE = 12, + SAY_DEATH_KNIGHT = 13 +}; + +enum Gossip +{ + GOSSIP_ID = 21332, +}; -enum Say +enum Creatures { - SAY_RANDOM = 0, - SAY_RAISE_SKELETONS = 1, - SAY_SLAY = 2, - SAY_DEATH = 3, - - SAY_MAGE = 4, - SAY_WARRIOR = 5, - SAY_DRUID = 6, - SAY_PRIEST = 7, - SAY_PALADIN = 8, - SAY_SHAMAN = 9, - SAY_WARLOCK = 10, - SAY_HUNTER = 11, - SAY_ROGUE = 12, + // UBRS + NPC_REND_BLACKHAND = 10429, + // BWL + NPC_BRONZE_DRAKANOID = 14263, + NPC_BLUE_DRAKANOID = 14261, + NPC_RED_DRAKANOID = 14264, + NPC_GREEN_DRAKANOID = 14262, + NPC_BLACK_DRAKANOID = 14265, + NPC_CHROMATIC_DRAKANOID = 14302, + NPC_BONE_CONSTRUCT = 14605 }; enum Spells { - SPELL_SHADOWFLAME_INITIAL = 22972, + // Victor Nefarius + // UBRS Spells + SPELL_CHROMATIC_CHAOS = 16337, // Self Cast hits 10339 + SPELL_VAELASTRASZZ_SPAWN = 16354, // Self Cast Depawn one sec after + // BWL Spells + SPELL_SHADOWBOLT = 22677, + SPELL_SHADOWBOLT_VOLLEY = 22665, + SPELL_SHADOW_COMMAND = 22667, + SPELL_FEAR = 22678, + + SPELL_NEFARIANS_BARRIER = 22663, + + // Nefarian + SPELL_SHADOWFLAME_INITIAL = 22992, SPELL_SHADOWFLAME = 22539, SPELL_BELLOWINGROAR = 22686, SPELL_VEILOFSHADOW = 7068, SPELL_CLEAVE = 20691, SPELL_TAILLASH = 23364, - SPELL_BONECONTRUST = 23363, //23362, 23361 - SPELL_MAGE = 23410, //wild magic - SPELL_WARRIOR = 23397, //beserk + SPELL_MAGE = 23410, // wild magic + SPELL_WARRIOR = 23397, // beserk SPELL_DRUID = 23398, // cat form SPELL_PRIEST = 23401, // corrupted healing - SPELL_PALADIN = 23418, //syphon blessing - SPELL_SHAMAN = 23425, //totems - SPELL_WARLOCK = 23427, //infernals - SPELL_HUNTER = 23436, //bow broke - SPELL_ROGUE = 23414 //Paralise + SPELL_PALADIN = 23418, // syphon blessing + SPELL_SHAMAN = 23425, // totems + SPELL_WARLOCK = 23427, // infernals + SPELL_HUNTER = 23436, // bow broke + SPELL_ROGUE = 23414, // Paralise + SPELL_DEATH_KNIGHT = 49576 // Death Grip }; -class boss_nefarian : public CreatureScript +Position const DrakeSpawnLoc[2] = // drakonid +{ + {-7591.151855f, -1204.051880f, 476.800476f, 3.0f}, + {-7514.598633f, -1150.448853f, 476.796570f, 3.0f} +}; + +Position const NefarianLoc[2] = +{ + {-7449.763672f, -1387.816040f, 526.783691f, 3.0f}, // nefarian spawn + {-7535.456543f, -1279.562500f, 476.798706f, 3.0f} // nefarian move +}; + +uint32 const Entry[5] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; + +class boss_victor_nefarius : public CreatureScript { public: - boss_nefarian() : CreatureScript("boss_nefarian") { } + boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { } - CreatureAI* GetAI(Creature* creature) const + struct boss_victor_nefariusAI : public BossAI { - return new boss_nefarianAI (creature); - } + boss_victor_nefariusAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } - struct boss_nefarianAI : public ScriptedAI - { - boss_nefarianAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 ShadowFlame_Timer; - uint32 BellowingRoar_Timer; - uint32 VeilOfShadow_Timer; - uint32 Cleave_Timer; - uint32 TailLash_Timer; - uint32 ClassCall_Timer; - bool Phase3; + void Reset() + { + if(me->GetMapId() == 229) + { + events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); + } - uint32 DespawnTimer; + if(me->GetMapId() == 469) + { + if (!me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true)) + _Reset(); + SpawnedAdds = 0; + + me->SetVisible(true); + me->SetPhaseMask(1, true); + me->SetUInt32Value(UNIT_NPC_FLAGS, 1); + me->setFaction(35); + me->SetStandState(UNIT_STAND_STATE_SIT_HIGH_CHAIR); + me->RemoveAura(SPELL_NEFARIANS_BARRIER); + } + } - void Reset() + void JustReachedHome() { - ShadowFlame_Timer = 12000; // These times are probably wrong - BellowingRoar_Timer = 30000; - VeilOfShadow_Timer = 15000; - Cleave_Timer = 7000; - TailLash_Timer = 10000; - ClassCall_Timer = 35000; // 35-40 seconds - Phase3 = false; + Reset(); + } - DespawnTimer = 5000; + void BeginEvent(Player* target) + { + _EnterCombat(); + + Talk(SAY_GAMESBEGIN_2); + + me->setFaction(103); + me->SetUInt32Value(UNIT_NPC_FLAGS, 0); + DoCast(me, SPELL_NEFARIANS_BARRIER); + me->SetStandState(UNIT_STAND_STATE_STAND); + AttackStart(target); + events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); + events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); + //events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000)); + events.ScheduleEvent(EVENT_SPAWN_ADD, 10000); } - void KilledUnit(Unit* Victim) + void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) { - if (rand()%5) + if (summon->GetEntry() != NPC_NEFARIAN) + { + summon->UpdateEntry(NPC_BONE_CONSTRUCT); + summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + summon->SetReactState(REACT_PASSIVE); + summon->SetStandState(UNIT_STAND_STATE_DEAD); + } + } + + void JustSummoned(Creature* /*summon*/) {} + + void UpdateAI(uint32 diff) + { + events.Update(diff); + + if(me->GetMapId() == 229) // UBRS EVENTS + { + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_PLAYER_CHECK: + if (Unit* player = SelectTarget(SELECT_TARGET_NEAREST, 0, 30.0f, false)) + events.ScheduleEvent(EVENT_GYTH_REND_1, 1000); + else + events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); + break; + case EVENT_GYTH_REND_1: + Talk(SAY_GYTH_REND_1); + events.ScheduleEvent(EVENT_GYTH_REND_2, 4000); + break; + case EVENT_GYTH_REND_2: + if (Unit* player = SelectTarget(SELECT_TARGET_NEAREST, 0, 30.0f, false)) + me->SetInFront(player); + me->SendMovementFlagUpdate(); + me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); + events.ScheduleEvent(EVENT_GYTH_REND_3, 4000); + break; + case EVENT_GYTH_REND_3: + Talk(SAY_GYTH_REND_2); + events.ScheduleEvent(EVENT_GYTH_REND_4, 4000); + break; + case EVENT_GYTH_REND_4: + if (Creature* rend = me->FindNearestCreature(NPC_REND_BLACKHAND, 5.0f, true)) + me->SetInFront(rend); + me->SendMovementFlagUpdate(); + events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); + break; + case EVENT_GYTH_REND_5: + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); + default: + break; + } + } + } + + if(me->GetMapId() != 469) return; - Talk(SAY_SLAY, Victim->GetGUID()); + // Only do this if we haven't spawned nefarian yet + if (UpdateVictim() && SpawnedAdds <= 42) + { + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_SHADOW_BOLT: + switch (urand(0, 1)) + { + case 0: + DoCastVictim(SPELL_SHADOWBOLT_VOLLEY); + break; + case 1: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) + DoCast(target, SPELL_SHADOWBOLT); + break; + } + DoResetThreat(); + events.ScheduleEvent(EVENT_SHADOW_BOLT, urand(3000, 10000)); + break; + case EVENT_FEAR: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) + DoCast(target, SPELL_FEAR); + events.ScheduleEvent(EVENT_FEAR, urand(10000, 20000)); + break; + case EVENT_MIND_CONTROL: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 40, true)) + DoCast(target, SPELL_SHADOW_COMMAND); + events.ScheduleEvent(EVENT_MIND_CONTROL, urand(30000, 35000)); + break; + case EVENT_SPAWN_ADD: + for (uint8 i=0; i<2; ++i) + { + uint32 CreatureID; + if (urand(0, 2) == 0) + CreatureID = NPC_CHROMATIC_DRAKANOID; + else + CreatureID = Entry[urand(0, 4)]; + if (Creature* dragon = me->SummonCreature(CreatureID, DrakeSpawnLoc[i])) + { + dragon->setFaction(103); + dragon->AI()->AttackStart(me->GetVictim()); + } + + if (++SpawnedAdds >= 42) + { + if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianLoc[0])) + { + nefarian->setActive(true); + nefarian->SetCanFly(true); + nefarian->SetDisableGravity(true); + nefarian->AI()->DoCastAOE(SPELL_SHADOWFLAME_INITIAL); + nefarian->GetMotionMaster()->MovePoint(1, NefarianLoc[1]); + } + events.CancelEvent(EVENT_MIND_CONTROL); + events.CancelEvent(EVENT_FEAR); + events.CancelEvent(EVENT_SHADOW_BOLT); + me->SetVisible(false); + return; + } + } + events.ScheduleEvent(EVENT_SPAWN_ADD, 4000); + break; + } + } + } } - void JustDied(Unit* /*killer*/) + void sGossipSelect(Player* player, uint32 sender, uint32 action) { - Talk(SAY_DEATH); + if (sender == GOSSIP_ID && action == 0) + { + player->CLOSE_GOSSIP_MENU(); + Talk(SAY_GAMESBEGIN_1); + BeginEvent(player); + } + } + + private: + uint32 SpawnedAdds; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_victor_nefariusAI (creature); + } +}; + +class boss_nefarian : public CreatureScript +{ +public: + boss_nefarian() : CreatureScript("boss_nefarian") { } + + struct boss_nefarianAI : public BossAI + { + boss_nefarianAI(Creature* creature) : BossAI(creature, BOSS_NEFARIAN) { } + + void Reset() + { + Phase3 = false; + canDespawn = false; + DespawnTimer = 30000; + } + + void JustReachedHome() + { + canDespawn = true; } void EnterCombat(Unit* who) { + events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); + events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); + events.ScheduleEvent(EVENT_VEILOFSHADOW, urand(25000, 35000)); + events.ScheduleEvent(EVENT_CLEAVE, 7000); + //events.ScheduleEvent(EVENT_TAILLASH, 10000); + events.ScheduleEvent(EVENT_CLASSCALL, urand(30000, 35000)); Talk(SAY_RANDOM); + } - DoCast(who, SPELL_SHADOWFLAME_INITIAL); - DoZoneInCombat(); + void JustDied(Unit* /*Killer*/) + { + _JustDied(); + Talk(SAY_DEATH); } - void UpdateAI(uint32 diff) + void KilledUnit(Unit* victim) { - if (DespawnTimer <= diff) - { - if (!UpdateVictim()) - me->DespawnOrUnsummon(); - DespawnTimer = 5000; - } else DespawnTimer -= diff; + if (rand()%5) + return; - if (!UpdateVictim()) + Talk(SAY_SLAY, victim->GetGUID()); + } + + void MovementInform(uint32 type, uint32 id) + { + if (type != POINT_MOTION_TYPE) return; - //ShadowFlame_Timer - if (ShadowFlame_Timer <= diff) + if (id == 1) { - DoCastVictim(SPELL_SHADOWFLAME); - ShadowFlame_Timer = 12000; - } else ShadowFlame_Timer -= diff; + me->SetInCombatWithZone(); + if (me->GetVictim()) + AttackStart(me->GetVictim()); + } + } - //BellowingRoar_Timer - if (BellowingRoar_Timer <= diff) + void UpdateAI(uint32 diff) + { + if (canDespawn && DespawnTimer <= diff) { - DoCastVictim(SPELL_BELLOWINGROAR); - BellowingRoar_Timer = 30000; - } else BellowingRoar_Timer -= diff; + if (instance) + instance->SetBossState(BOSS_NEFARIAN, FAIL); - //VeilOfShadow_Timer - if (VeilOfShadow_Timer <= diff) - { - DoCastVictim(SPELL_VEILOFSHADOW); - VeilOfShadow_Timer = 15000; - } else VeilOfShadow_Timer -= diff; + std::list constructList; + me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); + for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) + (*itr)->DespawnOrUnsummon(); - //Cleave_Timer - if (Cleave_Timer <= diff) - { - DoCastVictim(SPELL_CLEAVE); - Cleave_Timer = 7000; - } else Cleave_Timer -= diff; + } else DespawnTimer -= diff; - //TailLash_Timer - if (TailLash_Timer <= diff) - { - //Cast NYI since we need a better check for behind target - //DoCastVictim(SPELL_TAILLASH); + if (!UpdateVictim()) + return; - TailLash_Timer = 10000; - } else TailLash_Timer -= diff; + if (canDespawn) + canDespawn = false; - //ClassCall_Timer - if (ClassCall_Timer <= diff) - { - //Cast a random class call - //On official it is based on what classes are currently on the hostil list - //but we can't do that yet so just randomly call one + events.Update(diff); - switch (urand(0, 8)) + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) { - case 0: - Talk(SAY_MAGE); - DoCast(me, SPELL_MAGE); + case EVENT_SHADOWFLAME: + DoCastVictim(SPELL_SHADOWFLAME); + events.ScheduleEvent(EVENT_SHADOWFLAME, 12000); break; - case 1: - Talk(SAY_WARRIOR); - DoCast(me, SPELL_WARRIOR); + case EVENT_FEAR: + DoCastVictim(SPELL_BELLOWINGROAR); + events.ScheduleEvent(EVENT_FEAR, urand(25000, 35000)); break; - case 2: - Talk(SAY_DRUID); - DoCast(me, SPELL_DRUID); + case EVENT_VEILOFSHADOW: + DoCastVictim(SPELL_VEILOFSHADOW); + events.ScheduleEvent(EVENT_VEILOFSHADOW, urand(25000, 35000)); break; - case 3: - Talk(SAY_PRIEST); - DoCast(me, SPELL_PRIEST); + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, 7000); break; - case 4: - Talk(SAY_PALADIN); - DoCast(me, SPELL_PALADIN); + case EVENT_TAILLASH: + // Cast NYI since we need a better check for behind target + DoCastVictim(SPELL_TAILLASH); + events.ScheduleEvent(EVENT_TAILLASH, 10000); break; - case 5: - Talk(SAY_SHAMAN); - DoCast(me, SPELL_SHAMAN); - break; - case 6: - Talk(SAY_WARLOCK); - DoCast(me, SPELL_WARLOCK); - break; - case 7: - Talk(SAY_HUNTER); - DoCast(me, SPELL_HUNTER); - break; - case 8: - Talk(SAY_ROGUE); - DoCast(me, SPELL_ROGUE); + case EVENT_CLASSCALL: + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true)) + switch (target->getClass()) + { + case CLASS_MAGE: + Talk(SAY_MAGE); + DoCast(me, SPELL_MAGE); + break; + case CLASS_WARRIOR: + Talk(SAY_WARRIOR); + DoCast(me, SPELL_WARRIOR); + break; + case CLASS_DRUID: + Talk(SAY_DRUID); + DoCast(target, SPELL_DRUID); + break; + case CLASS_PRIEST: + Talk(SAY_PRIEST); + DoCast(me, SPELL_PRIEST); + break; + case CLASS_PALADIN: + Talk(SAY_PALADIN); + DoCast(me, SPELL_PALADIN); + break; + case CLASS_SHAMAN: + Talk(SAY_SHAMAN); + DoCast(me, SPELL_SHAMAN); + break; + case CLASS_WARLOCK: + Talk(SAY_WARLOCK); + DoCast(me, SPELL_WARLOCK); + break; + case CLASS_HUNTER: + Talk(SAY_HUNTER); + DoCast(me, SPELL_HUNTER); + break; + case CLASS_ROGUE: + Talk(SAY_ROGUE); + DoCast(me, SPELL_ROGUE); + break; + case CLASS_DEATH_KNIGHT: + Talk(SAY_DEATH_KNIGHT); + DoCast(me, SPELL_DEATH_KNIGHT); + break; + default: + break; + } + events.ScheduleEvent(EVENT_CLASSCALL, urand(30000, 35000)); break; } + } - ClassCall_Timer = 35000 + (rand() % 5000); - } else ClassCall_Timer -= diff; - - //Phase3 begins when we are below X health + // Phase3 begins when health below 20 pct if (!Phase3 && HealthBelowPct(20)) { + std::list constructList; + me->GetCreatureListWithEntryInGrid(constructList, NPC_BONE_CONSTRUCT, 500.0f); + for (std::list::const_iterator itr = constructList.begin(); itr != constructList.end(); ++itr) + if ((*itr) && !(*itr)->IsAlive()) + { + (*itr)->Respawn(); + (*itr)->SetInCombatWithZone(); + (*itr)->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + (*itr)->SetReactState(REACT_AGGRESSIVE); + (*itr)->SetStandState(UNIT_STAND_STATE_STAND); + } + Phase3 = true; Talk(SAY_RAISE_SKELETONS); } DoMeleeAttackIfReady(); } + + private: + bool canDespawn; + uint32 DespawnTimer; + bool Phase3; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_nefarianAI (creature); + } }; void AddSC_boss_nefarian() { + new boss_victor_nefarius(); new boss_nefarian(); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp index 369e97ca99a..fa21b06d578 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_razorgore.cpp @@ -16,17 +16,11 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Razorgore -SD%Complete: 50 -SDComment: Needs additional review. Phase 1 NYI (Grethok the Controller) -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" - -//Razorgore Phase 2 Script +#include "SpellScript.h" +#include "blackwing_lair.h" +#include "Player.h" enum Say { @@ -38,47 +32,84 @@ enum Say enum Spells { + SPELL_MINDCONTROL = 42013, + SPELL_CHANNEL = 45537, + SPELL_EGG_DESTROY = 19873, + SPELL_CLEAVE = 22540, SPELL_WARSTOMP = 24375, SPELL_FIREBALLVOLLEY = 22425, SPELL_CONFLAGRATION = 23023 }; +enum Summons +{ + NPC_ELITE_DRACHKIN = 12422, + NPC_ELITE_WARRIOR = 12458, + NPC_WARRIOR = 12416, + NPC_MAGE = 12402, + NPC_WARLOCK = 12459, + + GO_EGG = 177807 +}; + +enum EVENTS +{ + EVENT_CLEAVE = 1, + EVENT_STOMP = 2, + EVENT_FIREBALL = 3, + EVENT_CONFLAGRATION = 4 +}; + class boss_razorgore : public CreatureScript { public: boss_razorgore() : CreatureScript("boss_razorgore") { } - CreatureAI* GetAI(Creature* creature) const + struct boss_razorgoreAI : public BossAI { - return new boss_razorgoreAI (creature); - } + boss_razorgoreAI(Creature* creature) : BossAI(creature, BOSS_RAZORGORE) { } - struct boss_razorgoreAI : public ScriptedAI - { - boss_razorgoreAI(Creature* creature) : ScriptedAI(creature) {} + void Reset() + { + _Reset(); - uint32 Cleave_Timer; - uint32 WarStomp_Timer; - uint32 FireballVolley_Timer; - uint32 Conflagration_Timer; + secondPhase = false; + if (instance) + instance->SetData(DATA_EGG_EVENT, NOT_STARTED); + } - void Reset() + void JustDied(Unit* /*killer*/) { - Cleave_Timer = 15000; //These times are probably wrong - WarStomp_Timer = 35000; - FireballVolley_Timer = 7000; - Conflagration_Timer = 12000; + _JustDied(); + Talk(SAY_DEATH); + + if (instance) + instance->SetData(DATA_EGG_EVENT, NOT_STARTED); } - void EnterCombat(Unit* /*who*/) + void DoChangePhase() { - DoZoneInCombat(); + events.ScheduleEvent(EVENT_CLEAVE, 15000); + events.ScheduleEvent(EVENT_STOMP, 35000); + events.ScheduleEvent(EVENT_FIREBALL, 7000); + events.ScheduleEvent(EVENT_CONFLAGRATION, 12000); + + secondPhase = true; + me->RemoveAllAuras(); + me->SetHealth(me->GetMaxHealth()); } - void JustDied(Unit* /*killer*/) + void DoAction(int32 action) { - Talk(SAY_DEATH); + if (action == ACTION_PHASE_TWO) + DoChangePhase(); + } + + void DamageTaken(Unit* /*who*/, uint32& damage) + { + if (!secondPhase) + damage = 0; } void UpdateAI(uint32 diff) @@ -86,50 +117,97 @@ public: if (!UpdateVictim()) return; - //Cleave_Timer - if (Cleave_Timer <= diff) - { - DoCastVictim(SPELL_CLEAVE); - Cleave_Timer = urand(7000, 10000); - } else Cleave_Timer -= diff; + events.Update(diff); - //WarStomp_Timer - if (WarStomp_Timer <= diff) - { - DoCastVictim(SPELL_WARSTOMP); - WarStomp_Timer = urand(15000, 25000); - } else WarStomp_Timer -= diff; + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; - //FireballVolley_Timer - if (FireballVolley_Timer <= diff) + while (uint32 eventId = events.ExecuteEvent()) { - DoCastVictim(SPELL_FIREBALLVOLLEY); - FireballVolley_Timer = urand(12000, 15000); - } else FireballVolley_Timer -= diff; + switch (eventId) + { + case EVENT_CLEAVE: + DoCastVictim(SPELL_CLEAVE); + events.ScheduleEvent(EVENT_CLEAVE, urand(7000, 10000)); + break; + case EVENT_STOMP: + DoCastVictim(SPELL_WARSTOMP); + events.ScheduleEvent(EVENT_STOMP, urand(15000, 25000)); + break; + case EVENT_FIREBALL: + DoCastVictim(SPELL_FIREBALLVOLLEY); + events.ScheduleEvent(EVENT_FIREBALL, urand(12000, 15000)); + break; + case EVENT_CONFLAGRATION: + DoCastVictim(SPELL_CONFLAGRATION); + if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION)) + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) + me->TauntApply(target); + events.ScheduleEvent(EVENT_CONFLAGRATION, 30000); + break; + } + } + DoMeleeAttackIfReady(); + } - //Conflagration_Timer - if (Conflagration_Timer <= diff) - { - DoCastVictim(SPELL_CONFLAGRATION); - //We will remove this threat reduction and add an aura check. + private: + bool secondPhase; + }; - //if (DoGetThreat(me->GetVictim())) - //DoModifyThreatPercent(me->GetVictim(), -50); + CreatureAI* GetAI(Creature* creature) const + { + return new boss_razorgoreAI (creature); + } +}; - Conflagration_Timer = 12000; - } else Conflagration_Timer -= diff; +class go_orb_of_domination : public GameObjectScript +{ +public: + go_orb_of_domination() : GameObjectScript("go_orb_of_domination") { } - // Aura Check. If the gamer is affected by confliguration we attack a random gamer. - if (me->GetVictim() && me->GetVictim()->HasAura(SPELL_CONFLAGRATION)) - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) - me->TauntApply(target); + bool OnGossipHello(Player* player, GameObject* go) + { + if (InstanceScript* instance = go->GetInstanceScript()) + if (instance->GetData(DATA_EGG_EVENT) != DONE) + if (Creature* razor = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_RAZORGORE_THE_UNTAMED) : 0)) + { + razor->Attack(player, true); + player->CastSpell(razor, SPELL_MINDCONTROL); + } + return true; + } +}; - DoMeleeAttackIfReady(); +class spell_egg_event : public SpellScriptLoader +{ + public: + spell_egg_event() : SpellScriptLoader("spell_egg_event") { } + + class spell_egg_eventSpellScript : public SpellScript + { + PrepareSpellScript(spell_egg_eventSpellScript); + + void HandleOnHit() + { + if (InstanceScript* instance = GetCaster()->GetInstanceScript()) + instance->SetData(DATA_EGG_EVENT, SPECIAL); + } + + void Register() + { + OnHit += SpellHitFn(spell_egg_eventSpellScript::HandleOnHit); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_egg_eventSpellScript(); } - }; }; void AddSC_boss_razorgore() { new boss_razorgore(); + new go_orb_of_domination(); + new spell_egg_event(); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp index dfa0f42f4a6..e7626c92ec0 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp @@ -16,37 +16,49 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Vaelastrasz -SD%Complete: 75 -SDComment: Burning Adrenaline not correctly implemented in core -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "blackwing_lair.h" #include "ScriptedGossip.h" #include "Player.h" enum Says { - SAY_LINE1 = 0, - SAY_LINE2 = 1, - SAY_LINE3 = 2, - SAY_HALFLIFE = 3, - SAY_KILLTARGET = 4 + SAY_LINE1 = 0, + SAY_LINE2 = 1, + SAY_LINE3 = 2, + SAY_HALFLIFE = 3, + SAY_KILLTARGET = 4 }; -#define GOSSIP_ITEM "Start Event " +enum Gossip +{ + GOSSIP_ID = 21334, +}; enum Spells { - SPELL_ESSENCEOFTHERED = 23513, - SPELL_FLAMEBREATH = 23461, - SPELL_FIRENOVA = 23462, - SPELL_TAILSWIPE = 15847, - SPELL_BURNINGADRENALINE = 23620, - SPELL_CLEAVE = 20684 //Chain cleave is most likely named something different and contains a dummy effect + SPELL_ESSENCEOFTHERED = 23513, + SPELL_FLAMEBREATH = 23461, + SPELL_FIRENOVA = 23462, + SPELL_TAILSWIPE = 15847, + SPELL_BURNINGADRENALINE = 23620, + SPELL_CLEAVE = 20684 //Chain cleave is most likely named something different and contains a dummy effect +}; + +enum Events +{ + EVENT_SPEECH_1 = 1, + EVENT_SPEECH_2 = 2, + EVENT_SPEECH_3 = 3, + EVENT_SPEECH_4 = 4, + EVENT_ESSENCEOFTHERED = 5, + EVENT_FLAMEBREATH = 6, + EVENT_FIRENOVA = 7, + EVENT_TAILSWIPE = 8, + EVENT_CLEAVE = 9, + EVENT_BURNINGADRENALINE_CASTER = 10, + EVENT_BURNINGADRENALINE_TANK = 11 }; class boss_vaelastrasz : public CreatureScript @@ -54,89 +66,47 @@ class boss_vaelastrasz : public CreatureScript public: boss_vaelastrasz() : CreatureScript("boss_vaelastrasz") { } - void SendDefaultMenu(Player* player, Creature* creature, uint32 action) + struct boss_vaelAI : public BossAI { - if (action == GOSSIP_ACTION_INFO_DEF + 1) //Fight time - { - player->CLOSE_GOSSIP_MENU(); - CAST_AI(boss_vaelastrasz::boss_vaelAI, creature->AI())->BeginSpeech(player); - } - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - if (sender == GOSSIP_SENDER_MAIN) - SendDefaultMenu(player, creature, action); - - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1); - player->SEND_GOSSIP_MENU(907, creature->GetGUID()); - - return true; - } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_vaelAI (creature); - } - - struct boss_vaelAI : public ScriptedAI - { - boss_vaelAI(Creature* creature) : ScriptedAI(creature) + boss_vaelAI(Creature* creature) : BossAI(creature, BOSS_VAELASTRAZ) { creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); creature->setFaction(35); creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); } - uint64 PlayerGUID; - uint32 SpeechTimer; - uint32 SpeechNum; - uint32 Cleave_Timer; - uint32 FlameBreath_Timer; - uint32 FireNova_Timer; - uint32 BurningAdrenalineCaster_Timer; - uint32 BurningAdrenalineTank_Timer; - uint32 TailSwipe_Timer; - bool HasYelled; - bool DoingSpeech; - void Reset() { + _Reset(); + + me->SetStandState(UNIT_STAND_STATE_DEAD); PlayerGUID = 0; - SpeechTimer = 0; - SpeechNum = 0; - Cleave_Timer = 8000; // These times are probably wrong - FlameBreath_Timer = 11000; - BurningAdrenalineCaster_Timer = 15000; - BurningAdrenalineTank_Timer = 45000; - FireNova_Timer = 5000; - TailSwipe_Timer = 20000; + HasYelled = false; - DoingSpeech = false; } - void BeginSpeech(Unit* target) + void EnterCombat(Unit* /*who*/) { - //Stand up and begin speach - PlayerGUID = target->GetGUID(); + _EnterCombat(); - //10 seconds - Talk(SAY_LINE1); + DoCast(me, SPELL_ESSENCEOFTHERED); + me->SetHealth(me->CountPctFromMaxHealth(30)); + // now drop damage requirement to be able to take loot + me->ResetPlayerDamageReq(); - SpeechTimer = 10000; - SpeechNum = 0; - DoingSpeech = true; + events.ScheduleEvent(EVENT_CLEAVE, 10000); + events.ScheduleEvent(EVENT_FLAMEBREATH, 15000); + events.ScheduleEvent(EVENT_FIRENOVA, 20000); + events.ScheduleEvent(EVENT_TAILSWIPE, 11000); + events.ScheduleEvent(EVENT_BURNINGADRENALINE_CASTER, 15000); + events.ScheduleEvent(EVENT_BURNINGADRENALINE_TANK, 45000); + } + void BeginSpeech(Unit* target) + { + PlayerGUID = target->GetGUID(); me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + events.ScheduleEvent(EVENT_SPEECH_1, 1000); } void KilledUnit(Unit* victim) @@ -147,54 +117,95 @@ public: Talk(SAY_KILLTARGET, victim->GetGUID()); } - void EnterCombat(Unit* /*who*/) - { - DoCast(me, SPELL_ESSENCEOFTHERED); - DoZoneInCombat(); - me->SetHealth(me->CountPctFromMaxHealth(30)); - // now drop damage requirement to be able to take loot - me->ResetPlayerDamageReq(); - } - void UpdateAI(uint32 diff) { - //Speech - if (DoingSpeech) + events.Update(diff); + + // Speech + if (!UpdateVictim()) { - if (SpeechTimer <= diff) + while (uint32 eventId = events.ExecuteEvent()) { - switch (SpeechNum) + switch (eventId) { - case 0: - //16 seconds till next line + case EVENT_SPEECH_1: + Talk(SAY_LINE1); + me->SetStandState(UNIT_STAND_STATE_STAND); + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_SPEECH_2, 12000); + break; + case EVENT_SPEECH_2: Talk(SAY_LINE2); - SpeechTimer = 16000; - ++SpeechNum; + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_SPEECH_3, 12000); break; - case 1: - //This one is actually 16 seconds but we only go to 10 seconds because he starts attacking after he says "I must fight this!" + case EVENT_SPEECH_3: Talk(SAY_LINE3); - SpeechTimer = 10000; - ++SpeechNum; + me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + events.ScheduleEvent(EVENT_SPEECH_4, 16000); break; - case 2: + case EVENT_SPEECH_4: me->setFaction(103); if (PlayerGUID && Unit::GetUnit(*me, PlayerGUID)) - { - AttackStart(Unit::GetUnit(*me, PlayerGUID)); - DoCast(me, SPELL_ESSENCEOFTHERED); - } - SpeechTimer = 0; - DoingSpeech = false; + AttackStart(Unit::GetUnit(*me, PlayerGUID));; break; } - } else SpeechTimer -= diff; + } + return; } - //Return since we have no target - if (!UpdateVictim()) + if (me->HasUnitState(UNIT_STATE_CASTING)) return; + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_CLEAVE: + events.ScheduleEvent(EVENT_CLEAVE, 15000); + DoCastVictim(SPELL_CLEAVE); + break; + case EVENT_FLAMEBREATH: + DoCastVictim(SPELL_FLAMEBREATH); + events.ScheduleEvent(EVENT_FLAMEBREATH, urand(8000, 14000)); + break; + case EVENT_FIRENOVA: + DoCastVictim(SPELL_FIRENOVA); + events.ScheduleEvent(EVENT_FIRENOVA, 15000); + break; + case EVENT_TAILSWIPE: + //Only cast if we are behind + /*if (!me->HasInArc(M_PI, me->GetVictim())) + { + DoCast(me->GetVictim(), SPELL_TAILSWIPE); + }*/ + events.ScheduleEvent(EVENT_TAILSWIPE, 15000); + break; + case EVENT_BURNINGADRENALINE_CASTER: + { + Unit* target = NULL; + + uint8 i = 0; + while (i < 3) // max 3 tries to get a random target with power_mana + { + ++i; + target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); // not aggro leader + if (target && target->getPowerType() == POWER_MANA) + i = 3; + } + if (target) // cast on self (see below) + target->CastSpell(target, SPELL_BURNINGADRENALINE, true); + } + events.ScheduleEvent(EVENT_BURNINGADRENALINE_CASTER, 15000); + break; + case EVENT_BURNINGADRENALINE_TANK: + // have the victim cast the spell on himself otherwise the third effect aura will be applied to Vael instead of the player + me->GetVictim()->CastSpell(me->GetVictim(), SPELL_BURNINGADRENALINE, true); + events.ScheduleEvent(EVENT_BURNINGADRENALINE_TANK, 45000); + break; + } + } + // Yell if hp lower than 15% if (HealthBelowPct(15) && !HasYelled) { @@ -202,74 +213,30 @@ public: HasYelled = true; } - //Cleave_Timer - if (Cleave_Timer <= diff) - { - DoCastVictim(SPELL_CLEAVE); - Cleave_Timer = 15000; - } else Cleave_Timer -= diff; - - //FlameBreath_Timer - if (FlameBreath_Timer <= diff) - { - DoCastVictim(SPELL_FLAMEBREATH); - FlameBreath_Timer = urand(4000, 8000); - } else FlameBreath_Timer -= diff; - - //BurningAdrenalineCaster_Timer - if (BurningAdrenalineCaster_Timer <= diff) - { - Unit* target = NULL; - - uint8 i = 0; - while (i < 3) // max 3 tries to get a random target with power_mana - { - ++i; - target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); //not aggro leader - if (target && target->getPowerType() == POWER_MANA) - i = 3; - } - if (target) // cast on self (see below) - target->CastSpell(target, SPELL_BURNINGADRENALINE, 1); - - BurningAdrenalineCaster_Timer = 15000; - } else BurningAdrenalineCaster_Timer -= diff; - - //BurningAdrenalineTank_Timer - if (BurningAdrenalineTank_Timer <= diff) - { - // have the victim cast the spell on himself otherwise the third effect aura will be applied - // to Vael instead of the player - me->GetVictim()->CastSpell(me->GetVictim(), SPELL_BURNINGADRENALINE, 1); - - BurningAdrenalineTank_Timer = 45000; - } else BurningAdrenalineTank_Timer -= diff; - - //FireNova_Timer - if (FireNova_Timer <= diff) - { - DoCastVictim(SPELL_FIRENOVA); - FireNova_Timer = 5000; - } else FireNova_Timer -= diff; + DoMeleeAttackIfReady(); + } - //TailSwipe_Timer - if (TailSwipe_Timer <= diff) + void sGossipSelect(Player* player, uint32 sender, uint32 action) + { + if (sender == GOSSIP_ID && action == 0) { - //Only cast if we are behind - /*if (!me->HasInArc(M_PI, me->GetVictim())) - { - DoCastVictim(SPELL_TAILSWIPE); - }*/ - - TailSwipe_Timer = 20000; - } else TailSwipe_Timer -= diff; - - DoMeleeAttackIfReady(); + player->CLOSE_GOSSIP_MENU(); + BeginSpeech(player); + } } + + private: + uint64 PlayerGUID; + bool HasYelled; }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_vaelAI (creature); + } }; -void AddSC_boss_vael() +void AddSC_boss_vaelastrasz() { new boss_vaelastrasz(); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp deleted file mode 100644 index 84670ed4e0c..00000000000 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * Copyright (C) 2006-2009 ScriptDev2 - * - * 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, see . - */ - -/* ScriptData -SDName: Boss_Victor_Nefarius -SD%Complete: 75 -SDComment: Missing some text, Vael beginning event, and spawns Nef in wrong place -SDCategory: Blackwing Lair -EndScriptData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "Player.h" - -enum Says -{ - // UBRS text - SAY_GYTH_REND_1 = 0, - SAY_GYTH_REND_2 = 1, - SAY_GYTH_REND_3 = 2, - SAY_GYTH_REND_4 = 3, - SAY_GYTH_REND_5 = 4, - SAY_GYTH_REND_6 = 5, - SAY_GYTH_REND_7 = 6, - SAY_GYTH_REND_8 = 7, - SAY_GYTH_REND_9 = 8, - SAY_GYTH_REND_10 = 9, - // BWL text - SAY_GAMESBEGIN_1 = 10, - SAY_GAMESBEGIN_2 = 11, - //SAY_VAEL_INTRO = 12, Not used - when he corrupts Vaelastrasz -}; - -#define GOSSIP_ITEM_1 "I've made no mistakes." -#define GOSSIP_ITEM_2 "You have lost your mind, Nefarius. You speak in riddles." -#define GOSSIP_ITEM_3 "Please do." - -enum Creatures -{ - NPC_REND_BLACKHAND = 10429, - CREATURE_BRONZE_DRAKANOID = 14263, - CREATURE_BLUE_DRAKANOID = 14261, - CREATURE_RED_DRAKANOID = 14264, - CREATURE_GREEN_DRAKANOID = 14262, - CREATURE_BLACK_DRAKANOID = 14265, - - CREATURE_CHROMATIC_DRAKANOID = 14302, - CREATURE_NEFARIAN = 11583 -}; - -#define ADD_X1 -7591.151855f -#define ADD_X2 -7514.598633f -#define ADD_Y1 -1204.051880f -#define ADD_Y2 -1150.448853f -#define ADD_Z1 476.800476f -#define ADD_Z2 476.796570f - -#define NEF_X -7445 -#define NEF_Y -1332 -#define NEF_Z 536 - -#define HIDE_X -7592 -#define HIDE_Y -1264 -#define HIDE_Z 481 - -enum Spells -{ - // UBRS Spells - SPELL_CHROMATIC_CHAOS = 16337, // Self Cast hits 10339 - SPELL_VAELASTRASZZ_SPAWN = 16354, // Self Cast Depawn one sec after - // BWL Spells - SPELL_SHADOWBOLT = 21077, - SPELL_FEAR = 26070 -}; - -enum Events -{ - // UBRS Events - EVENT_PLAYER_CHECK = 0, - EVENT_GYTH_REND_1 = 1, - EVENT_GYTH_REND_2 = 2, - EVENT_GYTH_REND_3 = 3, - EVENT_GYTH_REND_4 = 4, - EVENT_GYTH_REND_5 = 5, -}; - -//This script is complicated -//Instead of morphing Victor Nefarius we will have him control phase 1 -//And then have him spawn "Nefarian" for phase 2 -//When phase 2 starts Victor Nefarius will go into hiding and stop attacking -//If Nefarian despawns because he killed the players then this guy will EnterEvadeMode -//and allow players to start the event over -//If nefarian dies then he will kill himself then he will kill himself in his hiding place -//To prevent players from doing the event twice - -class boss_victor_nefarius : public CreatureScript -{ -public: - boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { } - - struct boss_victor_nefariusAI : public ScriptedAI - { - boss_victor_nefariusAI(Creature* creature) : ScriptedAI(creature) - { - NefarianGUID = 0; - switch (urand(0, 19)) - { - case 0: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 1: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 2: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 3: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 4: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 5: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 6: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 7: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 8: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 9: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 10: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 11: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 12: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 13: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 14: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 15: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 16: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 17: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 18: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 19: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - } - } - - void Reset() - { - if(me->GetMapId() == 229) - { - _events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); - } - - if(me->GetMapId() == 469) - { - SpawnedAdds = 0; - AddSpawnTimer = 10000; - ShadowBoltTimer = 5000; - FearTimer = 8000; - ResetTimer = 900000; // On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier - NefarianGUID = 0; - NefCheckTime = 2000; - me->SetUInt32Value(UNIT_NPC_FLAGS, 1); - me->setFaction(35); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - } - } - - void BeginEvent(Player* target) - { - Talk(SAY_GAMESBEGIN_2); - - //Trinity::Singleton::Instance().GetMap(me->GetMapId(), me)->GetPlayers().begin(); - /* - list ::const_iterator i = sMapMgr->GetMap(me->GetMapId(), me)->GetPlayers().begin(); - - for (i = sMapMgr->GetMap(me->GetMapId(), me)->GetPlayers().begin(); i != sMapMgr->GetMap(me->GetMapId(), me)->GetPlayers().end(); ++i) - { - AttackStart((*i)); - } - */ - me->SetUInt32Value(UNIT_NPC_FLAGS, 0); - me->setFaction(103); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - AttackStart(target); - } - - void EnterCombat(Unit* /*who*/) - { - } - - void MoveInLineOfSight(Unit* who) - { - //We simply use this function to find players until we can use map->GetPlayers() - - if (who && who->GetTypeId() == TYPEID_PLAYER && me->IsHostileTo(who)) - { - //Add them to our threat list - me->AddThreat(who, 0.0f); - } - } - - void UpdateAI(uint32 diff) - { - - if(me->GetMapId() == 229) // UBRS EVENTS - { - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_PLAYER_CHECK: - // If player found within 30.0f - // _events.ScheduleEvent(EVENT_GYTH_REND_1, 1000); - // else - // events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); - break; - case EVENT_GYTH_REND_1: - Talk(SAY_GYTH_REND_1); - _events.ScheduleEvent(EVENT_GYTH_REND_2, 4000); - break; - case EVENT_GYTH_REND_2: - if (Unit* player = SelectTarget(SELECT_TARGET_NEAREST, 0, 30.0f, false)) - me->SetInFront(player); - me->SendMovementFlagUpdate(); - me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); - _events.ScheduleEvent(EVENT_GYTH_REND_3, 4000); - break; - case EVENT_GYTH_REND_3: - Talk(SAY_GYTH_REND_2); - _events.ScheduleEvent(EVENT_GYTH_REND_4, 4000); - break; - case EVENT_GYTH_REND_4: - if (Creature* rend = me->FindNearestCreature(NPC_REND_BLACKHAND, 5.0f, true)) - me->SetInFront(rend); - me->SendMovementFlagUpdate(); - _events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); - break; - case EVENT_GYTH_REND_5: - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - _events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); - default: - break; - } - } - } - - if (!UpdateVictim()) - return; - - //Only do this if we haven't spawned nef yet - if (SpawnedAdds < 42) - { - //ShadowBoltTimer - if (ShadowBoltTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_SHADOWBOLT); - - ShadowBoltTimer = urand(3000, 10000); - } else ShadowBoltTimer -= diff; - - //FearTimer - if (FearTimer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_FEAR); - - FearTimer = 10000 + (rand()%10000); - } else FearTimer -= diff; - - //Add spawning mechanism - if (AddSpawnTimer <= diff) - { - //Spawn 2 random types of creatures at the 2 locations - uint32 CreatureID; - Creature* Spawned = NULL; - Unit* target = NULL; - - //1 in 3 chance it will be a chromatic - if (urand(0, 2) == 0) - CreatureID = CREATURE_CHROMATIC_DRAKANOID; - else - CreatureID = DrakType1; - - ++SpawnedAdds; - - //Spawn Creature and force it to start attacking a random target - Spawned = me->SummonCreature(CreatureID, ADD_X1, ADD_Y1, ADD_Z1, 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if (target && Spawned) - { - Spawned->AI()->AttackStart(target); - Spawned->setFaction(103); - } - - //1 in 3 chance it will be a chromatic - if (urand(0, 2) == 0) - CreatureID = CREATURE_CHROMATIC_DRAKANOID; - else - CreatureID = DrakType2; - - ++SpawnedAdds; - - Spawned = me->SummonCreature(CreatureID, ADD_X2, ADD_Y2, ADD_Z2, 5.000f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000); - target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if (target && Spawned) - { - Spawned->AI()->AttackStart(target); - Spawned->setFaction(103); - } - - //Begin phase 2 by spawning Nefarian and what not - if (SpawnedAdds >= 42) - { - //Teleport Victor Nefarius way out of the map - //sMapMgr->GetMap(me->GetMapId(), me)->CreatureRelocation(me, 0, 0, -5000, 0); - - //Interrupt any spell casting - me->InterruptNonMeleeSpells(false); - - //Root self - DoCast(me, 33356); - - //Make super invis - DoCast(me, 8149); - - //Teleport self to a hiding spot (this causes errors in the Trinity log but no real issues) - DoTeleportTo(HIDE_X, HIDE_Y, HIDE_Z); - me->AddUnitState(UNIT_STATE_FLEEING); - - //Spawn nef and have him attack a random target - Creature* Nefarian = me->SummonCreature(CREATURE_NEFARIAN, NEF_X, NEF_Y, NEF_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 120000); - target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if (target && Nefarian) - { - Nefarian->AI()->AttackStart(target); - Nefarian->setFaction(103); - NefarianGUID = Nefarian->GetGUID(); - } - else TC_LOG_ERROR(LOG_FILTER_TSCR, "Blackwing Lair: Unable to spawn nefarian properly."); - } - - AddSpawnTimer = 4000; - } else AddSpawnTimer -= diff; - } - else if (NefarianGUID) - { - if (NefCheckTime <= diff) - { - Unit* Nefarian = Unit::GetCreature((*me), NefarianGUID); - - //If nef is dead then we die to so the players get out of combat - //and cannot repeat the event - if (!Nefarian || !Nefarian->IsAlive()) - { - NefarianGUID = 0; - me->DespawnOrUnsummon(); - } - - NefCheckTime = 2000; - } else NefCheckTime -= diff; - } - } - - private: - EventMap _events; - // UBRS - - // BWL - uint32 SpawnedAdds; - uint32 AddSpawnTimer; - uint32 ShadowBoltTimer; - uint32 FearTimer; - uint32 MindControlTimer; - uint32 ResetTimer; - uint32 DrakType1; - uint32 DrakType2; - uint64 NefarianGUID; - uint32 NefCheckTime; - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_victor_nefariusAI (creature); - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->SEND_GOSSIP_MENU(7198, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->SEND_GOSSIP_MENU(7199, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->CLOSE_GOSSIP_MENU(); - creature->AI()->Talk(SAY_GAMESBEGIN_1); - CAST_AI(boss_victor_nefarius::boss_victor_nefariusAI, creature->AI())->BeginEvent(player); - break; - } - return true; - } - - bool OnGossipHello(Player* player, Creature* creature) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(7134, creature->GetGUID()); - return true; - } -}; - -void AddSC_boss_victor_nefarius() -{ - new boss_victor_nefarius(); -} diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp index 279375be228..4541ee07a03 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/instance_blackwing_lair.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2013 TrinityCore - * Copyright (C) 2006-2009 ScriptDev2 * * 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 @@ -16,12 +15,339 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Instance_Blackwing_Lair -SD%Complete: 0 -SDComment: -SDCategory: Blackwing Lair -EndScriptData */ - #include "ScriptMgr.h" -#include "InstanceScript.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" +#include "blackwing_lair.h" +#include "Player.h" + +/* +Blackwing Lair Encounter: +1 - boss_razorgore.cpp +2 - boss_vaelastrasz.cpp +3 - boss_broodlord_lashlayer.cpp +4 - boss_firemaw.cpp +5 - boss_ebonroc.cpp +6 - boss_flamegor.cpp +7 - boss_chromaggus.cpp +8 - boss_nefarian.cpp +*/ + +Position const SummonPosition[8] = +{ + {-7661.207520f, -1043.268188f, 407.199554f, 6.280452f}, + {-7644.145020f, -1065.628052f, 407.204956f, 0.501492f}, + {-7624.260742f, -1095.196899f, 407.205017f, 0.544694f}, + {-7608.501953f, -1116.077271f, 407.199921f, 0.816443f}, + {-7531.841797f, -1063.765381f, 407.199615f, 2.874187f}, + {-7547.319336f, -1040.971924f, 407.205078f, 3.789175f}, + {-7568.547852f, -1013.112488f, 407.204926f, 3.773467f}, + {-7584.175781f, -989.6691289f, 407.199585f, 4.527447f}, +}; + +uint32 const Entry[5] = {12422, 12458, 12416, 12402, 12459}; + +class instance_blackwing_lair : public InstanceMapScript +{ +public: + instance_blackwing_lair() : InstanceMapScript(BRLScriptName, 469) { } + + struct instance_blackwing_lair_InstanceMapScript : public InstanceScript + { + instance_blackwing_lair_InstanceMapScript(Map* map) : InstanceScript(map) + { + SetBossNumber(EncounterCount); + } + + void Initialize() + { + // Razorgore + EggCount = 0; + RazorgoreTheUntamedGUID = 0; + RazorgoreDoorGUID = 0; + EggList.clear(); + // Vaelastrasz the Corrupt + VaelastraszTheCorruptGUID = 0; + VaelastraszDoorGUID = 0; + // Broodlord Lashlayer + BroodlordLashlayerGUID = 0; + BroodlordDoorGUID = 0; + // 3 Dragons + FiremawGUID = 0; + EbonrocGUID = 0; + FlamegorGUID = 0; + ChrommagusDoorGUID = 0; + // Chormaggus + ChromaggusGUID = 0; + NefarianDoorGUID = 0; + // Nefarian + LordVictorNefariusGUID = 0; + NefarianGUID = 0; + } + + void OnCreatureCreate(Creature* creature) + { + switch (creature->GetEntry()) + { + case NPC_RAZORGORE: + RazorgoreTheUntamedGUID = creature->GetGUID(); + break; + case NPC_BLACKWING_DRAGON: + case NPC_BLACKWING_TASKMASTER: + case NPC_BLACKWING_LEGIONAIRE: + case NPC_BLACKWING_WARLOCK: + if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) + razor->AI()->JustSummoned(creature); + break; + case NPC_VAELASTRAZ: + VaelastraszTheCorruptGUID = creature->GetGUID(); + break; + case NPC_BROODLORD: + BroodlordLashlayerGUID = creature->GetGUID(); + break; + case NPC_FIRENAW: + FiremawGUID = creature->GetGUID(); + break; + case NPC_EBONROC: + EbonrocGUID = creature->GetGUID(); + break; + case NPC_FLAMEGOR: + FlamegorGUID = creature->GetGUID(); + break; + case NPC_CHROMAGGUS: + ChromaggusGUID = creature->GetGUID(); + break; + case NPC_VICTOR_NEFARIUS: + LordVictorNefariusGUID = creature->GetGUID(); + break; + case NPC_NEFARIAN: + NefarianGUID = creature->GetGUID(); + break; + } + } + + void OnGameObjectCreate(GameObject* go) + { + switch (go->GetEntry()) + { + case 177807: // Egg + if (GetBossState(BOSS_FIREMAW) == DONE) + go->SetPhaseMask(2, true); + else + EggList.push_back(go->GetGUID()); + break; + case 175946: // Door + RazorgoreDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_RAZORGORE) == DONE, go); + break; + case 175185: // Door + VaelastraszDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_VAELASTRAZ) == DONE, go); + break; + case 180424: // Door + BroodlordDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_BROODLORD) == DONE, go); + break; + case 185483: // Door + ChrommagusDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE, go); + break; + case 181125: // Door + NefarianDoorGUID = go->GetGUID(); + HandleGameObject(0, GetBossState(BOSS_CHROMAGGUS) == DONE, go); + break; + } + } + + void OnGameObjectRemove(GameObject* go) + { + if (go->GetEntry() == 177807) // Egg + EggList.remove(go->GetGUID()); + } + + bool SetBossState(uint32 type, EncounterState state) + { + if (!InstanceScript::SetBossState(type, state)) + return false; + + switch (type) + { + case BOSS_RAZORGORE: + HandleGameObject(RazorgoreDoorGUID, state == DONE); + if (state == DONE) + { + for (std::list::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr) + if (GameObject* egg = instance->GetGameObject((*itr))) + egg->SetPhaseMask(2, true); + } + SetData(DATA_EGG_EVENT, NOT_STARTED); + break; + case BOSS_VAELASTRAZ: + HandleGameObject(VaelastraszDoorGUID, state == DONE); + break; + case BOSS_BROODLORD: + HandleGameObject(BroodlordDoorGUID, state == DONE); + break; + case BOSS_FIREMAW: + case BOSS_EBONROC: + case BOSS_FLAMEGOR: + HandleGameObject(ChrommagusDoorGUID, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE); + break; + case BOSS_CHROMAGGUS: + HandleGameObject(NefarianDoorGUID, state == DONE); + break; + case BOSS_NEFARIAN: + switch (state) + { + case NOT_STARTED: + if (Creature* nefarian = instance->GetCreature(NefarianGUID)) + nefarian->DespawnOrUnsummon(); + break; + case FAIL: + _events.ScheduleEvent(EVENT_RESPAWN_NEFARIUS, 15*IN_MILLISECONDS*MINUTE); + SetBossState(BOSS_NEFARIAN, NOT_STARTED); + break; + } + break; + } + return true; + } + + uint64 GetData64(uint32 id) const + { + switch (id) + { + case DATA_RAZORGORE_THE_UNTAMED: return RazorgoreTheUntamedGUID; + case DATA_VAELASTRAZ_THE_CORRUPT: return VaelastraszTheCorruptGUID; + case DATA_BROODLORD_LASHLAYER: return BroodlordLashlayerGUID; + case DATA_FIRENAW: return FiremawGUID; + case DATA_EBONROC: return EbonrocGUID; + case DATA_FLAMEGOR: return FlamegorGUID; + case DATA_CHROMAGGUS: return ChromaggusGUID; + case DATA_LORD_VICTOR_NEFARIUS: return LordVictorNefariusGUID; + case DATA_NEFARIAN: return NefarianGUID; + } + + return 0; + } + + void SetData(uint32 type, uint32 data) + { + if (type == DATA_EGG_EVENT) + { + switch (data) + { + case IN_PROGRESS: + _events.ScheduleEvent(EVENT_RAZOR_SPAWN, 45*IN_MILLISECONDS); + EggEvent = data; + EggCount = 0; + break; + case NOT_STARTED: + _events.CancelEvent(EVENT_RAZOR_SPAWN); + EggEvent = data; + EggCount = 0; + break; + case SPECIAL: + if (++EggCount == 15) + { + if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) + { + SetData(DATA_EGG_EVENT, DONE); + razor->RemoveAurasDueToSpell(42013); // MindControl + DoRemoveAurasDueToSpellOnPlayers(42013); + } + _events.ScheduleEvent(EVENT_RAZOR_PHASE_TWO, IN_MILLISECONDS); + _events.CancelEvent(EVENT_RAZOR_SPAWN); + } + if (EggEvent == NOT_STARTED) + SetData(DATA_EGG_EVENT, IN_PROGRESS); + break; + } + } + } + + void OnUnitDeath(Unit* unit) + { + //! HACK, needed because of buggy CreatureAI after charm + if (unit->GetEntry() == NPC_RAZORGORE && GetBossState(BOSS_RAZORGORE) != DONE) + SetBossState(BOSS_RAZORGORE, DONE); + } + + void Update(uint32 diff) + { + if (_events.Empty()) + return; + + _events.Update(diff); + + while (uint32 eventId = _events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_RAZOR_SPAWN: + for (uint8 i = urand(2, 5); i > 0 ; --i) + if (Creature* summon = instance->SummonCreature(Entry[urand(0, 5)], SummonPosition[urand(0, 8)])) + summon->SetInCombatWithZone(); + _events.ScheduleEvent(EVENT_RAZOR_SPAWN, urand(12, 17)*IN_MILLISECONDS); + break; + case EVENT_RAZOR_PHASE_TWO: + _events.CancelEvent(EVENT_RAZOR_SPAWN); + if (Creature* razor = instance->GetCreature(RazorgoreTheUntamedGUID)) + razor->AI()->DoAction(ACTION_PHASE_TWO); + break; + case EVENT_RESPAWN_NEFARIUS: + if (Creature* nefarius = instance->GetCreature(LordVictorNefariusGUID)) + { + nefarius->SetPhaseMask(1, true); + nefarius->setActive(true); + nefarius->Respawn(); + nefarius->GetMotionMaster()->MoveTargetedHome(); + } + break; + } + } + } + + protected: + // Misc + EventMap _events; + // Razorgore + uint8 EggCount; + uint32 EggEvent; + uint64 RazorgoreTheUntamedGUID; + uint64 RazorgoreDoorGUID; + std::list EggList; + + // Vaelastrasz the Corrupt + uint64 VaelastraszTheCorruptGUID; + uint64 VaelastraszDoorGUID; + + // Broodlord Lashlayer + uint64 BroodlordLashlayerGUID; + uint64 BroodlordDoorGUID; + + // 3 Dragons + uint64 FiremawGUID; + uint64 EbonrocGUID; + uint64 FlamegorGUID; + uint64 ChrommagusDoorGUID; + + // Chormaggus + uint64 ChromaggusGUID; + uint64 NefarianDoorGUID; + + // Nefarian + uint64 LordVictorNefariusGUID; + uint64 NefarianGUID; + }; + + InstanceScript* GetInstanceScript(InstanceMap* map) const + { + return new instance_blackwing_lair_InstanceMapScript(map); + } +}; + +void AddSC_instance_blackwing_lair() +{ + new instance_blackwing_lair(); +} \ No newline at end of file diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt index f581baa31fa..1d1e40ca042 100644 --- a/src/server/scripts/EasternKingdoms/CMakeLists.txt +++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt @@ -174,7 +174,7 @@ set(scripts_STAT_SRCS EasternKingdoms/BlackwingLair/boss_vaelastrasz.cpp EasternKingdoms/BlackwingLair/boss_nefarian.cpp EasternKingdoms/BlackwingLair/boss_flamegor.cpp - EasternKingdoms/BlackwingLair/boss_victor_nefarius.cpp + EasternKingdoms/BlackwingLair/blackwing_lair.h EasternKingdoms/zone_blasted_lands.cpp EasternKingdoms/zone_stormwind_city.cpp EasternKingdoms/ZulAman/boss_halazzi.cpp -- cgit v1.2.3 From b02b2605049de89b3b22361263a2891018c67b71 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Mon, 24 Jun 2013 21:32:49 +0200 Subject: DB/Misc: Fix startup errors --- sql/updates/world/2013_06_24_01_world_misc.sql | 4 ++-- sql/updates/world/2013_06_24_02_world_misc.sql | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 sql/updates/world/2013_06_24_02_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_24_01_world_misc.sql b/sql/updates/world/2013_06_24_01_world_misc.sql index 1379c6cbc75..54487e129de 100644 --- a/sql/updates/world/2013_06_24_01_world_misc.sql +++ b/sql/updates/world/2013_06_24_01_world_misc.sql @@ -91,8 +91,8 @@ INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `positi (@OGUID+1, 179122, 469, 1, 1, -7691.453, -1040.233, 440.6851, 3.752462, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), (@OGUID+2, 153723, 469, 1, 1, -7752.402, -1155.65, 396.6956, 3.33359, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), (@OGUID+3, 179148, 469, 1, 1, -7510.984, -1094.69, 476.5545, 5.340709, 0, 0, 0, 1, 7200, 255, 1), -(@OGUID+4, 149045, 469, 1, 1, -6904.809, -1206.778, 178.5116, 2.984498, 0, 0, 1, -4.371139E-08, 7200, 255, 24), -(@OGUID+5, 149046, 469, 1, 1, -6900.417, -1339.326, 239.6519, 3.394674, 0, 0, 1, -4.371139E-08, 7200, 255, 24), +(@OGUID+4, 149045, 469, 1, 1, -6904.809, -1206.778, 178.5116, 2.984498, 0, 0, 1, -4.371139E-08, 7200, 255, 1), +(@OGUID+5, 149046, 469, 1, 1, -6900.417, -1339.326, 239.6519, 3.394674, 0, 0, 1, -4.371139E-08, 7200, 255, 1), (@OGUID+6, 161536, 469, 1, 1, -6756.733, -1166.698, 187.0418, 1.317723, 0, 0, 0.9969173, -0.07845917, 7200, 255, 1), (@OGUID+7, 179113, 469, 1, 1, -7629.542, -1017.326, 413.3823, 6.06502, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), (@OGUID+8, 179112, 469, 1, 1, -7628.558, -1012.672, 413.3823, 5.750863, 0, 0, 0.9537169, -0.3007059, 7200, 255, 1), diff --git a/sql/updates/world/2013_06_24_02_world_misc.sql b/sql/updates/world/2013_06_24_02_world_misc.sql new file mode 100644 index 00000000000..9468fd00b8b --- /dev/null +++ b/sql/updates/world/2013_06_24_02_world_misc.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject` SET `state`=1 WHERE `guid` IN (56162,56163); -- correct? +DELETE FROM `linked_respawn` WHERE `guid` NOT IN (SELECT `guid` FROM `creature`); -- cgit v1.2.3 From 4fc1fdbb6d8ff7d2e3538e639bd6690d2f9b901c Mon Sep 17 00:00:00 2001 From: Kirkhammett Date: Tue, 25 Jun 2013 01:01:07 +0200 Subject: DB/SAI: add SAI support for The Sum is Greater than the Parts Closes #9869 --- sql/updates/world/2013_06_25_00_world_sai.sql | 106 ++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sql/updates/world/2013_06_25_00_world_sai.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_00_world_sai.sql b/sql/updates/world/2013_06_25_00_world_sai.sql new file mode 100644 index 00000000000..cd316bf4732 --- /dev/null +++ b/sql/updates/world/2013_06_25_00_world_sai.sql @@ -0,0 +1,106 @@ +-- The Sum is Greater than the Parts (13043) +-- http://www.youtube.com/watch?v=dg84C1d-sxw + +SET @QUEST := 13043; -- The quest...Duh! +SET @NPC_NERGELD := 30403; -- Nergeld +SET @NPC_DR_TERRIBLE := 30404; -- Dr. Terrible +SET @NPC_HOUND := 30432; -- Grimmr Hound +SET @NPC_ASSAILANT := 30471; -- Vargul Assailant +SET @AURA_ROOT := 59037; -- The Sum is Greater than the Parts: Nergeld's Freeze Anim +SET @SPELL_DEATH_SIGNAL := 32067; -- The Sum is Greater than the Parts: Dr. Terrible's Death Signal +SET @SPELL_MOUNT := 56699; -- Controlling Nergeld + +-- Remove random movement from Nergeld +UPDATE `creature` SET `spawndist`=0,`MovementType`=0 WHERE `guid`=124127; +DELETE FROM `creature_addon` WHERE `guid`=124127; + +UPDATE `creature_model_info` SET `combat_reach`=4.05 WHERE `modelid`=27102; + +UPDATE `creature_template` SET `AIName`='SmartAI',`spell1`=56746,`spell2`=56748,`spell3`=56747,`spell4`=60540,`speed_run`=0.992062866687775,`VehicleId`=236,`unit_flags`=256|32768/*256|512|32768*/,`npcflag`=0x1000000 WHERE `entry`=@NPC_NERGELD; +UPDATE `creature_template` SET `faction_A`=974,`faction_H`=974,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_HOUND; +UPDATE `creature_template` SET `faction_A`=2116,`faction_H`=2116,`unit_flags`=32768,`AIName`='SmartAI' WHERE `entry`=@NPC_ASSAILANT; +UPDATE `creature_template` SET `faction_A`=974,`faction_H`=974,`unit_flags`=32832,`AIName`='SmartAI' WHERE `entry`=@NPC_DR_TERRIBLE; + +DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_NERGELD; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@NPC_NERGELD,0,0x0,0x1,''); -- 59037 The Sum is Greater than the Parts: Nergeld's Freeze Anim + +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId`=16 AND `SourceEntry`=@NPC_NERGELD) OR (`SourceTypeOrReferenceId`=13 AND `SourceEntry`=56747) OR (`SourceTypeOrReferenceId`=13 AND `SourceEntry`=56746) OR (`SourceTypeOrReferenceId`=18 AND `SourceEntry`=@SPELL_MOUNT) OR(`SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_DEATH_SIGNAL); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(16,0,@NPC_NERGELD,0,0,23,0,4595,0,0,0,0,0,'','Dismount player when not in intended zone'), +(13,1,56747,0,0,31,0,3,@NPC_ASSAILANT,0,0,0,0,'','Stomp can target Vargul Assailant'), +(13,1,56747,0,1,31,0,3,@NPC_HOUND,0,0,0,0,'','Stomp can target Grimmr Hound'), +(13,1,56747,0,2,31,0,3,@NPC_DR_TERRIBLE,0,0,0,0,'','Stomp can target Dr. Terrible'), +(13,1,56746,0,0,31,0,3,@NPC_ASSAILANT,0,0,0,0,'','Punch can target Vargul Assailant'), +(13,1,56746,0,1,31,0,3,@NPC_HOUND,0,0,0,0,'','Punch can target Grimmr Hound'), +(13,1,56746,0,2,31,0,3,@NPC_DR_TERRIBLE,0,0,0,0,'','Punch can target Dr. Terrible'), +(18,@NPC_NERGELD,@SPELL_MOUNT,0,0,28,0,@QUEST,0,0,1,0,0,'','Spellclick when quest not complete'), +(18,@NPC_NERGELD,@SPELL_MOUNT,0,0,9,0,@QUEST,0,0,0,0,0,'','Spellclick when quest taken'), +(13,2,@SPELL_DEATH_SIGNAL,0,1,31,0,3,@NPC_DR_TERRIBLE,0,0,0,0,'','Dr. Terrible''s Death Signal effect1 targets Dr. Terrible'), +(13,1,@SPELL_DEATH_SIGNAL,0,1,31,0,3,@NPC_NERGELD,0,0,0,0,'','Dr. Terrible''s Death Signal effect0 targets Nergeld'); + + + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@NPC_NERGELD,@NPC_DR_TERRIBLE,@NPC_HOUND,@NPC_ASSAILANT) OR (`source_type`=9 AND `entryorguid`=@NPC_NERGELD*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 +-- Nergeld +(@NPC_NERGELD,0,0,0,11,0,100,0,0,0,0,0,75,@AURA_ROOT,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Respawn add root aura'), +(@NPC_NERGELD,0,1,0,28,0,100,0,0,0,0,0,75,@AURA_ROOT,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Passenger Removed add root aura'), +(@NPC_NERGELD,0,2,3,27,0,100,0,0,0,0,0,28,@AURA_ROOT,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Passenger Boarded remove root aura'), +(@NPC_NERGELD,0,3,4,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Passenger Boarded Talk'), +(@NPC_NERGELD,0,4,5,61,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Passenger Boarded Set State Passive'), +(@NPC_NERGELD,0,5,0,61,0,100,0,0,0,0,0,80,@NPC_NERGELD*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'On Passenger Boarded Run SCript'), +(@NPC_NERGELD,0,6,7,8,0,100,0,@SPELL_DEATH_SIGNAL,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Spellhit Say'), +(@NPC_NERGELD,0,7,0,61,0,100,0,0,0,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Spellhit Die'), +-- Wave 1 05:22:46.000 +(@NPC_NERGELD*100,9,0,0,0,0,100,0,5000,5000,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,7993.895,3336.905,632.3955,0.1457695,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,1,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8003.723,3323.562,632.3955,0.6487832,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,2,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8026.945,3307.581,632.3955,1.482069,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,3,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8001.774,3306.377,632.3955,0.8634474,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,4,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,7987.904,3308.895,632.3955,0.6805801,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,5,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8016.516,3318.92,632.3956,0.940311,'On Script - Spawn Vargul'), +-- Wave 2 05:23:06.000 +(@NPC_NERGELD*100,9,6,0,0,0,100,0,30000,30000,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,7996.656,3308.777,632.3955,0.7732307,'On Script - Spawn Grimmr Hound'), +(@NPC_NERGELD*100,9,7,0,0,0,100,0,0,0,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,8011.714,3315.362,632.3955,0.9011694,'On Script - Spawn Grimmr Hound'), +(@NPC_NERGELD*100,9,8,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8000.665,3317.225,632.3955,0.7105912,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,9,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8025.243,3313.552,632.3955,1.286934,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,10,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8007.712,3337.127,632.3955,0.4072851,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,11,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8009.925,3319.814,632.3955,0.8048422,'On Script - Spawn Vargul'), +-- Wave 3 05:23:26.000 +(@NPC_NERGELD*100,9,12,0,0,0,100,0,30000,30000,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,8021.793,3312.446,632.3955,1.130859,'On Script - Spawn Grimmr Hound'), +(@NPC_NERGELD*100,9,13,0,0,0,100,0,0,0,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,8001.362,3332.711,632.3955,0.4433513,'On Script - Spawn Grimmr Hound'), +(@NPC_NERGELD*100,9,14,0,0,0,100,0,0,0,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,7999.219,3302.518,632.3955,0.8723419,'On Script - Spawn Grimmr Hound'), +(@NPC_NERGELD*100,9,15,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8000.495,3345.769,632.3955,5.823889,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,16,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8001.774,3311.945,632.3955,0.797157,'On Script - Spawn Vargul'), +(@NPC_NERGELD*100,9,17,0,0,0,100,0,0,0,0,0,12,@NPC_ASSAILANT,2,300000,0,0,0,8,0,0,0,8012.214,3325.824,632.3955,0.7376673,'On Script - Spawn Vargul'), +-- Wave 4 05:23:47.000 +(@NPC_NERGELD*100,9,18,0,0,0,100,0,31000,31000,0,0,12,@NPC_DR_TERRIBLE,2,300000,0,1,0,8,0,0,0,7985.901,3296.679,632.4788,0.8377581,'On Script - Spawn Dr. Terrible'), +(@NPC_NERGELD*100,9,19,0,0,0,100,0,0,0,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,7982.587,3301.807,632.4788,0.6981317,'On Script - Spawn Grimmr Hound'), +(@NPC_NERGELD*100,9,20,0,0,0,100,0,0,0,0,0,12,@NPC_HOUND,2,300000,0,0,0,8,0,0,0,7991.366,3293.512,632.4788,0.9075712,'On Script - Spawn Grimmr Hound'), +-- Dr. Terrible +(@NPC_DR_TERRIBLE,0,0,0,25,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,@NPC_NERGELD,0,0,0,0,0,0,'On spawn attack npc'), +(@NPC_DR_TERRIBLE,0,1,0,4,0,100,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say on Aggro'), +(@NPC_DR_TERRIBLE,0,2,0,0,0,100,0,8000,8000,15000,19000,11,61143,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Crazed Chop'), +(@NPC_DR_TERRIBLE,0,3,0,0,0,100,0,10000,12000,28000,33000,11,61146,0,0,0,0,0,5,0,0,0,0,0,0,0,'Cast Slime Stream'), +(@NPC_DR_TERRIBLE,0,4,5,2,0,100,1,0,45,0,0,11,31730,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Heal at 45% HP'), +(@NPC_DR_TERRIBLE,0,5,0,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say Text'), +(@NPC_DR_TERRIBLE,0,6,7,6,0,100,1,0,0,0,0,11,@SPELL_DEATH_SIGNAL,2,0,0,0,0,1,0,0,0,0,0,0,0,'Cast on Death'), +(@NPC_DR_TERRIBLE,0,7,0,61,0,100,0,0,0,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Say on Death'), +-- Grimmr Hound +(@NPC_HOUND,0,0,0,25,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,@NPC_NERGELD,0,0,0,0,0,0,'On spawn attack npc'), +(@NPC_HOUND,0,1,0,8,0,100,0,@SPELL_DEATH_SIGNAL,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Spellhit Despawn'), +-- Vargul Assailant +(@NPC_ASSAILANT,0,0,0,25,0,100,0,0,0,0,0,49,0,0,0,0,0,0,19,@NPC_NERGELD,0,0,0,0,0,0,'On spawn attack npc'), +(@NPC_ASSAILANT,0,1,0,8,0,100,0,@SPELL_DEATH_SIGNAL,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On Spellhit Despawn'), +(@NPC_ASSAILANT,0,2,0,0,0,100,0,4500,5599,13400,15600,11,43410,0,0,0,0,0,2,0,0,0,0,0,0,0,'Cast Chop'), +(@NPC_ASSAILANT,0,3,0,0,0,100,0,8000,9000,35000,37000,11,23262,0,0,0,0,0,1,0,0,0,0,0,0,0,'Cast Demoralize'); + + +-- NPC talk text insert +DELETE FROM `creature_text` WHERE `entry` IN (@NPC_DR_TERRIBLE,@NPC_NERGELD); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_DR_TERRIBLE,0,0,'WHO DARES?! I AM GOING TO FLAY THE FLESH FROM YOUR BONES EVEN IF I HAVE TO DESTROY NERGELD TO GET TO YOU!',14,0,100,0,0,0,'Dr. Terrible'), +(@NPC_DR_TERRIBLE,1,0,'Now the nightmare''s real.Now Dr. Terrible is here.To make you quake with fear.To make the whole world kneel.And I won''t feel ...a thing',12,0,100,0,0,0,'Dr. Terrible'), +(@NPC_DR_TERRIBLE,2,0,'I''LL RISE AGAIN AND WHEN I DO I WILL HAVE MY REVENGE!.',14,0,100,0,0,0,'Dr. Terrible to Nergeld'), +(@NPC_NERGELD,0,0,'As you jump into Nergeld, the rotting flesh of the construct comes to life.',16,0,100,0,0,0,'Nergeld'), +(@NPC_NERGELD,1,0,'%s falls to pieces.',16,0,100,0,0,0,'Nergeld to Dr. Terrible'); -- cgit v1.2.3 From 8ead61c2dbf6c0214fdcc5c2a4d65630a3c93cd5 Mon Sep 17 00:00:00 2001 From: Kirkhammett Date: Tue, 25 Jun 2013 01:05:47 +0200 Subject: DB/SAI: add SAI support for Neutralizing the Plague Closes #10025 --- sql/updates/world/2013_06_25_01_world_sai.sql | 118 ++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 sql/updates/world/2013_06_25_01_world_sai.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_01_world_sai.sql b/sql/updates/world/2013_06_25_01_world_sai.sql new file mode 100644 index 00000000000..c2c54eebcc3 --- /dev/null +++ b/sql/updates/world/2013_06_25_01_world_sai.sql @@ -0,0 +1,118 @@ +SET @CGUID := 15; +SET @GOGUID := 5196; -- Set by TDB, these are free guids. +SET @KC_TARGET := 31773; +SET @KC_TARGET2 := 32442; +SET @PC_BUNNY := 32445; +SET @SUMM_PC_BUNNY := 61026; +SET @GREEN_SPLASH := 60059; +SET @SPELL := 59655; +SET @SPELL_DOSE := 59659; +SET @GHOUL := 32178; +SET @LIVING_PLAGUE := 32181; +SET @SUMMON_LPLAGUE := 60058; +SET @SUMMON_GHOUL := 60056; +SET @RADIATION_AURA := 45797; +SET @KILL_CREDIT := 31767; + +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `faction_A`=21, `faction_H`=21, `speed_walk`=1.142857, `speed_run`=1, `mindmg`=286, `maxdmg`=322, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0, `Health_mod`=3 WHERE `entry`=32181; -- Living Plague +UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `faction_A`=21, `faction_H`=21, `speed_walk`=1.428571, `speed_run`=4, `mindmg`=98, `maxdmg`=134, `rangeattacktime`=2000, `unit_flags`=32768, `dynamicflags`=0, `Health_mod`=4 WHERE `entry`=32178; -- Rampaging Ghoul +UPDATE `creature_template` SET `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `dynamicflags`=0 WHERE `entry`=32442; -- Plague Cauldron Target 02 +UPDATE `creature_template` SET `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `dynamicflags`=0 WHERE `entry`=31773; -- Plague Cauldron Target +UPDATE `creature_template` SET `modelid1`=21342, `modelid2`=0, `flags_extra`= 128 WHERE `entry`=@PC_BUNNY; +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (@KC_TARGET,@KC_TARGET2,@PC_BUNNY,@LIVING_PLAGUE,@GHOUL); +UPDATE `gameobject_template` SET `data1`=30 WHERE `entry`=300239; + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` IN (@LIVING_PLAGUE,@GHOUL); +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 +(@GHOUL, 0, 0, 0, 0, 0, 100,0, 5000, 17000, 29000, 42000, 11, 54475, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Rampaging Ghoul - In Combat - Cast Rampage'), +(@GHOUL, 0, 1, 0, 0, 0, 100,0, 2000, 14000, 25000, 34000, 11, 6016, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Rampaging Ghoul - In Combat - Cast Pierce Armor'), +(@GHOUL, 0, 2, 3, 54, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rampaging Ghoul - Just Summoned - Set React State Aggresive'), +(@GHOUL, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 46, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Rampaging Ghoul - On Link - Move Forward'), +(@GHOUL, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Rampaging Ghoul - On Link - Attack Hostile Random'), +-- Living Plague AI +(@LIVING_PLAGUE, 0, 1, 2, 54, 0, 100, 0, 0, 0, 0, 0, 8, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Living Plague - Just Summoned - Set React State Aggresive'), +(@LIVING_PLAGUE, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 46, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Living Plague - On Link - Move Forward'), +(@LIVING_PLAGUE, 0, 3, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Living Plague - On Link - Attack Hostile Random'); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@KC_TARGET; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@KC_TARGET*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 +(@KC_TARGET, 0, 0, 1, 8, 0, 100, 0, @SPELL_DOSE, 0, 0, 0, 80, @KC_TARGET*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Bunny - On spell hit - Trigger script'), +(@KC_TARGET, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Target - On Link - Say Text 0'), +(@KC_TARGET, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, @RADIATION_AURA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Target - On Link - Aura Radiation'), +(@KC_TARGET, 0, 3, 0, 38, 0, 100, 0, 1, 2, 0, 0, 28, @RADIATION_AURA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Target - On Data Set - Remove Aura'), +(@KC_TARGET*100, 9, 0, 0, 0, 0, 100, 0, 4000, 4000, 4000, 4000, 11, @SUMM_PC_BUNNY, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'KC Target - Script - Summon Bunny'); + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@KC_TARGET2; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@KC_TARGET2*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 +(@KC_TARGET2, 0, 0, 1, 8, 0, 100, 0, @SPELL_DOSE, 0, 0, 0, 80, @KC_TARGET*100, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Bunny - On spell hit - Trigger script'), +(@KC_TARGET2, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Target - On Link - Say Text 0'), +(@KC_TARGET2, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, @RADIATION_AURA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Target - On Link - Aura Radiation'), +(@KC_TARGET2, 0, 3, 0, 38, 0, 100, 0, 1, 1, 0, 0, 28, @RADIATION_AURA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'KC Target - On Data Set - Remove Aura'), +(@KC_TARGET2*100, 9, 0, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 11, @SUMM_PC_BUNNY, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'KC Target - Script - Summon Bunny'); + + +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@PC_BUNNY; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND `entryorguid` IN (@PC_BUNNY*100,@PC_BUNNY*100+1,@PC_BUNNY*100+2); +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 +(@PC_BUNNY, 0, 0, 1, 54, 0, 100, 0, 0, 0, 0, 0, 87, @PC_BUNNY*100, @PC_BUNNY*100+1, @PC_BUNNY*100+2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'PC Bunny - Just Summoned - Trigger script'), +(@PC_BUNNY, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'PC Bunny - On Link - Say Text 0'), +(@PC_BUNNY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, @GREEN_SPLASH, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'PC Bunny - On Link - Cast cosmetic Green Splash'), +-- First Action Event +(@PC_BUNNY*100, 9, 1, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 11, @SUMMON_GHOUL, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Ghoul'), +(@PC_BUNNY*100, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100, 9, 4, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, @KC_TARGET2, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Set Data 1 1'), +(@PC_BUNNY*100, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 19, @KC_TARGET, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Set Data 1 2'), +(@PC_BUNNY*100, 9, 6, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Despawn'), +-- Third Action Event +(@PC_BUNNY*100+2, 9, 1, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100+2, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100+2, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100+2, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100+2, 9, 5, 0, 0, 0, 100, 1, 10500, 10500, 10500, 10500, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Say 1'), +(@PC_BUNNY*100+2, 9, 6, 0, 0, 0, 100, 0, 2000, 2000, 2000, 2000, 11, @SUMMON_GHOUL, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Ghoul'), +(@PC_BUNNY*100+2, 9, 7, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100+2, 9, 8, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 11, @SUMMON_LPLAGUE, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Summon Living Plague'), +(@PC_BUNNY*100+2, 9, 9, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, @KC_TARGET2, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Set Data 1 1'), +(@PC_BUNNY*100+2, 9, 10, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 19, @KC_TARGET, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Set Data 1 2'), +(@PC_BUNNY*100+2, 9, 11, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Despawn'), +-- Second Action Event +(@PC_BUNNY*100+1, 9, 0, 0, 0, 0, 100, 0, 7000, 7000, 7000, 7000, 33, @KILL_CREDIT, 0, 0, 0, 0, 0, 21, 50, 0, 0, 0, 0, 0, 0, 'KC Target - On spellhit - Give quest credit'), +(@PC_BUNNY*100+1, 9, 1, 0, 0, 0, 100, 0, 1500, 1500, 1500, 1500, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Say 1'), +(@PC_BUNNY*100+1, 9, 2, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 19, @KC_TARGET2, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Set Data 1 1'), +(@PC_BUNNY*100+1, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 45, 1, 2, 0, 0, 0, 0, 19, @KC_TARGET, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Set Data 1 2'), +(@PC_BUNNY*100+1, 9, 4, 0, 0, 0, 100, 0, 1000, 1000, 1000, 1000, 41, 1000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,'PC Bunny - On Script - Despawn'); + + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=59655; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 59655, 0, 1, 31, 0, 3, 31773, 0, 0, 0, 0, '', 'Neutralize Plague hits Plague Cauldron Target Bunny'), +(13, 1, 59655, 0, 0, 31, 0, 3, 32442, 0, 0, 0, 0, '', 'Neutralize Plague hits Plague Cauldron Target Bunny'); + +DELETE FROM `creature` WHERE `id` IN (31773,32442); +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `MovementType`) VALUES +(@CGUID, 31773, 571, 1, 1, 6776.598, 1628.575, 392.1221, 4.729842, 120, 0, 0), -- Plague Cauldron Target (Area: Mord'rethar: The Death Gate) +(@CGUID+1, 32442, 571, 1, 1, 6777.509, 1539.352, 392.1735, 1.623156, 120, 0, 0); -- Plague Cauldron Target 02 (Area: Mord'rethar: The Death Gate) + +DELETE FROM `gameobject` WHERE `id` IN (300239); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(@GOGUID, 300239, 571, 1, 1, 6776.6, 1628.57, 390.922, 5.39315, 0, 0, 0.430474, -0.902603, 300, 0, 1), +(@GOGUID+1, 300239, 571, 1, 1, 6777.51, 1539.35, 390.874, 1.62316, 0, 0, 0.725376, 0.688353, 300, 0, 1); + + +DELETE FROM `creature_template_addon` WHERE `entry` IN (31150,32442,@LIVING_PLAGUE,@GHOUL); +INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES +(31150, 0, 0x0, 0x1, '50106'), -- +(32442, 0, 0x0, 0x1, ''), +(32181, 0, 0x0, 0x1, '61587'), -- Living Plague - Living Plague +(32178, 0, 0x0, 0x1, '58812'); -- Rampaging Ghoul - Ghoul Aura + +DELETE FROM `creature_text` WHERE `entry` IN (@KC_TARGET,@KC_TARGET2,@PC_BUNNY); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(@PC_BUNNY, 0, 0, 'Something emerges from the cauldron!', 41, 0, 100, 0, 0, 0, 'Player Bunny'), +(@PC_BUNNY, 1, 0, 'The cauldron continues to boil...', 41, 0, 100, 0, 0, 0, 'Player Bunny'), +(@PC_BUNNY, 2, 0, 'Plague batch neutralized!', 41, 0, 100, 0, 0, 0, 'Player Bunny'), +(@KC_TARGET, 0, 0, 'The plague cauldron begins to boil vigorously!', 41, 0, 100, 0, 0, 0, 'Plague Cauldron Target'), +(@KC_TARGET2, 0, 0, 'The plague cauldron begins to boil vigorously!', 41, 0, 100, 0, 0, 0, 'Plague Cauldron Target 02'); -- cgit v1.2.3 From 9ca2b8b852d7e6bfbaece590a1c541b1a44a6134 Mon Sep 17 00:00:00 2001 From: Kirkhammett Date: Tue, 25 Jun 2013 01:08:19 +0200 Subject: [DB/SAI] add SAI support for Pushed too far (Quest 12869) Closes #10066 --- sql/updates/world/2013_06_25_02_world_sai.sql | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sql/updates/world/2013_06_25_02_world_sai.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_02_world_sai.sql b/sql/updates/world/2013_06_25_02_world_sai.sql new file mode 100644 index 00000000000..b681f5c05e3 --- /dev/null +++ b/sql/updates/world/2013_06_25_02_world_sai.sql @@ -0,0 +1,31 @@ +SET @ENTRY := 29732; +SET @GOSSIP := 9891; +SET @EAGLE := 29736; + +UPDATE `creature_template` SET `VehicleId`=243,`InhabitType`=3,`AIName`= 'SmartAI' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; +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,62,0,100,0,@GOSSIP,1,0,0,11,56411,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Fjorlin Frostbrow - On gossip option 1 select - Cast 56411 on player'), +(@ENTRY,0,1,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Fjorlin Frostbrow - On gossip option 1 select - Close gossip'); + +UPDATE `creature_template` SET `npcflag` = `npcflag`|16777217, `IconName`='vehichleCursor', `VehicleId`=216, `spell1`=55958, `spell2`=55936 WHERE `entry`=@EAGLE; +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=@EAGLE; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(@EAGLE,43671,1,0); + +DELETE FROM `creature_template_addon` WHERE entry = @EAGLE; +INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES +(@EAGLE,0,0,33554432,0,0,'55971'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP AND `SourceEntry`=1; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@GOSSIP,1,0,9,12869,0,0,0,'','Show gossip option 1 if player has quest 12869'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`IN (55958,55936); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(17,0,55958,0,0,31,1,3,@DRAKE,0,0,0,0,'','Stormbolt only hits Stormpeak Wyrm'), +(17,0,55936,0,0,31,1,3,@DRAKE,0,0,0,0,'','Swoop only hits Stormpeak Wyrm'); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP AND `id`=1; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIP,1,0, 'I am ready to join the battle against the wyrms. Do you have an eagle ready for me, Fjorlin?',1,1,0,0,0,0, ''); -- cgit v1.2.3 From 4b0ca6831a6e318d51f18161f9d3b1237d6bfc5e Mon Sep 17 00:00:00 2001 From: ZxBiohazardZx Date: Tue, 25 Jun 2013 01:14:09 +0200 Subject: DB/Commit: add DRAKE define to fix query --- sql/updates/world/2013_06_25_02_world_sai.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_02_world_sai.sql b/sql/updates/world/2013_06_25_02_world_sai.sql index b681f5c05e3..c394f74b51f 100644 --- a/sql/updates/world/2013_06_25_02_world_sai.sql +++ b/sql/updates/world/2013_06_25_02_world_sai.sql @@ -1,6 +1,7 @@ SET @ENTRY := 29732; SET @GOSSIP := 9891; SET @EAGLE := 29736; +SET @DRAKE := 29753; UPDATE `creature_template` SET `VehicleId`=243,`InhabitType`=3,`AIName`= 'SmartAI' WHERE `entry`=@ENTRY; DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY; -- cgit v1.2.3 From c2992cf55d9d43a13086a948d2c252eac89e9e7c Mon Sep 17 00:00:00 2001 From: Malcrom Date: Tue, 25 Jun 2013 00:12:21 -0230 Subject: DB/Misc: Some updates for BRS & BWL --- sql/updates/world/2013_06_25_03_world_misc.sql | 241 +++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 sql/updates/world/2013_06_25_03_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_03_world_misc.sql b/sql/updates/world/2013_06_25_03_world_misc.sql new file mode 100644 index 00000000000..7b3b208dd15 --- /dev/null +++ b/sql/updates/world/2013_06_25_03_world_misc.sql @@ -0,0 +1,241 @@ +-- Add Missing Gossip from sniff +DELETE FROM `gossip_menu` WHERE `entry`=6001 AND `text_id`=7154; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (6001,7154); + +-- Add some missing spawns to BRS +SET @GUID := 20; -- 4 Guids required +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+3; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(@GUID,10447,229,1,1,0,0,202.5113,-421.307,110.9865,3.124139,7200,0,0,1,0,0), +(@GUID+1,10442,229,1,1,0,0,204.0151,-418.4425,110.9892,3.193953,7200,0,0,1,0,0), +(@GUID+2,10442,229,1,1,0,0,203.1424,-423.9987,110.9864,3.071779,7200,0,0,1,0,0), +(@GUID+3,10442,229,1,1,0,0,201.0076,-416.648,110.9738,3.228859,7200,0,0,1,0,0); + +-- Add some missing spawns to BWL +SET @GUID := 61997; -- 3 Guids required +DELETE FROM `creature` WHERE `guid` BETWEEN @GUID AND @GUID+3; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`MovementType`) VALUES +(@GUID,12458,469,1,1,0,0,-7663.987,-1021.786,440.242,3.124139,7200,0,0,1,0,2), +(@GUID+1,12458,469,1,1,0,0,-7632.956,-996.5212,440.263,3.193953,7200,0,0,1,0,2), +(@GUID+2,12458,469,1,1,0,0,-7639.315,-1088.736,449.1642,3.071779,7200,0,0,1,0,2); + +-- Fix walk speed for BWL npcs + +UPDATE `creature_template` SET `speed_walk`=2 WHERE `entry`=11981; +UPDATE `creature_template` SET `speed_walk`=2 WHERE `entry`=11983; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12017; +UPDATE `creature_template` SET `speed_walk`=0.888888 WHERE `entry`=12435; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12457; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12458; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12459; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12460; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12461; +UPDATE `creature_template` SET `speed_walk`=0.888888 WHERE `entry`=12463; +UPDATE `creature_template` SET `speed_walk`=0.888888 WHERE `entry`=12464; +UPDATE `creature_template` SET `speed_walk`=0.888888 WHERE `entry`=12465; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12467; +UPDATE `creature_template` SET `speed_walk`=0.888888 WHERE `entry`=12468; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=12557; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=13020; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=13996; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=14020; +UPDATE `creature_template` SET `speed_walk`=1.11111 WHERE `entry`=14022; +UPDATE `creature_template` SET `speed_walk`=1.11111 WHERE `entry`=14023; +UPDATE `creature_template` SET `speed_walk`=1.11111 WHERE `entry`=14024; +UPDATE `creature_template` SET `speed_walk`=1.11111 WHERE `entry`=14025; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=14262; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=14263; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=14264; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=14401; +UPDATE `creature_template` SET `speed_walk`=1 WHERE `entry`=14456; +UPDATE `creature_template` SET `speed_walk`=2 WHERE `entry`=14601; + +-- Delete bad spawn in BWL + +DELETE FROM `creature` WHERE `guid`=85787; + +-- some pathing for BWL + +-- Pathing for Blackwing Taskmaster Entry: 12458 +SET @NPC := @GUID; +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-7663.987,-1021.786,440.242,0,0,0,0,100,0), +(@PATH,2,-7660.584,-1033.68,440.1774,0,0,0,0,100,0), +(@PATH,3,-7672.197,-1040.59,440.1905,0,0,0,0,100,0), +(@PATH,4,-7677.878,-1033.48,439.9819,0,0,0,0,100,0), +(@PATH,5,-7682.595,-1022.212,439.9823,0,0,0,0,100,0), +(@PATH,6,-7692.392,-1018.374,440.2688,0,0,0,0,100,0), +(@PATH,7,-7700.767,-1021.952,440.5112,0,0,0,0,100,0), +(@PATH,8,-7705.208,-1015.368,440.3909,0,0,0,0,100,0), +(@PATH,9,-7705.208,-1015.368,440.3909,0,0,0,0,100,0), +(@PATH,10,-7700.767,-1021.952,440.5112,0,0,0,0,100,0), +(@PATH,11,-7692.392,-1018.374,440.2688,0,0,0,0,100,0), +(@PATH,12,-7682.595,-1022.212,439.9823,0,0,0,0,100,0), +(@PATH,13,-7677.878,-1033.48,439.9819,0,0,0,0,100,0), +(@PATH,14,-7672.197,-1040.59,440.1905,0,0,0,0,100,0), +(@PATH,15,-7660.584,-1033.68,440.1774,0,0,0,0,100,0), +(@PATH,16,-7663.987,-1021.786,440.242,0,0,0,0,100,0), +(@PATH,17,-7667.698,-1013.725,440.2188,0,0,0,0,100,0), +(@PATH,18,-7674.316,-1009.231,440.1985,0,0,0,0,100,0), +(@PATH,19,-7674.749,-1001.641,440.1816,0,0,0,0,100,0), +(@PATH,20,-7682.151,-1002.882,439.9836,0,0,0,0,100,0), +(@PATH,21,-7691.953,-996.8887,440.1367,0,0,0,0,100,0), +(@PATH,22,-7698.791,-993.4288,440.0823,0,0,0,0,100,0), +(@PATH,23,-7700.935,-1000.517,440.1191,0,0,0,0,100,0), +(@PATH,24,-7704.313,-1004.795,440.1128,0,0,0,0,100,0), +(@PATH,25,-7699.01,-1015.984,440.3897,0,0,0,0,100,0), +(@PATH,26,-7696.855,-1024.059,440.4334,0,0,0,0,100,0), +(@PATH,27,-7690.041,-1030.21,440.3844,0,0,0,0,100,0), +(@PATH,28,-7683.866,-1038.302,440.3743,0,0,0,0,100,0), +(@PATH,29,-7679.78,-1047.461,440.1281,0,0,0,0,100,0), +(@PATH,30,-7695.097,-1052.926,440.6745,0,0,0,0,100,0), +(@PATH,31,-7711.689,-1063.992,445.1763,0,0,0,0,100,0), +(@PATH,32,-7711.689,-1063.992,445.1763,0,0,0,0,100,0), +(@PATH,33,-7695.097,-1052.926,440.6745,0,0,0,0,100,0), +(@PATH,34,-7679.78,-1047.461,440.1281,0,0,0,0,100,0), +(@PATH,35,-7683.866,-1038.302,440.3743,0,0,0,0,100,0), +(@PATH,36,-7690.041,-1030.21,440.3844,0,0,0,0,100,0), +(@PATH,37,-7696.855,-1024.059,440.4334,0,0,0,0,100,0), +(@PATH,38,-7699.01,-1015.984,440.3897,0,0,0,0,100,0), +(@PATH,39,-7704.313,-1004.795,440.1128,0,0,0,0,100,0), +(@PATH,40,-7700.935,-1000.517,440.1191,0,0,0,0,100,0), +(@PATH,41,-7698.791,-993.4288,440.0823,0,0,0,0,100,0), +(@PATH,42,-7691.953,-996.8887,440.1367,0,0,0,0,100,0), +(@PATH,43,-7682.151,-1002.882,439.9836,0,0,0,0,100,0), +(@PATH,44,-7674.749,-1001.641,440.1816,0,0,0,0,100,0), +(@PATH,45,-7674.316,-1009.231,440.1985,0,0,0,0,100,0), +(@PATH,46,-7667.698,-1013.725,440.2188,0,0,0,0,100,0); +-- 0xF13030AA0000B535 .go -7663.987 -1021.786 440.242 + +-- Pathing for Blackwing Taskmaster Entry: 12458 +SET @NPC := @GUID+1; +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-7632.956,-996.5212,440.263,0,0,0,0,100,0), +(@PATH,2,-7626.135,-996.6401,440.2635,0,0,0,0,100,0), +(@PATH,3,-7619.718,-993.6684,440.0176,0,0,0,0,100,0), +(@PATH,4,-7614.898,-986.8362,440.0524,0,0,0,0,100,0), +(@PATH,5,-7619.713,-975.4172,440.2763,0,0,0,0,100,0), +(@PATH,6,-7626.255,-967.6956,440.3156,0,0,0,0,100,0), +(@PATH,7,-7634.491,-969.407,440.0258,0,0,0,0,100,0), +(@PATH,8,-7637.204,-978.4598,439.993,0,0,0,0,100,0), +(@PATH,9,-7649.554,-984.3552,440.2628,0,0,0,0,100,0), +(@PATH,10,-7661.772,-988.5689,439.9864,0,0,0,0,100,0), +(@PATH,11,-7658.341,-1002.132,439.9857,0,0,0,0,100,0), +(@PATH,12,-7647.332,-1011.346,439.9858,0,0,0,0,100,0), +(@PATH,13,-7637.399,-1010.427,439.9867,0,0,0,0,100,0), +(@PATH,14,-7636.273,-1000.11,440.2625,0,0,0,0,100,0), +(@PATH,15,-7622.676,-987.7399,440.0219,0,0,0,0,100,0), +(@PATH,16,-7625.999,-977.4044,440.0362,0,0,0,0,100,0), +(@PATH,17,-7649.094,-972.2944,440.2316,0,0,0,0,100,0), +(@PATH,18,-7644.41,-979.6061,440.2635,0,0,0,0,100,0), +(@PATH,19,-7634.969,-989.9937,440.2634,0,0,0,0,100,0), +(@PATH,20,-7624.835,-986.701,440.0168,0,0,0,0,100,0), +(@PATH,21,-7620.448,-985.0109,440.037,0,0,0,0,100,0), +(@PATH,22,-7610.641,-984.5477,440.2049,0,0,0,0,100,0), +(@PATH,23,-7595.672,-988.9937,440.0914,0,0,0,0,100,0), +(@PATH,24,-7595.672,-988.9937,440.0914,0,0,0,0,100,0), +(@PATH,25,-7610.641,-984.5477,440.2049,0,0,0,0,100,0), +(@PATH,26,-7620.448,-985.0109,440.037,0,0,0,0,100,0), +(@PATH,27,-7624.835,-986.701,440.0168,0,0,0,0,100,0), +(@PATH,28,-7634.969,-989.9937,440.2634,0,0,0,0,100,0), +(@PATH,29,-7644.41,-979.6061,440.2635,0,0,0,0,100,0), +(@PATH,30,-7649.094,-972.2944,440.2316,0,0,0,0,100,0), +(@PATH,31,-7625.999,-977.4044,440.0362,0,0,0,0,100,0), +(@PATH,32,-7622.676,-987.7399,440.0219,0,0,0,0,100,0), +(@PATH,33,-7636.273,-1000.11,440.2625,0,0,0,0,100,0), +(@PATH,34,-7637.399,-1010.427,439.9867,0,0,0,0,100,0), +(@PATH,35,-7647.332,-1011.346,439.9858,0,0,0,0,100,0), +(@PATH,36,-7658.341,-1002.132,439.9857,0,0,0,0,100,0), +(@PATH,37,-7661.772,-988.5689,439.9864,0,0,0,0,100,0), +(@PATH,38,-7649.554,-984.3552,440.2628,0,0,0,0,100,0), +(@PATH,39,-7637.204,-978.4598,439.993,0,0,0,0,100,0), +(@PATH,40,-7634.491,-969.407,440.0258,0,0,0,0,100,0), +(@PATH,41,-7626.357,-967.7826,440.0594,0,0,0,0,100,0), +(@PATH,42,-7619.713,-975.4172,440.2763,0,0,0,0,100,0), +(@PATH,43,-7614.898,-986.8362,440.0524,0,0,0,0,100,0), +(@PATH,44,-7619.718,-993.6684,440.0176,0,0,0,0,100,0), +(@PATH,45,-7626.135,-996.6401,440.2635,0,0,0,0,100,0), +(@PATH,46,-7632.956,-996.5212,440.263,0,0,0,0,100,0), +(@PATH,47,-7653.352,-993.4436,439.9867,0,0,0,0,100,0), +(@PATH,48,-7653.352,-993.4436,439.9867,0,0,0,0,100,0); +-- 0xF13030AA0000B53D .go -7632.956 -996.5212 440.263 + +-- Pathing for Blackwing Taskmaster Entry: 12458 +SET @NPC := @GUID+2; +SET @PATH := @NPC * 10; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-7639.315,-1088.736,449.1642,0,0,0,0,100,0), +(@PATH,2,-7644.75,-1097.218,449.1642,0,0,0,0,100,0), +(@PATH,3,-7651.393,-1110.778,449.193,0,0,0,0,100,0), +(@PATH,4,-7661.635,-1091.063,449.1826,0,0,0,0,100,0), +(@PATH,5,-7672.317,-1084.581,449.166,0,0,0,0,100,0), +(@PATH,6,-7678.168,-1087.581,449.1542,0,0,0,0,100,0), +(@PATH,7,-7671.085,-1100.425,449.1617,0,0,0,0,100,0), +(@PATH,8,-7665.083,-1108.27,449.1694,0,0,0,0,100,0), +(@PATH,9,-7658.763,-1114.884,449.1781,0,0,0,0,100,0), +(@PATH,10,-7670.01,-1119.684,449.1523,0,0,0,0,100,0), +(@PATH,11,-7680.338,-1118.28,449.134,0,0,0,0,100,0), +(@PATH,12,-7687.568,-1104.841,449.1463,0,0,0,0,100,0), +(@PATH,13,-7693.229,-1096.283,449.1507,0,0,0,0,100,0), +(@PATH,14,-7701.18,-1089.753,449.1177,0,0,0,0,100,0), +(@PATH,15,-7712.01,-1073.58,445.1763,0,0,0,0,100,0), +(@PATH,16,-7701.18,-1089.753,449.1177,0,0,0,0,100,0), +(@PATH,17,-7693.229,-1096.283,449.1507,0,0,0,0,100,0), +(@PATH,18,-7687.568,-1104.841,449.1463,0,0,0,0,100,0), +(@PATH,19,-7680.338,-1118.28,449.134,0,0,0,0,100,0), +(@PATH,20,-7670.01,-1119.684,449.1523,0,0,0,0,100,0), +(@PATH,21,-7658.763,-1114.884,449.1781,0,0,0,0,100,0), +(@PATH,22,-7665.083,-1108.27,449.1694,0,0,0,0,100,0), +(@PATH,23,-7671.085,-1100.425,449.1617,0,0,0,0,100,0), +(@PATH,24,-7678.168,-1087.581,449.1542,0,0,0,0,100,0), +(@PATH,25,-7672.317,-1084.581,449.166,0,0,0,0,100,0), +(@PATH,26,-7661.635,-1091.063,449.1826,0,0,0,0,100,0), +(@PATH,27,-7651.393,-1110.778,449.193,0,0,0,0,100,0), +(@PATH,28,-7644.75,-1097.218,449.1642,0,0,0,0,100,0); +-- 0xF13030AA0000B540 .go -7639.315 -1088.736 449.1642 + +-- Pathing for Blackwing Spellbinder Entry: 12457 +SET @NPC := 85758; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-7446.97,`position_y`=-945.069,`position_z`=464.9834 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-7446.97,-945.069,464.9834,0,0,0,0,100,0), +(@PATH,2,-7449.199,-935.9932,464.9834,0,0,0,0,100,0), +(@PATH,3,-7453.252,-931.2498,464.9834,0,0,0,0,100,0), +(@PATH,4,-7463.244,-933.8245,464.9834,0,7000,0,0,100,0), +(@PATH,5,-7456.518,-929.4488,464.9834,0,0,0,0,100,0), +(@PATH,6,-7451.187,-934.4731,464.9834,0,0,0,0,100,0), +(@PATH,7,-7440.787,-950.2525,464.9834,0,19000,0,0,100,0), +(@PATH,8,-7437.717,-955.0467,464.9747,0,0,0,0,100,0), +(@PATH,9,-7443.361,-947.8978,464.9834,0,12000,0,0,100,0); +-- 0xF13030A90000B57B .go -7446.97 -945.069 464.9834 + +-- Pathing for Death Talon Overseer Entry: 12461 +SET @NPC := 84557; +SET @PATH := @NPC * 10; +UPDATE `creature` SET `spawndist`=0,`MovementType`=2,`position_x`=-7513.689,`position_y`=-1048.273,`position_z`=449.242 WHERE `guid`=@NPC; +DELETE FROM `creature_addon` WHERE `guid`=@NPC; +INSERT INTO `creature_addon` (`guid`,`path_id`,`bytes2`,`mount`,`auras`) VALUES (@NPC,@PATH,1,0, ''); +DELETE FROM `waypoint_data` WHERE `id`=@PATH; +INSERT INTO `waypoint_data` (`id`,`point`,`position_x`,`position_y`,`position_z`,`orientation`,`delay`,`move_flag`,`action`,`action_chance`,`wpguid`) VALUES +(@PATH,1,-7513.689,-1048.273,449.242,0,0,0,0,100,0), +(@PATH,2,-7502.118,-1040.439,449.242,0,0,0,0,100,0), +(@PATH,3,-7492.288,-1033.455,449.242,0,0,0,0,100,0), +(@PATH,4,-7502.118,-1040.439,449.242,0,0,0,0,100,0), +(@PATH,5,-7513.689,-1048.273,449.242,0,0,0,0,100,0), +(@PATH,6,-7525.79,-1057.795,449.242,0,0,0,0,100,0); +-- 0xF13030AD0000B58D .go -7513.689 -1048.273 449.242 -- cgit v1.2.3 From b80d09fd6aad61bcceb429c982393d5dd89256fa Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Tue, 25 Jun 2013 18:28:22 +0200 Subject: DB/FactionChange: Add missing player_factionchange_spells for Black War Bear / Black War Mammoth --- sql/updates/characters/2013_03_23_00_characters_game_event.sql | 3 --- sql/updates/characters/2013_06_23_00_characters_game_event.sql | 3 +++ .../world/2013_06_25_00_world_player_factionchange_spells.sql | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) delete mode 100644 sql/updates/characters/2013_03_23_00_characters_game_event.sql create mode 100644 sql/updates/characters/2013_06_23_00_characters_game_event.sql create mode 100644 sql/updates/world/2013_06_25_00_world_player_factionchange_spells.sql (limited to 'sql/updates') diff --git a/sql/updates/characters/2013_03_23_00_characters_game_event.sql b/sql/updates/characters/2013_03_23_00_characters_game_event.sql deleted file mode 100644 index d8a58832ce1..00000000000 --- a/sql/updates/characters/2013_03_23_00_characters_game_event.sql +++ /dev/null @@ -1,3 +0,0 @@ --- Delete no longer used data from Characters Database -DELETE FROM `game_event_save` WHERE `eventEntry` BETWEEN 33 AND 47; -DELETE FROM `game_event_condition_save` WHERE `eventEntry` BETWEEN 33 AND 47; diff --git a/sql/updates/characters/2013_06_23_00_characters_game_event.sql b/sql/updates/characters/2013_06_23_00_characters_game_event.sql new file mode 100644 index 00000000000..d8a58832ce1 --- /dev/null +++ b/sql/updates/characters/2013_06_23_00_characters_game_event.sql @@ -0,0 +1,3 @@ +-- Delete no longer used data from Characters Database +DELETE FROM `game_event_save` WHERE `eventEntry` BETWEEN 33 AND 47; +DELETE FROM `game_event_condition_save` WHERE `eventEntry` BETWEEN 33 AND 47; diff --git a/sql/updates/world/2013_06_25_00_world_player_factionchange_spells.sql b/sql/updates/world/2013_06_25_00_world_player_factionchange_spells.sql new file mode 100644 index 00000000000..ee50f3ea952 --- /dev/null +++ b/sql/updates/world/2013_06_25_00_world_player_factionchange_spells.sql @@ -0,0 +1,5 @@ +DELETE FROM `player_factionchange_spells` WHERE `alliance_id`=60118 AND `horde_id`=60119; -- Black War Bear +DELETE FROM `player_factionchange_spells` WHERE `alliance_id`=59785 AND `horde_id`=59788; -- Black War Mammoth +INSERT INTO `player_factionchange_spells` (`alliance_id`, `horde_id`) VALUES +(60118, 60119), -- Black War Bear +(59785, 59788); -- Black War Mammoth -- cgit v1.2.3 From f5e073ddec54e3ae6548b4f4b92be661c927b28b Mon Sep 17 00:00:00 2001 From: ZxBiohazardZx Date: Tue, 25 Jun 2013 19:48:29 +0200 Subject: DB/Item: set the correct PageText value for item 37540 Closes #10077 --- sql/updates/world/2013_06_25_04_world_item_template.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2013_06_25_04_world_item_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_04_world_item_template.sql b/sql/updates/world/2013_06_25_04_world_item_template.sql new file mode 100644 index 00000000000..215d0583d53 --- /dev/null +++ b/sql/updates/world/2013_06_25_04_world_item_template.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `PageText`=3092 WHERE `entry`=37540; -- cgit v1.2.3 From 1149292fe1a8dd221cf44d842c28ba6b2ad99889 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Tue, 25 Jun 2013 15:36:16 -0230 Subject: Core/Scripting: More fixes and updates for BRS Instance. --- sql/updates/world/2013_06_25_05_world_misc.sql | 12 + .../BlackrockSpire/blackrock_spire.h | 73 +++--- .../BlackrockSpire/boss_drakkisath.cpp | 26 +- .../EasternKingdoms/BlackrockSpire/boss_gyth.cpp | 1 - .../BlackrockSpire/boss_pyroguard_emberseer.cpp | 11 +- .../BlackrockSpire/boss_rend_blackhand.cpp | 117 ++++++++- .../BlackrockSpire/instance_blackrock_spire.cpp | 280 +++++++++++++-------- .../BlackwingLair/boss_nefarian.cpp | 119 +-------- 8 files changed, 359 insertions(+), 280 deletions(-) create mode 100644 sql/updates/world/2013_06_25_05_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_05_world_misc.sql b/sql/updates/world/2013_06_25_05_world_misc.sql new file mode 100644 index 00000000000..378b362aa83 --- /dev/null +++ b/sql/updates/world/2013_06_25_05_world_misc.sql @@ -0,0 +1,12 @@ +DELETE FROM `areatrigger_scripts` WHERE `entry` IN (2046,2026); +INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES +(2046, 'at_dragonspire_hall'), +(2026, 'at_blackrock_stadium'); + +-- Warchief Rend Blackhand text +SET @REND := 10429; +DELETE FROM `creature_text` WHERE `entry` IN (@REND); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@REND,0,0,"Impossible!",14,0,100,22,0,0,'Warchief Rend Blackhand'), +(@REND,1,0,"With pleasure...",14,0,100,0,0,0,'Warchief Rend Blackhand'), +(@REND,2,0,"%s is knocked off his drake!",16,0,100,0,0,0,'Warchief Rend Blackhand'); diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h index ab87545688a..020c81a92e1 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h @@ -18,35 +18,35 @@ #ifndef DEF_BLACKROCK_SPIRE_H #define DEF_BLACKROCK_SPIRE_H -uint32 const EncounterCount = 22; +uint32 const EncounterCount = 23; #define BRSScriptName "instance_blackrock_spire" enum DataTypes { - DATA_OMOKK = 0, - DATA_SHADOW_HUNTER_VOSHGAJIN = 1, - DATA_WARMASTER_VOONE = 2, - DATA_MOTHER_SMOLDERWEB = 3, - DATA_UROK_DOOMHOWL = 4, // not scripted - DATA_QUARTERMASTER_ZIGRIS = 5, - DATA_GIZRUL_THE_SLAVENER = 6, // not scripted - DATA_HALYCON = 7, - DATA_OVERLORD_WYRMTHALAK = 8, - DATA_PYROGAURD_EMBERSEER = 9, - DATA_WARCHIEF_REND_BLACKHAND = 10, - DATA_GYTH = 11, - DATA_THE_BEAST = 12, - DATA_GENERAL_DRAKKISATH = 13, + DATA_OMOKK = 1, + DATA_SHADOW_HUNTER_VOSHGAJIN = 2, + DATA_WARMASTER_VOONE = 3, + DATA_MOTHER_SMOLDERWEB = 4, + DATA_UROK_DOOMHOWL = 5, // not scripted + DATA_QUARTERMASTER_ZIGRIS = 6, + DATA_GIZRUL_THE_SLAVENER = 7, // not scripted + DATA_HALYCON = 8, + DATA_OVERLORD_WYRMTHALAK = 9, + DATA_PYROGAURD_EMBERSEER = 10, + DATA_WARCHIEF_REND_BLACKHAND = 11, + DATA_GYTH = 12, + DATA_THE_BEAST = 13, + DATA_GENERAL_DRAKKISATH = 14, // Extra - DATA_DRAGONSPIRE_ROOM = 14, - DATA_ROOM_1_RUNE = 15, - DATA_ROOM_2_RUNE = 16, - DATA_ROOM_3_RUNE = 17, - DATA_ROOM_4_RUNE = 18, - DATA_ROOM_5_RUNE = 19, - DATA_ROOM_6_RUNE = 20, - DATA_ROOM_7_RUNE = 21 + DATA_DRAGONSPIRE_ROOM = 15, + DATA_HALL_RUNE_1 = 16, + DATA_HALL_RUNE_2 = 17, + DATA_HALL_RUNE_3 = 18, + DATA_HALL_RUNE_4 = 19, + DATA_HALL_RUNE_5 = 20, + DATA_HALL_RUNE_6 = 21, + DATA_HALL_RUNE_7 = 22 }; enum CreaturesIds @@ -68,15 +68,18 @@ enum CreaturesIds NPC_BLACKHAND_DREADWEAVER = 9817, NPC_BLACKHAND_SUMMONER = 9818, NPC_BLACKHAND_VETERAN = 9819, - NPC_BLACKHAND_INCARCERATOR = 10316 + NPC_BLACKHAND_INCARCERATOR = 10316, + NPC_LORD_VICTOR_NEFARIUS = 10162, + NPC_REND_BLACKHAND = 10429 }; enum AdditionalData { SPELL_SUMMON_ROOKERY_WHELP = 15745, EVENT_PYROGUARD_EMBERSEER = 4884, - AREATRIGGER_ENTER_UBRS = 2046, - AREATRIGGER_STADIUM = 2026 + AREATRIGGER = 1, + AREATRIGGER_DRAGONSPIRE_HALL = 2046, + AREATRIGGER_BLACKROCK_STADIUM = 2026 }; enum GameObjectsIds @@ -93,13 +96,13 @@ enum GameObjectsIds GO_DRAKKISATH_DOOR_2 = 175947, GO_BLACKROCK_ALTAR = 175706, // Altar used to start Pyroguard Emberseer event // Runes in dragonspire hall - GO_ROOM_1_RUNE = 175197, - GO_ROOM_2_RUNE = 175199, - GO_ROOM_3_RUNE = 175195, - GO_ROOM_4_RUNE = 175200, - GO_ROOM_5_RUNE = 175198, - GO_ROOM_6_RUNE = 175196, - GO_ROOM_7_RUNE = 175194, + GO_HALL_RUNE_1 = 175197, + GO_HALL_RUNE_2 = 175199, + GO_HALL_RUNE_3 = 175195, + GO_HALL_RUNE_4 = 175200, + GO_HALL_RUNE_5 = 175198, + GO_HALL_RUNE_6 = 175196, + GO_HALL_RUNE_7 = 175194, // Runes in emberseers room GO_EMBERSEER_RUNE_1 = 175266, GO_EMBERSEER_RUNE_2 = 175267, @@ -107,7 +110,9 @@ enum GameObjectsIds GO_EMBERSEER_RUNE_4 = 175269, GO_EMBERSEER_RUNE_5 = 175270, GO_EMBERSEER_RUNE_6 = 175271, - GO_EMBERSEER_RUNE_7 = 175272 + GO_EMBERSEER_RUNE_7 = 175272, + // For Gyth event + GO_DR_PORTCULLIS = 175185 }; #endif diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp index c480e3115e2..dfd808041bd 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_drakkisath.cpp @@ -41,11 +41,6 @@ class boss_drakkisath : public CreatureScript public: boss_drakkisath() : CreatureScript("boss_drakkisath") { } - CreatureAI* GetAI(Creature* creature) const - { - return new boss_drakkisathAI(creature); - } - struct boss_drakkisathAI : public BossAI { boss_drakkisathAI(Creature* creature) : BossAI(creature, DATA_GENERAL_DRAKKISATH) {} @@ -58,10 +53,10 @@ public: void EnterCombat(Unit* /*who*/) { _EnterCombat(); - events.ScheduleEvent(EVENT_FIRE_NOVA, 6 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_CONFLIGURATION, 15 * IN_MILLISECONDS); - events.ScheduleEvent(EVENT_THUNDERCLAP, 17 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_FIRE_NOVA, 6000); + events.ScheduleEvent(EVENT_CLEAVE, 8000); + events.ScheduleEvent(EVENT_CONFLIGURATION, 15000); + events.ScheduleEvent(EVENT_THUNDERCLAP, 17000); } void JustDied(Unit* /*killer*/) @@ -85,25 +80,30 @@ public: { case EVENT_FIRE_NOVA: DoCastVictim(SPELL_FIRENOVA); - events.ScheduleEvent(EVENT_FIRE_NOVA, 10 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_FIRE_NOVA, 10000); break; case EVENT_CLEAVE: DoCastVictim(SPELL_CLEAVE); - events.ScheduleEvent(EVENT_CLEAVE, 8 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CLEAVE, 8000); break; case EVENT_CONFLIGURATION: DoCastVictim(SPELL_CONFLIGURATION); - events.ScheduleEvent(EVENT_CONFLIGURATION, 18 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_CONFLIGURATION, 18000); break; case EVENT_THUNDERCLAP: DoCastVictim(SPELL_THUNDERCLAP); - events.ScheduleEvent(EVENT_THUNDERCLAP, 20 * IN_MILLISECONDS); + events.ScheduleEvent(EVENT_THUNDERCLAP, 20000); break; } } DoMeleeAttackIfReady(); } }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_drakkisathAI(creature); + } }; void AddSC_boss_drakkisath() diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp index 0ddbe0e1a25..e0023995cb3 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp @@ -66,7 +66,6 @@ public: void JustDied(Unit* /*killer*/) { _JustDied(); - // Open doors } void IsSummonedBy(Unit* /*summoner*/) diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp index 16f8e7b41bd..ec4cbf2ed18 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -47,7 +47,7 @@ enum Spells SPELL_STRIKE = 15580, // Combat SPELL_ENCAGE = 16045, // Combat // Cast on player by altar - SPELL_EMBERSEER_START = 16533 + SPELL_EMBERSEER_OBJECT_VISUAL = 16532 }; enum Events @@ -257,7 +257,7 @@ public: Map::PlayerList const &players = me->GetMap()->GetPlayers(); for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) if (Player* player = itr->GetSource()->ToPlayer()) - if (!player->HasAura(SPELL_EMBERSEER_START)) + if (!player->HasAura(SPELL_EMBERSEER_OBJECT_VISUAL)) _hasAura = false; if (_hasAura) @@ -275,19 +275,16 @@ public: if (!UpdateVictim()) return; - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) { case EVENT_FIRENOVA: - DoCast(SPELL_FIRENOVA); + DoCast(me, SPELL_FIRENOVA); events.ScheduleEvent(EVENT_FIRENOVA, 6000); break; case EVENT_FLAMEBUFFET: - DoCast(SPELL_FLAMEBUFFET); + DoCast(me, SPELL_FLAMEBUFFET); events.ScheduleEvent(EVENT_FLAMEBUFFET, 14000); break; case EVENT_PYROBLAST: diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp index 4fc82275e6a..ced6fdd5b67 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_rend_blackhand.cpp @@ -25,7 +25,27 @@ enum Spells SPELL_WHIRLWIND = 13736, // sniffed SPELL_CLEAVE = 15284, SPELL_MORTAL_STRIKE = 16856, - SPELL_FRENZY = 8269 + SPELL_FRENZY = 8269, + SPELL_KNOCKDOWN = 13360 // On spawn during Gyth fight +}; + +enum Says +{ + // Rend Blackhand + SAY_BLACKHAND_1 = 0, + SAY_BLACKHAND_2 = 1, + EMOTE_BLACKHAND_DISMOUNT = 2, + // Victor Nefarius + SAY_NEFARIUS_1 = 0, + SAY_NEFARIUS_2 = 1, + SAY_NEFARIUS_3 = 2, + SAY_NEFARIUS_4 = 3, + SAY_NEFARIUS_5 = 4, + SAY_NEFARIUS_6 = 5, + SAY_NEFARIUS_7 = 6, + SAY_NEFARIUS_8 = 7, + SAY_NEFARIUS_9 = 8, + SAY_NEFARIUS_10 = 9, }; enum Adds @@ -44,14 +64,14 @@ struct Wave float o_pos; }; -static Wave Wave2[]= +static Wave Wave2[]= // 22 sec { { 10447, 209.8637f, -428.2729f, 110.9877f, 0.6632251f }, { 10442, 209.3122f, -430.8724f, 110.9814f, 2.9147f }, { 10442, 211.3309f, -425.9111f, 111.0006f, 1.727876f } }; -static Wave Wave3[]= +static Wave Wave3[]= // 60 sec { { 10742, 208.6493f, -424.5787f, 110.9872f, 5.8294f }, { 10447, 203.9482f, -428.9446f, 110.982f, 4.677482f }, @@ -59,7 +79,7 @@ static Wave Wave3[]= { 10442, 206.3079f, -424.7509f, 110.9943f, 4.08407f } }; -static Wave Wave4[]= +static Wave Wave4[]= // 49 sec { { 10742, 212.3541f, -412.6826f, 111.0352f, 5.88176f }, { 10447, 212.5754f, -410.2841f, 111.0296f, 2.740167f }, @@ -67,7 +87,7 @@ static Wave Wave4[]= { 10442, 210.6568f, -412.1552f, 111.0124f, 0.9773844f } }; -static Wave Wave5[]= +static Wave Wave5[]= // 60 sec { { 10742, 210.2188f, -410.6686f, 111.0211f, 5.8294f }, { 10447, 209.4078f, -414.13f, 111.0264f, 4.677482f }, @@ -76,7 +96,7 @@ static Wave Wave5[]= { 10442, 208.0854f, -412.1505f, 111.0057f, 4.08407f } }; -static Wave Wave6[]= +static Wave Wave6[]= // 27 sec { { 10742, 213.9138f, -426.512f, 111.0013f, 3.316126f }, { 10447, 213.7121f, -429.8102f, 110.9888f, 1.413717f }, @@ -89,7 +109,15 @@ enum Events { EVENT_WHIRLWIND = 1, EVENT_CLEAVE = 2, - EVENT_MORTAL_STRIKE = 3 + EVENT_MORTAL_STRIKE = 3, + + EVENT_GYTH_1 = 5, + EVENT_GYTH_2 = 6, + EVENT_GYTH_3 = 7, + EVENT_GYTH_4 = 8, + EVENT_GYTH_5 = 9, + EVENT_GYTH_6 = 10, + EVENT_PORTCULLIS = 11, }; class boss_rend_blackhand : public CreatureScript @@ -104,6 +132,9 @@ public: void Reset() { _Reset(); + _gythEvent = false; + _victorGUID = 0; + _portcullisGUID = 0; } void EnterCombat(Unit* /*who*/) @@ -122,15 +153,76 @@ public: void SetData(uint32 type, uint32 data) { - if (instance && type == 1 && data == 1) + if (instance && type == AREATRIGGER && data == AREATRIGGER_BLACKROCK_STADIUM) { - events.ScheduleEvent(EVENT_WHIRLWIND, 5000); - } + if (!_gythEvent) + { + _gythEvent = true; + + if (Creature* victor = me->FindNearestCreature(NPC_LORD_VICTOR_NEFARIUS, 5.0f, true)) + _victorGUID = victor->GetGUID(); + + if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 50.0f)) + _portcullisGUID = portcullis->GetGUID(); + + if (Creature* victor = me->GetCreature(*me, _victorGUID)) + { + if (Unit* player = victor->SelectNearestPlayer(40.0f)) + { + victor->SetInFront(player); + victor->SendMovementFlagUpdate(); + } + } + } + events.ScheduleEvent(EVENT_GYTH_1, 1000); + } } void UpdateAI(uint32 diff) { + if (_gythEvent) + { + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_GYTH_1: + if (Creature* victor = me->GetCreature(*me, _victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_1); + events.ScheduleEvent(EVENT_GYTH_2, 4000); + break; + case EVENT_GYTH_2: + if (Creature* victor = me->GetCreature(*me, _victorGUID)) + victor->HandleEmoteCommand(EMOTE_ONESHOT_POINT); + events.ScheduleEvent(EVENT_GYTH_3, 4000); + break; + case EVENT_GYTH_3: + if (Creature* victor = me->GetCreature(*me, _victorGUID)) + victor->AI()->Talk(SAY_NEFARIUS_2); + events.ScheduleEvent(EVENT_PORTCULLIS, 2000); + events.ScheduleEvent(EVENT_GYTH_4, 4000); + break; + case EVENT_GYTH_4: + if (Creature* victor = me->GetCreature(*me, _victorGUID)) + { + victor->SetInFront(me); + victor->SendMovementFlagUpdate(); + } + break; + case EVENT_PORTCULLIS: + if (GameObject* portcullis = me->FindNearestGameObject(GO_DR_PORTCULLIS, 50.0f)) + portcullis->UseDoorOrButton(); + // move wave + break; + default: + break; + } + } + } + if (!UpdateVictim()) return; @@ -159,6 +251,11 @@ public: } DoMeleeAttackIfReady(); } + private: + bool _gythEvent; + uint64 _victorGUID; + uint64 _portcullisGUID; + }; CreatureAI* GetAI(Creature* creature) const diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index 2751648ebf9..6a030af0a95 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -15,14 +15,18 @@ * with this program. If not, see . */ -#include "ObjectDefines.h" #include "ObjectMgr.h" #include "ScriptMgr.h" +#include "ObjectDefines.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" +#include "GridNotifiersImpl.h" +#include "InstanceScript.h" #include "ScriptedCreature.h" #include "blackrock_spire.h" -#include "InstanceScript.h" -uint32 const DragonspireRunes[7] = { GO_ROOM_1_RUNE, GO_ROOM_2_RUNE, GO_ROOM_3_RUNE, GO_ROOM_4_RUNE, GO_ROOM_5_RUNE, GO_ROOM_6_RUNE, GO_ROOM_7_RUNE }; +uint32 const DragonspireRunes[7] = { GO_HALL_RUNE_1, GO_HALL_RUNE_2, GO_HALL_RUNE_3, GO_HALL_RUNE_4, GO_HALL_RUNE_5, GO_HALL_RUNE_6, GO_HALL_RUNE_7 }; uint32 const DragonspireMobs[3] = { NPC_BLACKHAND_DREADWEAVER, NPC_BLACKHAND_SUMMONER, NPC_BLACKHAND_VETERAN }; @@ -39,9 +43,7 @@ public: struct instance_blackrock_spireMapScript : public InstanceScript { - instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) { } - - void Initialize() + instance_blackrock_spireMapScript(InstanceMap* map) : InstanceScript(map) { SetBossNumber(EncounterCount); HighlordOmokk = 0; @@ -64,12 +66,6 @@ public: go_blackrockaltar = 0; } - void OnPlayerEnter(Player* /*player*/) - { - if ((GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE)) - Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_STORE, 4000); - } - bool IsEncounterInProgress() const { for (uint8 i = 0; i < EncounterCount; ++i) @@ -113,8 +109,8 @@ public: break; case NPC_PYROGAURD_EMBERSEER: PyroguardEmberseer = creature->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - creature->DespawnOrUnsummon(); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + creature->DisappearAndDie(); break; case NPC_WARCHIEF_REND_BLACKHAND: WarchiefRendBlackhand = creature->GetGUID(); @@ -144,93 +140,93 @@ public: break; case GO_EMBERSEER_IN: go_emberseerin = go->GetGUID(); - if ((GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)) - go->SetGoState(GO_STATE_ACTIVE); + if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE) + HandleGameObject(0, true, go); break; case GO_DOORS: go_doors = go->GetGUID(); - if ((GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)) - go->SetGoState(GO_STATE_ACTIVE); + if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE) + HandleGameObject(0, true, go); break; case GO_EMBERSEER_OUT: go_emberseerout = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_ACTIVE); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, true, go); break; case GO_BLACKROCK_ALTAR: go_blackrockaltar = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; - case GO_ROOM_1_RUNE: + case GO_HALL_RUNE_1: go_roomrunes[0] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_1_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_1) == DONE) + HandleGameObject(0, false, go); break; - case GO_ROOM_2_RUNE: + case GO_HALL_RUNE_2: go_roomrunes[1] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_2_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_2) == DONE) + HandleGameObject(0, false, go); break; - case GO_ROOM_3_RUNE: + case GO_HALL_RUNE_3: go_roomrunes[2] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_3_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_3) == DONE) + HandleGameObject(0, false, go); break; - case GO_ROOM_4_RUNE: + case GO_HALL_RUNE_4: go_roomrunes[3] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_4_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_4) == DONE) + HandleGameObject(0, false, go); break; - case GO_ROOM_5_RUNE: + case GO_HALL_RUNE_5: go_roomrunes[4] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_5_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_5) == DONE) + HandleGameObject(0, false, go); break; - case GO_ROOM_6_RUNE: + case GO_HALL_RUNE_6: go_roomrunes[5] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_6_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_6) == DONE) + HandleGameObject(0, false, go); break; - case GO_ROOM_7_RUNE: + case GO_HALL_RUNE_7: go_roomrunes[6] = go->GetGUID(); - if ((GetBossState(DATA_ROOM_7_RUNE) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_HALL_RUNE_7) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_1: go_emberseerrunes[0] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_2: go_emberseerrunes[1] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_3: go_emberseerrunes[2] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_4: go_emberseerrunes[3] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_5: go_emberseerrunes[4] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_6: go_emberseerrunes[5] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; case GO_EMBERSEER_RUNE_7: go_emberseerrunes[6] = go->GetGUID(); - if ((GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)) - go->SetGoState(GO_STATE_READY); + if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) + HandleGameObject(0, false, go); break; } } @@ -257,6 +253,7 @@ public: case DATA_THE_BEAST: case DATA_GENERAL_DRAKKISATH: case DATA_DRAGONSPIRE_ROOM: + break; default: break; } @@ -270,14 +267,31 @@ public: { case EVENT_PYROGUARD_EMBERSEER: if (GetBossState(DATA_PYROGAURD_EMBERSEER) == NOT_STARTED) + { if (Creature* Emberseer = instance->GetCreature(PyroguardEmberseer)) Emberseer->AI()->SetData(1, 1); + } break; default: break; } } + void SetData(uint32 type, uint32 data) + { + switch (type) + { + case AREATRIGGER: + if (data == AREATRIGGER_DRAGONSPIRE_HALL) + { + if (GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE) + Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_STORE, 1000); + } + default: + break; + } + } + uint64 GetData64(uint32 type) const { switch (type) @@ -336,25 +350,25 @@ public: case GO_BLACKROCK_ALTAR: return go_blackrockaltar; break; - case GO_ROOM_1_RUNE: + case GO_HALL_RUNE_1: return go_roomrunes[0]; break; - case GO_ROOM_2_RUNE: + case GO_HALL_RUNE_2: return go_roomrunes[1]; break; - case GO_ROOM_3_RUNE: + case GO_HALL_RUNE_3: return go_roomrunes[2]; break; - case GO_ROOM_4_RUNE: + case GO_HALL_RUNE_4: return go_roomrunes[3]; break; - case GO_ROOM_5_RUNE: + case GO_HALL_RUNE_5: return go_roomrunes[4]; break; - case GO_ROOM_6_RUNE: + case GO_HALL_RUNE_6: return go_roomrunes[5]; break; - case GO_ROOM_7_RUNE: + case GO_HALL_RUNE_7: return go_roomrunes[6]; break; case GO_EMBERSEER_RUNE_1: @@ -392,12 +406,12 @@ public: { case EVENT_DARGONSPIRE_ROOM_STORE: Dragonspireroomstore(); - Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 2500); + Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000); break; case EVENT_DARGONSPIRE_ROOM_CHECK: Dragonspireroomcheck(); if ((GetBossState(DATA_DRAGONSPIRE_ROOM) != DONE)) - Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 2500); + Events.ScheduleEvent(EVENT_DARGONSPIRE_ROOM_CHECK, 3000); break; default: break; @@ -434,66 +448,67 @@ public: void Dragonspireroomcheck() { + Creature* mob = 0; + GameObject* rune = 0; + for (uint8 i = 0; i < 7; ++i) { bool _mobAlive = false; - if (GameObject* rune = instance->GetGameObject(go_roomrunes[i])) + if (rune = instance->GetGameObject(go_roomrunes[i])) { if (rune->GetGoState() == GO_STATE_ACTIVE) - { for (uint8 ii = 0; ii < 5; ++ii) { - if (Creature* mob = instance->GetCreature(runecreaturelist[i] [ii])) - { + if (mob = instance->GetCreature(runecreaturelist[i] [ii])) if (mob->IsAlive()) _mobAlive = true; - } } - } - - if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE) - { - rune->SetGoState(GO_STATE_READY); + } - switch (rune->GetEntry()) - { - case GO_ROOM_1_RUNE: - SetBossState(DATA_ROOM_1_RUNE, DONE); - break; - case GO_ROOM_2_RUNE: - SetBossState(DATA_ROOM_2_RUNE, DONE); - break; - case GO_ROOM_3_RUNE: - SetBossState(DATA_ROOM_3_RUNE, DONE); - break; - case GO_ROOM_4_RUNE: - SetBossState(DATA_ROOM_4_RUNE, DONE); - break; - case GO_ROOM_5_RUNE: - SetBossState(DATA_ROOM_5_RUNE, DONE); - break; - case GO_ROOM_6_RUNE: - SetBossState(DATA_ROOM_6_RUNE, DONE); - break; - case GO_ROOM_7_RUNE: - SetBossState(DATA_ROOM_7_RUNE, DONE); - break; - } - } + if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE) + { + HandleGameObject(0, false, rune); - if (GetBossState(DATA_ROOM_1_RUNE) == DONE && GetBossState(DATA_ROOM_2_RUNE) == DONE && GetBossState(DATA_ROOM_3_RUNE) == DONE && - GetBossState(DATA_ROOM_4_RUNE) == DONE &&GetBossState(DATA_ROOM_5_RUNE) == DONE && GetBossState(DATA_ROOM_6_RUNE) == DONE && - GetBossState(DATA_ROOM_7_RUNE) == DONE) + switch (rune->GetEntry()) { - SetBossState(DATA_DRAGONSPIRE_ROOM, DONE); - if (GameObject* door1 = instance->GetGameObject(go_emberseerin)) - door1->SetGoState(GO_STATE_ACTIVE); - if (GameObject* door2 = instance->GetGameObject(go_doors)) - door2->SetGoState(GO_STATE_ACTIVE); + case GO_HALL_RUNE_1: + SetBossState(DATA_HALL_RUNE_1, DONE); + break; + case GO_HALL_RUNE_2: + SetBossState(DATA_HALL_RUNE_2, DONE); + break; + case GO_HALL_RUNE_3: + SetBossState(DATA_HALL_RUNE_3, DONE); + break; + case GO_HALL_RUNE_4: + SetBossState(DATA_HALL_RUNE_4, DONE); + break; + case GO_HALL_RUNE_5: + SetBossState(DATA_HALL_RUNE_5, DONE); + break; + case GO_HALL_RUNE_6: + SetBossState(DATA_HALL_RUNE_6, DONE); + break; + case GO_HALL_RUNE_7: + SetBossState(DATA_HALL_RUNE_7, DONE); + break; + default: + break; } } } + + if (GetBossState(DATA_HALL_RUNE_1) == DONE && GetBossState(DATA_HALL_RUNE_2) == DONE && GetBossState(DATA_HALL_RUNE_3) == DONE && + GetBossState(DATA_HALL_RUNE_4) == DONE && GetBossState(DATA_HALL_RUNE_5) == DONE && GetBossState(DATA_HALL_RUNE_6) == DONE && + GetBossState(DATA_HALL_RUNE_7) == DONE) + { + SetBossState(DATA_DRAGONSPIRE_ROOM, DONE); + if (GameObject* door1 = instance->GetGameObject(go_emberseerin)) + HandleGameObject(0, true, door1); + if (GameObject* door2 = instance->GetGameObject(go_doors)) + HandleGameObject(0, true, door2); + } } std::string GetSaveData() @@ -570,7 +585,56 @@ public: }; +/*##### +# at_dragonspire_hall +#####*/ + +class at_dragonspire_hall : public AreaTriggerScript +{ +public: + at_dragonspire_hall() : AreaTriggerScript("at_dragonspire_hall") { } + + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + { + if (player && player->IsAlive()) + { + if (InstanceScript* instance = player->GetInstanceScript()) + instance->SetData(AREATRIGGER, AREATRIGGER_DRAGONSPIRE_HALL); + return true; + } + else + return false; + } + +}; + +/*##### +# at_blackrock_stadium +#####*/ + +class at_blackrock_stadium : public AreaTriggerScript +{ +public: + at_blackrock_stadium() : AreaTriggerScript("at_blackrock_stadium") { } + + bool OnTrigger(Player* player, const AreaTriggerEntry* /*at*/) + { + if (player && player->IsAlive()) + { + if (InstanceScript* instance = player->GetInstanceScript()) + if (Creature* rend = player->FindNearestCreature(NPC_REND_BLACKHAND, 50.0f)) + rend->AI()->SetData(AREATRIGGER, AREATRIGGER_BLACKROCK_STADIUM); + return true; + } + else + return false; + } + +}; + void AddSC_instance_blackrock_spire() { new instance_blackrock_spire(); + new at_dragonspire_hall(); + new at_blackrock_stadium(); } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index 150ad588ae8..244d84e6989 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -29,39 +29,16 @@ enum Events EVENT_SHADOW_BOLT = 2, EVENT_FEAR = 3, EVENT_MIND_CONTROL = 4, - - // Victor Nefarius UBRS Events - EVENT_PLAYER_CHECK = 5, - EVENT_GYTH_REND_1 = 6, - EVENT_GYTH_REND_2 = 7, - EVENT_GYTH_REND_3 = 8, - EVENT_GYTH_REND_4 = 9, - EVENT_GYTH_REND_5 = 10, - EVENT_GYTH_REND_6 = 11, - // Nefarian - EVENT_SHADOWFLAME = 12, - EVENT_VEILOFSHADOW = 13, - EVENT_CLEAVE = 14, - EVENT_TAILLASH = 15, - EVENT_CLASSCALL = 16 + EVENT_SHADOWFLAME = 5, + EVENT_VEILOFSHADOW = 6, + EVENT_CLEAVE = 7, + EVENT_TAILLASH = 8, + EVENT_CLASSCALL = 9 }; enum Says { - // Victor Nefarius - // UBRS text - SAY_GYTH_REND_1 = 0, - SAY_GYTH_REND_2 = 1, - SAY_GYTH_REND_3 = 2, - SAY_GYTH_REND_4 = 3, - SAY_GYTH_REND_5 = 4, - SAY_GYTH_REND_6 = 5, - SAY_GYTH_REND_7 = 6, - SAY_GYTH_REND_8 = 7, - SAY_GYTH_REND_9 = 8, - SAY_GYTH_REND_10 = 9, - // BWL text SAY_GAMESBEGIN_1 = 10, SAY_GAMESBEGIN_2 = 11, // SAY_VAEL_INTRO = 12, Not used - when he corrupts Vaelastrasz @@ -84,12 +61,6 @@ enum Says SAY_DEATH_KNIGHT = 13 }; -enum Gameobjects -{ - // UBRS - OBJECT_DR_PORTCULLIS = 175185 -}; - enum Gossip { GOSSIP_ID = 21332, @@ -97,9 +68,6 @@ enum Gossip enum Creatures { - // UBRS - NPC_REND_BLACKHAND = 10429, - // BWL NPC_BRONZE_DRAKANOID = 14263, NPC_BLUE_DRAKANOID = 14261, NPC_RED_DRAKANOID = 14264, @@ -168,12 +136,6 @@ public: void Reset() { - if (me->GetMapId() == 229) - { - playerGUID = 0; - events.ScheduleEvent(EVENT_PLAYER_CHECK, 10000); - } - if (me->GetMapId() == 469) { if (!me->FindNearestCreature(NPC_NEFARIAN, 1000.0f, true)) @@ -194,6 +156,11 @@ public: Reset(); } + void SetData(uint32 type, uint32 data) + { + + } + void BeginEvent(Player* target) { _EnterCombat(); @@ -226,70 +193,11 @@ public: void UpdateAI(uint32 diff) { - events.Update(diff); - - if (me->GetMapId() == 229) // UBRS EVENTS - { - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_PLAYER_CHECK: - { - Map::PlayerList const &players = me->GetMap()->GetPlayers(); - for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) - if (Player* player = itr->GetSource()->ToPlayer()) - { - if (me->GetDistance(player) < 30.0f && player->IsAlive() && !player->IsGameMaster()) - { - playerGUID = player->GetGUID(); - me->SetInFront(player); - me->SendMovementFlagUpdate(); - events.ScheduleEvent(EVENT_GYTH_REND_1, 1000); - } - else - events.ScheduleEvent(EVENT_PLAYER_CHECK, 10000); - } - break; - } - case EVENT_GYTH_REND_1: - Talk(SAY_GYTH_REND_1); - events.ScheduleEvent(EVENT_GYTH_REND_2, 4000); - break; - case EVENT_GYTH_REND_2: - me->HandleEmoteCommand(EMOTE_ONESHOT_POINT); - events.ScheduleEvent(EVENT_GYTH_REND_3, 4000); - break; - case EVENT_GYTH_REND_3: - Talk(SAY_GYTH_REND_2); - events.ScheduleEvent(EVENT_GYTH_REND_4, 2000); - break; - case EVENT_GYTH_REND_4: - if (GameObject* portcullis = me->FindNearestGameObject(OBJECT_DR_PORTCULLIS, 50.0f)) - portcullis->SetGoState(GO_STATE_READY); - events.ScheduleEvent(EVENT_GYTH_REND_5, 2000); - break; - case EVENT_GYTH_REND_5: - if (Creature* rend = me->FindNearestCreature(NPC_REND_BLACKHAND, 5.0f, true)) - me->SetInFront(rend); - me->SendMovementFlagUpdate(); - events.ScheduleEvent(EVENT_GYTH_REND_5, 4000); - break; - case EVENT_GYTH_REND_6: - me->HandleEmoteCommand(EMOTE_ONESHOT_TALK); - events.ScheduleEvent(EVENT_GYTH_REND_6, 4000); - default: - break; - } - } - } - - if (me->GetMapId() != 469) - return; - // Only do this if we haven't spawned nefarian yet if (UpdateVictim() && SpawnedAdds <= 42) { + events.Update(diff); + if (me->HasUnitState(UNIT_STATE_CASTING)) return; @@ -370,9 +278,6 @@ public: } private: - // UBRS - uint64 playerGUID; - // BWL uint32 SpawnedAdds; }; -- cgit v1.2.3 From f09ef701bdeaf704dbe54bcd7908a99df2958513 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Tue, 25 Jun 2013 21:49:59 -0230 Subject: DB/Creature_template: A couple npc updates. --- sql/updates/world/2013_06_25_06_world_creature_template.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sql/updates/world/2013_06_25_06_world_creature_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_06_world_creature_template.sql b/sql/updates/world/2013_06_25_06_world_creature_template.sql new file mode 100644 index 00000000000..709776de6c4 --- /dev/null +++ b/sql/updates/world/2013_06_25_06_world_creature_template.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `minlevel`=61, `maxlevel`=61, `faction_A`=103, `faction_H`=103, `unit_flags`=`unit_flags`|33555200 WHERE `entry`=14081; +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|256|512 WHERE `entry`=10429; -- cgit v1.2.3 From 7d219d103e65fb4ae85b16788a2a7ae0f0bc6dae Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 26 Jun 2013 01:19:26 -0230 Subject: DB/Creature_text: And I forgot the text :) --- .../world/2013_06_25_07_world_creature_text.sql | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sql/updates/world/2013_06_25_07_world_creature_text.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_25_07_world_creature_text.sql b/sql/updates/world/2013_06_25_07_world_creature_text.sql new file mode 100644 index 00000000000..ad52bbac254 --- /dev/null +++ b/sql/updates/world/2013_06_25_07_world_creature_text.sql @@ -0,0 +1,20 @@ +-- Text for Lord Victor Nefarius from sniff +SET @VICTOR := 10162; +DELETE FROM `creature_text` WHERE `entry` IN (@VICTOR,@REND); +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +-- Lord Victor Nefarius texts UBRS +(@VICTOR,0,0,"Excellent... it would appear as if the meddlesome insects have arrived just in time to feed my legion. Welcome, mortals!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,1,0,"Let not even a drop of their blood remain upon the arena floor, my children. Feast on their souls!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,2,0,"Foolsss... Kill the one in the dress!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,3,0,"Inconceivable!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,4,0,"Your efforts will prove fruitless. None shall stand in our way!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,5,0,"Do not force my hand, children! I shall use your hides to line my boots.",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,6,0,"Use the freezing breath, imbecile!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,7,0,"THIS CANNOT BE!!! Rend, deal with these insects.",14,0,100,0,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,8,0,"The Warchief shall make quick work of you, mortals. Prepare yourselves!",14,0,100,25,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,9,0,"Your victory shall be short lived. The days of both the Alliance and Horde are coming to an end! The next time we meet shall be the last.",14,0,100,5,0,0,'Lord Victor Nefarius (UBRS)'), +(@VICTOR,10,0,"The mortals have fallen! The new age of the Blackrock legion is at hand!",14,0,100,22,0,0,'Lord Victor Nefarius (UBRS)'), +-- Lord Victor Nefarius texts BWL +(@VICTOR,11,0,"In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say...",14,0,100,1,0,0,'Lord Victor Nefarius SAY_GAMESBEGIN_1 (BWL)'), +(@VICTOR,12,0,"Let the games begin!",14,0,100,22,0,8280,'Lord Victor Nefarius SAY_GAMESBEGIN_2 (BWL)'), +(@VICTOR,13,0,"Ah, the heroes. You are persistent, aren't you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up, little red wyrm...and destroy them!",14,0,100,23,0,8279,'Lord Victor Nefarius SAY_VAEL_INTRO (BWL)'); -- cgit v1.2.3 From 83c1e69d74300a5b6378a8c752c87f02e3718dfe Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 26 Jun 2013 12:43:45 -0230 Subject: Core/Scripting: Update npc_agnetta_tyrsdottar to use db gossip. --- .../world/2013_06_26_00_world_conditions.sql | 4 ++ src/server/scripts/Northrend/zone_storm_peaks.cpp | 43 ++++++++-------------- 2 files changed, 19 insertions(+), 28 deletions(-) create mode 100644 sql/updates/world/2013_06_26_00_world_conditions.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_26_00_world_conditions.sql b/sql/updates/world/2013_06_26_00_world_conditions.sql new file mode 100644 index 00000000000..bb1467d7bfe --- /dev/null +++ b/sql/updates/world/2013_06_26_00_world_conditions.sql @@ -0,0 +1,4 @@ +-- Add Gossip Menu conditions for Agnetta Tyrsdottar +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (15) AND `SourceGroup` IN (9874); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9874,0,0,28,12969,0,0,1,0,'','Agnetta Tyrsdottar - Show gossip option only if quest is not complete'); diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index aa6c53c188b..83262ee6964 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -27,16 +27,15 @@ #include "WorldSession.h" /*###### -## npc_agnetta_tyrsdottar +## npc_agnetta_tyrsdottar for QUEST_ITS_THAT_YOUR_GOBLIN 12969 ######*/ -#define GOSSIP_AGNETTA "Skip the warmup, sister... or are you too scared to face soemeone your own size?" - enum eAgnetta { - QUEST_ITS_THAT_YOUR_GOBLIN = 12969, FACTION_HOSTILE_AT1 = 45, - SAY_AGGRO = 0 + SAY_AGGRO = 0, + GOSSIP_ID = 9874, + GOSSIP_OPTION_ID = 0 }; class npc_agnetta_tyrsdottar : public CreatureScript @@ -52,35 +51,23 @@ public: { me->RestoreFaction(); } + + void sGossipSelect(Player* player, uint32 sender, uint32 action) + { + if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) + { + player->CLOSE_GOSSIP_MENU(); + me->setFaction(FACTION_HOSTILE_AT1); + Talk(SAY_AGGRO); + AttackStart(player); + } + } }; CreatureAI* GetAI(Creature* creature) const { return new npc_agnetta_tyrsdottarAI(creature); } - - bool OnGossipHello(Player* player, Creature* creature) - { - if (player->GetQuestStatus(QUEST_ITS_THAT_YOUR_GOBLIN) == QUEST_STATUS_INCOMPLETE) - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AGNETTA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - - player->SEND_GOSSIP_MENU(13691, creature->GetGUID()); - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - creature->AI()->Talk(SAY_AGGRO); - player->CLOSE_GOSSIP_MENU(); - creature->setFaction(FACTION_HOSTILE_AT1); - creature->AI()->AttackStart(player); - } - - return true; - } }; /*###### -- cgit v1.2.3 From f4bceb86c045565d52e12b157ea6aa4abbdb1835 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 26 Jun 2013 13:18:17 -0230 Subject: Core/Scripting: Replace a couple core scripts in Storm Peaks with SAI and DB gossip. --- sql/updates/world/2013_06_26_01_world_misc.sql | 39 +++++++++ src/server/scripts/Northrend/zone_storm_peaks.cpp | 99 ----------------------- 2 files changed, 39 insertions(+), 99 deletions(-) create mode 100644 sql/updates/world/2013_06_26_01_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_26_01_world_misc.sql b/sql/updates/world/2013_06_26_01_world_misc.sql new file mode 100644 index 00000000000..2e54cb9497e --- /dev/null +++ b/sql/updates/world/2013_06_26_01_world_misc.sql @@ -0,0 +1,39 @@ +-- Add gossip id to Frostborn Scout +UPDATE `creature_template` SET `gossip_menu_id`=9841 WHERE `entry`=29811; +-- Add Missing Gossip for Frostborn Scout +DELETE FROM `gossip_menu` WHERE `entry`=9841 AND `text_id`=13611; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9841,13611); +DELETE FROM `gossip_menu` WHERE `entry`=9842 AND `text_id`=13612; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9842,13612); +DELETE FROM `gossip_menu` WHERE `entry`=9843 AND `text_id`=13613; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9843,13613); +DELETE FROM `gossip_menu` WHERE `entry`=9844 AND `text_id`=13614; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (9844,13614); +-- Add Any Missing Gossip Option for Frostborn Scout +DELETE FROM `gossip_menu_option` WHERE menu_id IN (9841,9842,9843); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(9841,0,0,"Are you okay? I''ve come TO take you back TO Frosthold IF you can stand.",1,1,9842,0,0,0,''), +(9842,0,0,"I''m sorry that I didn''t get here sooner. What happened?",1,1,9843,0,0,0,''), +(9843,0,0,"I''ll go get SOME help. Hang IN there.",1,1,9844,0,0,0,''); +-- Add Gossip option condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (15) AND `SourceGroup` IN (9841); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9841,0,0,28,12864,0,0,1,0,'','Agnetta Tyrsdottar - Show gossip option only if quest "Missing scouts" is not complete'); + +-- Frostborn Scout SAI for Quest: Missing scouts +SET @ENTRY := 29647; +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,62,0,100,0,9843,0,0,0,15,12864,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Frostborn Scout - On Gossip Option Select - Give quest credit for Quest: Missing scouts'); + +-- Agnetta_Tyrsdottar SAI Quest: Is That Your Goblin? +SET @ENTRY := 30154; +UPDATE `creature_template` SET `AIName`= 'SmartAI',`ScriptName`= '' WHERE `entry`=@ENTRY; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid`=@ENTRY; +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,62,0,100,0,9874,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Agnetta_Tyrsdottar - On Gossip Option Select - Close Gossip Window'), +(@ENTRY,0,1,2,61,0,100,0,0,0,0,0,2,45,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Agnetta_Tyrsdottar - On Gossip Option Select - Set Faction'), +(@ENTRY,0,2,3,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Agnetta_Tyrsdottar - On Gossip Option Select - Say 0'), +(@ENTRY,0,3,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Agnetta_Tyrsdottar - On Gossip Option Select - Attack Envoker'), +(@ENTRY,0,4,0,25,0,100,0,0,0,0,0,2,2109,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Agnetta_Tyrsdottar - On Reset - Set faction'); diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index 83262ee6964..c34fbce6a66 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -26,103 +26,6 @@ #include "Player.h" #include "WorldSession.h" -/*###### -## npc_agnetta_tyrsdottar for QUEST_ITS_THAT_YOUR_GOBLIN 12969 -######*/ - -enum eAgnetta -{ - FACTION_HOSTILE_AT1 = 45, - SAY_AGGRO = 0, - GOSSIP_ID = 9874, - GOSSIP_OPTION_ID = 0 -}; - -class npc_agnetta_tyrsdottar : public CreatureScript -{ -public: - npc_agnetta_tyrsdottar() : CreatureScript("npc_agnetta_tyrsdottar") { } - - struct npc_agnetta_tyrsdottarAI : public ScriptedAI - { - npc_agnetta_tyrsdottarAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() - { - me->RestoreFaction(); - } - - void sGossipSelect(Player* player, uint32 sender, uint32 action) - { - if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) - { - player->CLOSE_GOSSIP_MENU(); - me->setFaction(FACTION_HOSTILE_AT1); - Talk(SAY_AGGRO); - AttackStart(player); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_agnetta_tyrsdottarAI(creature); - } -}; - -/*###### -## npc_frostborn_scout -######*/ - -#define GOSSIP_ITEM1 "Are you okay? I've come to take you back to Frosthold if you can stand." -#define GOSSIP_ITEM2 "I'm sorry that I didn't get here sooner. What happened?" -#define GOSSIP_ITEM3 "I'll go get some help. Hang in there." - -enum eFrostbornScout -{ - QUEST_MISSING_SCOUTS = 12864 -}; - -class npc_frostborn_scout : public CreatureScript -{ -public: - npc_frostborn_scout() : CreatureScript("npc_frostborn_scout") { } - - bool OnGossipHello(Player* player, Creature* creature) - { - - if (player->GetQuestStatus(QUEST_MISSING_SCOUTS) == QUEST_STATUS_INCOMPLETE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->PlayerTalkClass->SendGossipMenu(13611, creature->GetGUID()); - } - - return true; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - switch (action) - { - case GOSSIP_ACTION_INFO_DEF+1: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - player->PlayerTalkClass->SendGossipMenu(13612, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+2: - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - player->PlayerTalkClass->SendGossipMenu(13613, creature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+3: - player->PlayerTalkClass->SendGossipMenu(13614, creature->GetGUID()); - player->AreaExploredOrEventHappens(QUEST_MISSING_SCOUTS); - break; - } - - return true; - } -}; - ///////////////////// ///npc_injured_goblin ///////////////////// @@ -576,8 +479,6 @@ class spell_close_rift : public SpellScriptLoader void AddSC_storm_peaks() { - new npc_agnetta_tyrsdottar(); - new npc_frostborn_scout(); new npc_injured_goblin(); new npc_roxi_ramrocket(); new npc_brunnhildar_prisoner(); -- cgit v1.2.3 From 4761590c4a03933910447da766aa70823362f16f Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 26 Jun 2013 13:36:53 -0230 Subject: Core/Scripting: Update Injured Goblin Miner script to use DB gossip. --- sql/updates/world/2013_06_26_02_world_gossip.sql | 9 +++++ src/server/scripts/Northrend/zone_storm_peaks.cpp | 46 +++++++---------------- 2 files changed, 23 insertions(+), 32 deletions(-) create mode 100644 sql/updates/world/2013_06_26_02_world_gossip.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_26_02_world_gossip.sql b/sql/updates/world/2013_06_26_02_world_gossip.sql new file mode 100644 index 00000000000..56c41e18b38 --- /dev/null +++ b/sql/updates/world/2013_06_26_02_world_gossip.sql @@ -0,0 +1,9 @@ +-- Add Any Missing Gossip Option for Injured Goblin Miner +DELETE FROM `gossip_menu_option` WHERE menu_id IN (9859); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES +(9859,0,0,"I am ready, lets get you out of here.",1,1,0,0,0,0,''); + +-- Add Gossip option condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (15) AND `SourceGroup` IN (9859); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,9859,0,0,28,12832,0,0,1,0,'','Injured Goblin Miner - Show gossip option only if quest "Bitter Departure" is not complete'); diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index c34fbce6a66..4b1fa3f4123 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -30,15 +30,15 @@ ///npc_injured_goblin ///////////////////// -enum eInjuredGoblin +enum InjuredGoblinMiner { QUEST_BITTER_DEPARTURE = 12832, SAY_QUEST_ACCEPT = 0, - SAY_END_WP_REACHED = 1 + SAY_END_WP_REACHED = 1, + GOSSIP_ID = 9859, + GOSSIP_OPTION_ID = 0 }; -#define GOSSIP_ITEM_1 "I am ready, lets get you out of here" - class npc_injured_goblin : public CreatureScript { public: @@ -83,6 +83,16 @@ public: return; DoMeleeAttackIfReady(); } + + void sGossipSelect(Player* player, uint32 sender, uint32 action) + { + if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) + { + player->CLOSE_GOSSIP_MENU(); + me->setFaction(113); + npc_escortAI::Start(true, true, player->GetGUID()); + } + } }; CreatureAI* GetAI(Creature* creature) const @@ -90,21 +100,6 @@ public: return new npc_injured_goblinAI(creature); } - bool OnGossipHello(Player* player, Creature* creature) - { - if (creature->IsQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_BITTER_DEPARTURE) == QUEST_STATUS_INCOMPLETE) - { - player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->PlayerTalkClass->SendGossipMenu(9999999, creature->GetGUID()); - } - else - player->SEND_GOSSIP_MENU(999999, creature->GetGUID()); - return true; - } - bool OnQuestAccept(Player* /*player*/, Creature* creature, Quest const* quest) { if (quest->GetQuestId() == QUEST_BITTER_DEPARTURE) @@ -112,19 +107,6 @@ public: return false; } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - npc_escortAI* pEscortAI = CAST_AI(npc_injured_goblin::npc_injured_goblinAI, creature->AI()); - - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - pEscortAI->Start(true, true, player->GetGUID()); - creature->setFaction(113); - } - return true; - } }; /*###### -- cgit v1.2.3 From 651a966e92e720fd794cfbeb6f6998aa1fb9b1c3 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 26 Jun 2013 15:38:19 -0230 Subject: Core/Scripting: More BRS updates. Emberseer is still buggy if player resets. Working on it. --- .../2013_06_26_03_world_creature_template.sql | 2 + .../BlackrockSpire/blackrock_spire.h | 47 +++--- .../EasternKingdoms/BlackrockSpire/boss_gyth.cpp | 44 +++--- .../BlackrockSpire/boss_pyroguard_emberseer.cpp | 170 +++++++++++---------- .../BlackrockSpire/instance_blackrock_spire.cpp | 21 +-- .../BlackwingLair/boss_nefarian.cpp | 3 +- 6 files changed, 149 insertions(+), 138 deletions(-) create mode 100644 sql/updates/world/2013_06_26_03_world_creature_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_26_03_world_creature_template.sql b/sql/updates/world/2013_06_26_03_world_creature_template.sql new file mode 100644 index 00000000000..dae5f5869c3 --- /dev/null +++ b/sql/updates/world/2013_06_26_03_world_creature_template.sql @@ -0,0 +1,2 @@ +-- Missing data for Embeerseer +UPDATE `creature_template` SET `faction_A`=40, `faction_H`=40, `unit_flags`=`unit_flags`|256|33554432 WHERE `entry`=9816; diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h index 020c81a92e1..ccd96ef81d2 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/blackrock_spire.h @@ -18,35 +18,35 @@ #ifndef DEF_BLACKROCK_SPIRE_H #define DEF_BLACKROCK_SPIRE_H -uint32 const EncounterCount = 23; +uint32 const EncounterCount = 22; #define BRSScriptName "instance_blackrock_spire" enum DataTypes { - DATA_OMOKK = 1, - DATA_SHADOW_HUNTER_VOSHGAJIN = 2, - DATA_WARMASTER_VOONE = 3, - DATA_MOTHER_SMOLDERWEB = 4, - DATA_UROK_DOOMHOWL = 5, // not scripted - DATA_QUARTERMASTER_ZIGRIS = 6, - DATA_GIZRUL_THE_SLAVENER = 7, // not scripted - DATA_HALYCON = 8, - DATA_OVERLORD_WYRMTHALAK = 9, - DATA_PYROGAURD_EMBERSEER = 10, - DATA_WARCHIEF_REND_BLACKHAND = 11, - DATA_GYTH = 12, - DATA_THE_BEAST = 13, - DATA_GENERAL_DRAKKISATH = 14, + DATA_OMOKK = 0, + DATA_SHADOW_HUNTER_VOSHGAJIN = 1, + DATA_WARMASTER_VOONE = 2, + DATA_MOTHER_SMOLDERWEB = 3, + DATA_UROK_DOOMHOWL = 4, // not scripted + DATA_QUARTERMASTER_ZIGRIS = 5, + DATA_GIZRUL_THE_SLAVENER = 6, // not scripted + DATA_HALYCON = 7, + DATA_OVERLORD_WYRMTHALAK = 8, + DATA_PYROGAURD_EMBERSEER = 9, + DATA_WARCHIEF_REND_BLACKHAND = 10, + DATA_GYTH = 11, + DATA_THE_BEAST = 12, + DATA_GENERAL_DRAKKISATH = 13, // Extra - DATA_DRAGONSPIRE_ROOM = 15, - DATA_HALL_RUNE_1 = 16, - DATA_HALL_RUNE_2 = 17, - DATA_HALL_RUNE_3 = 18, - DATA_HALL_RUNE_4 = 19, - DATA_HALL_RUNE_5 = 20, - DATA_HALL_RUNE_6 = 21, - DATA_HALL_RUNE_7 = 22 + DATA_DRAGONSPIRE_ROOM = 14, + DATA_HALL_RUNE_1 = 15, + DATA_HALL_RUNE_2 = 16, + DATA_HALL_RUNE_3 = 17, + DATA_HALL_RUNE_4 = 18, + DATA_HALL_RUNE_5 = 19, + DATA_HALL_RUNE_6 = 20, + DATA_HALL_RUNE_7 = 21 }; enum CreaturesIds @@ -94,7 +94,6 @@ enum GameObjectsIds GO_GYTH_EXIT_DOOR = 175186, GO_DRAKKISATH_DOOR_1 = 175946, GO_DRAKKISATH_DOOR_2 = 175947, - GO_BLACKROCK_ALTAR = 175706, // Altar used to start Pyroguard Emberseer event // Runes in dragonspire hall GO_HALL_RUNE_1 = 175197, GO_HALL_RUNE_2 = 175199, diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp index e0023995cb3..75e9ad6a140 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_gyth.cpp @@ -22,10 +22,10 @@ enum Spells { SPELL_REND_MOUNTS = 16167, // Change model - SPELL_FREEZE = 16350, // Combat - SPELL_KNOCK_AWAY = 10101, // Combat - SPELL_FLAMEBREATH = 16390, // Combat (Self cast) SPELL_CORROSIVE_ACID = 16359, // Combat (self cast) + SPELL_FLAMEBREATH = 16390, // Combat (Self cast) + SPELL_FREEZE = 16350, // Combat (Self cast) + SPELL_KNOCK_AWAY = 10101, // Combat SPELL_SUMMON_REND = 16328 // Summons Rend near death }; @@ -34,7 +34,8 @@ enum Events EVENT_CORROSIVE_ACID = 1, EVENT_FREEZE = 2, EVENT_FLAME_BREATH = 3, - EVENT_SUMMONED = 4, + EVENT_KNOCK_AWAY = 4, + EVENT_SUMMONED = 5, }; class boss_gyth : public CreatureScript @@ -52,15 +53,21 @@ public: { _Reset(); SummonedRend = false; + if (instance->GetBossState(DATA_GYTH) == IN_PROGRESS) + { + instance->SetBossState(DATA_GYTH, DONE); + me->DespawnOrUnsummon(); + } } void EnterCombat(Unit* /*who*/) { _EnterCombat(); - events.ScheduleEvent(EVENT_CORROSIVE_ACID, 18000); - events.ScheduleEvent(EVENT_FREEZE, 20000); - events.ScheduleEvent(EVENT_FLAME_BREATH, 16000); + events.ScheduleEvent(EVENT_CORROSIVE_ACID, urand(8000, 16000)); + events.ScheduleEvent(EVENT_FREEZE, urand(8000, 16000)); + events.ScheduleEvent(EVENT_FLAME_BREATH, urand(8000, 16000)); + events.ScheduleEvent(EVENT_FLAME_BREATH, urand(12000, 18000)); } void JustDied(Unit* /*killer*/) @@ -80,16 +87,13 @@ public: if (!SummonedRend && HealthBelowPct(5)) { - DoCast(me, SPELL_REND_MOUNTS); + DoCast(me, SPELL_SUMMON_REND); me->RemoveAura(SPELL_REND_MOUNTS); SummonedRend = true; } events.Update(diff); - if (me->HasUnitState(UNIT_STATE_CASTING)) - return; - while (uint32 eventId = events.ExecuteEvent()) { switch (eventId) @@ -99,16 +103,22 @@ public: // Load Path break; case EVENT_CORROSIVE_ACID: - DoCastVictim(SPELL_CORROSIVE_ACID); - events.ScheduleEvent(EVENT_CORROSIVE_ACID, 20000); + DoCast(me, SPELL_CORROSIVE_ACID); + events.ScheduleEvent(EVENT_CORROSIVE_ACID, urand(10000, 16000)); break; case EVENT_FREEZE: - DoCastVictim(SPELL_FREEZE); - events.ScheduleEvent(EVENT_FREEZE, 16000); + DoCast(me, SPELL_FREEZE); + events.ScheduleEvent(EVENT_FREEZE, urand(10000, 16000)); break; case EVENT_FLAME_BREATH: - DoCastVictim(SPELL_FLAMEBREATH); - events.ScheduleEvent(EVENT_FLAME_BREATH, 10000); + DoCast(me, SPELL_FLAMEBREATH); + events.ScheduleEvent(EVENT_FLAME_BREATH, urand(10000, 16000)); + break; + case EVENT_KNOCK_AWAY: + DoCastVictim(SPELL_KNOCK_AWAY); + events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(14000, 20000)); + break; + default: break; } } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp index 15fbf90e766..24a1fbad457 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/boss_pyroguard_emberseer.cpp @@ -61,12 +61,11 @@ enum Events EVENT_FIRENOVA = 4, EVENT_FLAMEBUFFET = 5, EVENT_PYROBLAST = 6, - // Reset - EVENT_RESET_ALTAR = 7, // Hack due to trigger spell not in dbc - EVENT_FIRE_SHIELD = 8, + EVENT_FIRE_SHIELD = 7, // Make sure all players have aura from altar - EVENT_PLAYER_CHECK = 9 + EVENT_PLAYER_CHECK = 8, + EVENT_ENTER_COMBAT = 9 }; class boss_pyroguard_emberseer : public CreatureScript @@ -82,46 +81,46 @@ public: { if (instance) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE); - + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + events.Reset(); // Apply auras on spawn and reset // DoCast(me, SPELL_FIRE_SHIELD_TRIGGER); // Need to find this in old DBC if possible - // Open doors on reset - if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) - OpenDoors(false); // Opens 2 entrance doors - instance->SetBossState(DATA_PYROGAURD_EMBERSEER, NOT_STARTED); - + me->RemoveAura(SPELL_EMBERSEER_FULL_STRENGTH); + me->RemoveAura(SPELL_EMBERSEER_GROWING); + me->RemoveAura(SPELL_EMBERSEER_GROWING_TRIGGER); + events.ScheduleEvent(EVENT_RESPAWN, 1000); // Hack for missing trigger spell events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); - } - } - void JustReachedHome() - { - if (instance) - { - // respawn any dead Blackhand Incarcerators & reset Altar - events.ScheduleEvent(EVENT_RESPAWN, 1000); - events.ScheduleEvent(EVENT_RESET_ALTAR, 6000); + // Open doors on reset + if (instance->GetBossState(DATA_PYROGAURD_EMBERSEER) == IN_PROGRESS) + OpenDoors(false); // Opens 2 entrance doors } } - void SetData(uint32 type, uint32 data) + void SetData(uint32 /*type*/, uint32 data) { - if (instance && type == 1 && data == 1) - events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); - - if (instance && type == 1 && data == 2) + switch (data) { - // Close these two doors on Blackhand Incarcerators aggro - if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) - if (door1->GetGoState() == GO_STATE_ACTIVE) - door1->SetGoState(GO_STATE_READY); - if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) - if (door2->GetGoState() == GO_STATE_ACTIVE) - door2->SetGoState(GO_STATE_READY); + case 1: + events.ScheduleEvent(EVENT_PLAYER_CHECK, 5000); + break; + case 2: + // Close these two doors on Blackhand Incarcerators aggro + if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN))) + if (door1->GetGoState() == GO_STATE_ACTIVE) + door1->SetGoState(GO_STATE_READY); + if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS))) + if (door2->GetGoState() == GO_STATE_ACTIVE) + door2->SetGoState(GO_STATE_READY); + break; + case 3: + Reset(); + break; + default: + break; } } @@ -138,24 +137,10 @@ public: if (instance) { // Activate all the runes - if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1))) - rune1->SetGoState(GO_STATE_READY); - if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2))) - rune2->SetGoState(GO_STATE_READY); - if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3))) - rune3->SetGoState(GO_STATE_READY); - if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4))) - rune4->SetGoState(GO_STATE_READY); - if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5))) - rune5->SetGoState(GO_STATE_READY); - if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6))) - rune6->SetGoState(GO_STATE_READY); - if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7))) - rune7->SetGoState(GO_STATE_READY); - + UpdateRunes(GO_STATE_READY); // Opens all 3 doors OpenDoors(true); - + // Complete encounter instance->SetBossState(DATA_PYROGAURD_EMBERSEER, DONE); } } @@ -180,8 +165,8 @@ public: me->CastSpell(me, SPELL_EMBERSEER_FULL_STRENGTH); Talk(EMOTE_FREE_OF_BONDS); Talk(YELL_FREE_OF_BONDS); - me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_NOT_SELECTABLE); - AttackStart(me->SelectNearestPlayer(30.0f)); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE); + events.ScheduleEvent(EVENT_ENTER_COMBAT, 2000); } } } @@ -200,6 +185,28 @@ public: door3->SetGoState(GO_STATE_ACTIVE); } + void UpdateRunes(GOState state) + { + if (instance) + { + // update all runes + if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1))) + rune1->SetGoState(state); + if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2))) + rune2->SetGoState(state); + if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3))) + rune3->SetGoState(state); + if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4))) + rune4->SetGoState(state); + if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5))) + rune5->SetGoState(state); + if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6))) + rune6->SetGoState(state); + if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7))) + rune7->SetGoState(state); + } + } + void UpdateAI(uint32 diff) { events.Update(diff); @@ -215,8 +222,13 @@ public: GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f); for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) if (Creature* creatureList = *itr) + { if (!creatureList->IsAlive()) + { creatureList->Respawn(); + } + creatureList->AI()->SetData(1, 2); + } break; } case EVENT_PRE_FIGHT_1: @@ -225,12 +237,10 @@ public: std::list creatureList; GetCreatureListWithEntryInGrid(creatureList, me, NPC_BLACKHAND_INCARCERATOR, 35.0f); for (std::list::iterator itr = creatureList.begin(); itr != creatureList.end(); ++itr) + { if (Creature* creatureList = *itr) creatureList->AI()->SetData(1, 1); - - // Lock Blackrock Altar - if (GameObject* altar = me->GetMap()->GetGameObject(instance->GetData64(GO_BLACKROCK_ALTAR))) - altar->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); + } events.ScheduleEvent(EVENT_PRE_FIGHT_2, 32000); break; } @@ -239,14 +249,10 @@ public: me->CastSpell(me, SPELL_EMBERSEER_GROWING); Talk(EMOTE_ONE_STACK); break; - case EVENT_RESET_ALTAR: - if (GameObject* altar = me->GetMap()->GetGameObject(instance->GetData64(GO_BLACKROCK_ALTAR))) - altar->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); - break; case EVENT_FIRE_SHIELD: // #### Spell isn't doing any damage ??? #### - DoCast(SPELL_FIRE_SHIELD); - events.ScheduleEvent(SPELL_FIRE_SHIELD, 3000); + DoCast(me, SPELL_FIRE_SHIELD); + events.ScheduleEvent(EVENT_FIRE_SHIELD, 3000); break; case EVENT_PLAYER_CHECK: { @@ -265,30 +271,32 @@ public: } break; } - default: + case EVENT_ENTER_COMBAT: + AttackStart(me->SelectNearestPlayer(30.0f)); break; - } - } - - if (!UpdateVictim()) - return; - - while (uint32 eventId = events.ExecuteEvent()) - { - switch (eventId) - { case EVENT_FIRENOVA: - DoCast(me, SPELL_FIRENOVA); + if (UpdateVictim()) + { + DoCast(me, SPELL_FIRENOVA); events.ScheduleEvent(EVENT_FIRENOVA, 6000); + } break; case EVENT_FLAMEBUFFET: - DoCast(me, SPELL_FLAMEBUFFET); + if (UpdateVictim()) + { + DoCast(me, SPELL_FLAMEBUFFET); events.ScheduleEvent(EVENT_FLAMEBUFFET, 14000); + } break; case EVENT_PYROBLAST: - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) - DoCast(target, SPELL_PYROBLAST); + if (UpdateVictim()) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + DoCast(target, SPELL_PYROBLAST); events.ScheduleEvent(EVENT_PYROBLAST, 15000); + } + break; + default: break; } } @@ -327,7 +335,8 @@ public: void Reset() { me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_IMMUNE_TO_NPC); - _events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 1000); + if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) + Emberseer->AI()->SetData(1, 3); } void JustDied(Unit* /*killer*/) @@ -343,6 +352,11 @@ public: me->InterruptSpell(CURRENT_CHANNELED_SPELL); _events.CancelEvent(EVENT_ENCAGED_EMBERSEER); } + + if (data == 1 && value == 2) + { + _events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 5000); + } } void EnterCombat(Unit* /*who*/) @@ -350,9 +364,10 @@ public: // Used to close doors if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) Emberseer->AI()->SetData(1, 2); - + me->CallForHelp(60.0f); _events.ScheduleEvent(EVENT_STRIKE, urand(8000, 16000)); _events.ScheduleEvent(EVENT_ENCAGE, urand(10000, 20000)); + me->CallForHelp(60.0f); // double call because not all are aggroing on first call. } void UpdateAI(uint32 diff) @@ -370,7 +385,6 @@ public: if(!me->HasAura(SPELL_ENCAGE_EMBERSEER)) if (Creature* Emberseer = me->FindNearestCreature(NPC_PYROGAURD_EMBERSEER, 30.0f, true)) DoCast(Emberseer, SPELL_ENCAGE_EMBERSEER); - _events.ScheduleEvent(EVENT_ENCAGED_EMBERSEER, 5000); break; } } diff --git a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp index 6eff7f7a430..7b80f75255a 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockSpire/instance_blackrock_spire.cpp @@ -66,16 +66,6 @@ public: go_blackrockaltar = 0; } - bool IsEncounterInProgress() const - { - for (uint8 i = 0; i < EncounterCount; ++i) - { - if (encounter[i] == IN_PROGRESS) - return true; - } - return false; - } - void OnCreatureCreate(Creature* creature) { switch (creature->GetEntry()) @@ -153,11 +143,6 @@ public: if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) HandleGameObject(0, true, go); break; - case GO_BLACKROCK_ALTAR: - go_blackrockaltar = go->GetGUID(); - if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE) - go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); - break; case GO_HALL_RUNE_1: go_roomrunes[0] = go->GetGUID(); if (GetBossState(DATA_HALL_RUNE_1) == DONE) @@ -347,9 +332,6 @@ public: case GO_EMBERSEER_OUT: return go_emberseerout; break; - case GO_BLACKROCK_ALTAR: - return go_blackrockaltar; - break; case GO_HALL_RUNE_1: return go_roomrunes[0]; break; @@ -544,8 +526,11 @@ public: loadStream >> tmpState; if (tmpState == IN_PROGRESS || tmpState > SPECIAL) tmpState = NOT_STARTED; + SetBossState(i, EncounterState(tmpState)); } } + else + OUT_LOAD_INST_DATA_FAIL; OUT_LOAD_INST_DATA_COMPLETE; } diff --git a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp index d8be67777e4..fde21c63840 100644 --- a/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp +++ b/src/server/scripts/EasternKingdoms/BlackwingLair/boss_nefarian.cpp @@ -64,6 +64,7 @@ enum Says enum Gossip { GOSSIP_ID = 21332, + GOSSIP_OPTION_ID = 0 }; enum Creatures @@ -269,7 +270,7 @@ public: void sGossipSelect(Player* player, uint32 sender, uint32 action) { - if (sender == GOSSIP_ID && action == 0) + if (sender == GOSSIP_ID && action == GOSSIP_OPTION_ID) { player->CLOSE_GOSSIP_MENU(); Talk(SAY_GAMESBEGIN_1); -- cgit v1.2.3 From 2691defd1e6afd19b0740dc3614e35351706ad93 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 29 Jun 2013 16:56:52 +0200 Subject: DB/SAI: Convert Felblood Initiate to SAI and fix runtime warning --- sql/updates/world/2013_06_29_00_world_misc.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/2013_06_29_00_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_29_00_world_misc.sql b/sql/updates/world/2013_06_29_00_world_misc.sql new file mode 100644 index 00000000000..175f37041e2 --- /dev/null +++ b/sql/updates/world/2013_06_29_00_world_misc.sql @@ -0,0 +1,14 @@ +SET @ENTRY = 24918; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@ENTRY; +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=@ENTRY AND `source_type`=0; +INSERT INTO `smart_scripts`(`entryorguid`,`id`,`event_type`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES +(@ENTRY,0,0,4000,6000,7000,9000,11,14873,0,2,'Felblood Initiate - Cast Sinister Strike'), +(@ENTRY,1,0,17000,22000,20000,26000,11,29098,1,2,'Felblood Initiate - Cast Bitter Withdrawal'), +(@ENTRY,2,0,8000,12000,18000,22000,11,35871,1,2,'Felblood Initiate - Cast Spellbreaker'), +(@ENTRY,3,8,44937,0,0,0,36,24955,1,1,'Felblood Initiate - Changes Template to Emaciated Felblood After Using Fel Siphon (Quest: 11515)'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceGroup`=4 AND `SourceEntry`=@ENTRY AND `SourceId`=0; +INSERT INTO `conditions`(`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ConditionTarget`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`NegativeCondition`,`Comment`) VALUE +(22,4,@ENTRY,0,1,31,3,24955,1,'Felblood Initiate may not already be transformed to template entry 24955 when trying to update template to 24955'); -- cgit v1.2.3 From cc899ddc2d57524d45958db52b9eccaa7603e433 Mon Sep 17 00:00:00 2001 From: ZxBiohazardZx Date: Sat, 29 Jun 2013 18:46:22 +0200 Subject: DB/Misc: - Convert c_t_a entry into c_a to prevent errors - Allow mounting in Black Temple - fix by exodius to add sound for Corrupted Ashbringer Closes #9997 --- sql/updates/world/2013_06_29_01_world_creature_addon.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sql/updates/world/2013_06_29_01_world_creature_addon.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_29_01_world_creature_addon.sql b/sql/updates/world/2013_06_29_01_world_creature_addon.sql new file mode 100644 index 00000000000..e7ec3a48752 --- /dev/null +++ b/sql/updates/world/2013_06_29_01_world_creature_addon.sql @@ -0,0 +1,10 @@ +DELETE FROM `creature_template_addon` WHERE `entry`=17975; +DELETE FROM `creature_addon` WHERE `guid`=82987; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(82987,829870,0,0,1,0,''); -- Converted from c_t_a, works on both normal and heroic entry + +-- allow mounting inside Black Temple (outdoor areas) +UPDATE `instance_template` SET `allowMount`=1 WHERE `map`=564; + +-- fix for issue #9997 by Exodius +UPDATE `spell_script_names` SET `spell_id`=28441 WHERE `spell_id`=28414 AND `ScriptName`='spell_item_ashbringer'; -- cgit v1.2.3 From 0e4cebf9c6da88f8f00e97133168d47e2415ce00 Mon Sep 17 00:00:00 2001 From: ZxBiohazardZx Date: Sat, 29 Jun 2013 18:51:48 +0200 Subject: DB/creature: another c_t_a to c_a convert --- sql/updates/world/2013_06_29_02_world_creature_addon.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2013_06_29_02_world_creature_addon.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_29_02_world_creature_addon.sql b/sql/updates/world/2013_06_29_02_world_creature_addon.sql new file mode 100644 index 00000000000..c8ee431909b --- /dev/null +++ b/sql/updates/world/2013_06_29_02_world_creature_addon.sql @@ -0,0 +1,4 @@ +DELETE FROM `creature_template_addon` WHERE `entry`=17976; +DELETE FROM `creature_addon` WHERE `guid`=82986; +INSERT INTO `creature_addon` (`guid`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(82986,829860,0,0,1,0,'19818'); -- Converted from c_t_a, works on both normal and heroic entry -- cgit v1.2.3 From c13e84f1f998fb6b283d19818e71ecafcf9288fb Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 29 Jun 2013 20:46:54 +0200 Subject: DB/SAI: Fix several runtime warnings / logical mistakes * Wrong event types for linked events * Possible multiple AI template initialization --- sql/updates/world/2013_06_29_01_world_misc.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sql/updates/world/2013_06_29_01_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_29_01_world_misc.sql b/sql/updates/world/2013_06_29_01_world_misc.sql new file mode 100644 index 00000000000..63ca7e96e63 --- /dev/null +++ b/sql/updates/world/2013_06_29_01_world_misc.sql @@ -0,0 +1,3 @@ +UPDATE `smart_scripts` SET `event_type`=37 WHERE `entryorguid` IN (9818,9817) AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE ((`entryorguid`=10817 AND `id`=9) OR (`entryorguid`= 1399 AND `id`=3)) AND `source_type`=0; +UPDATE `smart_scripts` SET `link`=11 WHERE `entryorguid`=314 AND `id`=10 AND `source_type`=0; \ No newline at end of file -- cgit v1.2.3 From 718fc5bfc94bdfa8c94a5ed646f31305ab2b08bd Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 29 Jun 2013 20:52:45 +0200 Subject: Rename SQL file and add new line at end of file --- sql/updates/world/2013_06_29_01_world_misc.sql | 3 --- sql/updates/world/2013_06_29_03_world_misc.sql | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 sql/updates/world/2013_06_29_01_world_misc.sql create mode 100644 sql/updates/world/2013_06_29_03_world_misc.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2013_06_29_01_world_misc.sql b/sql/updates/world/2013_06_29_01_world_misc.sql deleted file mode 100644 index 63ca7e96e63..00000000000 --- a/sql/updates/world/2013_06_29_01_world_misc.sql +++ /dev/null @@ -1,3 +0,0 @@ -UPDATE `smart_scripts` SET `event_type`=37 WHERE `entryorguid` IN (9818,9817) AND `id`=0 AND `source_type`=0; -UPDATE `smart_scripts` SET `event_type`=61 WHERE ((`entryorguid`=10817 AND `id`=9) OR (`entryorguid`= 1399 AND `id`=3)) AND `source_type`=0; -UPDATE `smart_scripts` SET `link`=11 WHERE `entryorguid`=314 AND `id`=10 AND `source_type`=0; \ No newline at end of file diff --git a/sql/updates/world/2013_06_29_03_world_misc.sql b/sql/updates/world/2013_06_29_03_world_misc.sql new file mode 100644 index 00000000000..db9a7525517 --- /dev/null +++ b/sql/updates/world/2013_06_29_03_world_misc.sql @@ -0,0 +1,3 @@ +UPDATE `smart_scripts` SET `event_type`=37 WHERE `entryorguid` IN (9818,9817) AND `id`=0 AND `source_type`=0; +UPDATE `smart_scripts` SET `event_type`=61 WHERE ((`entryorguid`=10817 AND `id`=9) OR (`entryorguid`= 1399 AND `id`=3)) AND `source_type`=0; +UPDATE `smart_scripts` SET `link`=11 WHERE `entryorguid`=314 AND `id`=10 AND `source_type`=0; -- cgit v1.2.3