diff --git a/sql/updates/world/4.3.4/2018_04_25_00_world_from_335_was_2018_04_17_00_world_335.sql b/sql/updates/world/4.3.4/2018_04_25_00_world_from_335_was_2018_04_17_00_world_335.sql new file mode 100644 index 00000000000..d8c940b4e09 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_04_25_00_world_from_335_was_2018_04_17_00_world_335.sql @@ -0,0 +1,6 @@ +/* +-- +UPDATE `creature_text` SET `BroadcastTextId`=1325, `Text`="These statuettes must hold a hidden compartment...." WHERE `CreatureID`=3846 AND `GroupID`=0 AND `ID`=0; +UPDATE `creature_text` SET `BroadcastTextId`=1354, `Text`="%s searches the ancient statuettes." WHERE `CreatureID`=3846 AND `GroupID`=1 AND `ID`=0; +UPDATE `creature_text` SET `BroadcastTextId`=1326, `Text`="They're locked! NO!!" WHERE `CreatureID`=3846 AND `GroupID`=2 AND `ID`=0; +*/ diff --git a/sql/updates/world/4.3.4/2018_04_25_01_world_from_335_was_2018_04_17_01_world_335.sql b/sql/updates/world/4.3.4/2018_04_25_01_world_from_335_was_2018_04_17_01_world_335.sql new file mode 100644 index 00000000000..ed173a42a4f --- /dev/null +++ b/sql/updates/world/4.3.4/2018_04_25_01_world_from_335_was_2018_04_17_01_world_335.sql @@ -0,0 +1,6 @@ +/* +-- +UPDATE `creature_text` SET `BroadcastTextId`=0, `Text`="This statuette must hold a hidden compartment...." WHERE `CreatureID`=3846 AND `GroupID`=0 AND `ID`=0; +UPDATE `creature_text` SET `BroadcastTextId`=0, `Text`="%s searches the ancient statuette." WHERE `CreatureID`=3846 AND `GroupID`=1 AND `ID`=0; +UPDATE `creature_text` SET `BroadcastTextId`=0, `Text`="It's locked! NO!!" WHERE `CreatureID`=3846 AND `GroupID`=2 AND `ID`=0; +*/ diff --git a/sql/updates/world/4.3.4/2018_04_25_02_world_from_335_was_2018_04_17_02_world_335.sql b/sql/updates/world/4.3.4/2018_04_25_02_world_from_335_was_2018_04_17_02_world_335.sql new file mode 100644 index 00000000000..f4590fca3cf --- /dev/null +++ b/sql/updates/world/4.3.4/2018_04_25_02_world_from_335_was_2018_04_17_02_world_335.sql @@ -0,0 +1,26 @@ +/* +-- +-- Quest "Troubled Spirits of Kel'Theril" +-- Highborne Relic Fragment +UPDATE `gameobject_template` SET `AIName`="SmartGameObjectAI" WHERE `entry` IN (175888,175891,175892,175893); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (175888,175891,175892,175893) AND `source_type`=1; +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 +(175888,1,0,0,70,0,100,1,2,0,0,0,12,7523,1,180000,0,0,0,8,0,0,0,6505.45,-4230.91,658.636,3.31351,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Suffering Highborne'"), +(175888,1,1,0,70,0,100,1,2,0,0,0,12,7524,1,180000,0,0,0,8,0,0,0,6494.32,-4228.23,658.549,5.63829,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Anguished Highborne'"), +(175891,1,0,0,70,0,100,1,2,0,0,0,12,7523,1,180000,0,0,0,8,0,0,0,6562.16,-3919.21,658.297,4.42878,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Suffering Highborne'"), +(175891,1,1,0,70,0,100,1,2,0,0,0,12,7524,1,180000,0,0,0,8,0,0,0,6556.55,-3938.87,658.313,1.30682,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Anguished Highborne'"), +(175892,1,0,0,70,0,100,1,2,0,0,0,12,7523,1,180000,0,0,0,8,0,0,0,6482.59,-4109.64,658.291,2.21004,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Suffering Highborne'"), +(175892,1,1,0,70,0,100,1,2,0,0,0,12,7524,1,180000,0,0,0,8,0,0,0,6482.84,-4093.91,658.412,4.11463,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Anguished Highborne'"), +(175893,1,0,0,70,0,100,1,2,0,0,0,12,7523,1,180000,0,0,0,8,0,0,0,6563.31,-4047.92,658.329,1.18116,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Suffering Highborne'"), +(175893,1,1,0,70,0,100,1,2,0,0,0,12,7524,1,180000,0,0,0,8,0,0,0,6557.38,-4041.45,658.408,0.313297,"Highborne Relic Fragment - On Gameobject State Changed - Summon Creature 'Anguished Highborne'"); + +-- Anguished Highborne +DELETE FROM `smart_scripts` WHERE `entryorguid`=7524 AND `source_type`=0 AND `id`=1; +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 +(7524,0,1,0,11,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,20,0,0,0,0,0,0,"Anguished Highborne - On Respawn - Start Attacking"); + +-- Suffering Highborne +DELETE FROM `smart_scripts` WHERE `entryorguid`=7523 AND `source_type`=0 AND `id`=1; +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 +(7523,0,1,0,11,0,100,0,0,0,0,0,49,0,0,0,0,0,0,21,20,0,0,0,0,0,0,"Suffering Highborne - On Respawn - Start Attacking"); +*/ diff --git a/sql/updates/world/4.3.4/2018_04_25_03_world_from_335_was_2018_04_17_03_world_335.sql b/sql/updates/world/4.3.4/2018_04_25_03_world_from_335_was_2018_04_17_03_world_335.sql new file mode 100644 index 00000000000..1e00acca13a --- /dev/null +++ b/sql/updates/world/4.3.4/2018_04_25_03_world_from_335_was_2018_04_17_03_world_335.sql @@ -0,0 +1,26 @@ +/* +-- +-- Remorseful Highborne +DELETE FROM `smart_scripts` WHERE `entryorguid`=10684 AND `source_type`=0 AND `id` IN (1,2); +DELETE FROM `smart_scripts` WHERE `entryorguid`=1068400 AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(10684,0,1,0,20,0,100,0,5248,0,0,0,48,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Remorseful Highborne - On Quest 'Tormented by the Past' Finished - Set Active On"), +(10684,0,2,0,20,0,100,0,5248,0,0,0,80,1068400,0,0,0,0,0,1,0,0,0,0,0,0,0,"Remorseful Highborne - On Quest 'Tormented by the Past' Finished - Run Script"), +(1068400,9,0,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,7523,500,0,0,0,0,0,"Remorseful Highborne - On Script - Set Data 1 1"), +(1068400,9,1,0,0,0,100,0,0,0,0,0,45,1,1,0,0,0,0,11,7524,500,0,0,0,0,0,"Remorseful Highborne - On Script - Set Data 1 1"), +(1068400,9,2,0,0,0,100,0,120000,120000,0,0,45,2,2,0,0,0,0,11,7523,500,0,0,0,0,0,"Remorseful Highborne - On Script - Set Data 2 2"), +(1068400,9,3,0,0,0,100,0,0,0,0,0,45,2,2,0,0,0,0,11,7524,500,0,0,0,0,0,"Remorseful Highborne - On Script - Set Data 2 2"), +(1068400,9,4,0,0,0,100,0,0,0,0,0,48,0,0,0,0,0,0,1,0,0,0,0,0,0,0,"Remorseful Highborne - On Script - Set Active Off"); + +-- Anguished Highborne +DELETE FROM `smart_scripts` WHERE `entryorguid`=7524 AND `source_type`=0 AND `id` IN (2,3); +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 +(7524,0,2,0,38,0,100,0,1,1,0,0,2,124,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anguished Highborne - On Data Set 1 1 - Set Faction 124"), +(7524,0,3,0,38,0,100,0,2,2,0,0,2,21,0,0,0,0,0,1,0,0,0,0,0,0,0,"Anguished Highborne - On Data Set 2 2 - Set Faction 21"); + +-- Suffering Highborne +DELETE FROM `smart_scripts` WHERE `entryorguid`=7523 AND `source_type`=0 AND `id` IN (2,3); +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 +(7523,0,2,0,38,0,100,0,1,1,0,0,2,124,0,0,0,0,0,1,0,0,0,0,0,0,0,"Suffering Highborne - On Data Set 1 1 - Set Faction 124"), +(7523,0,3,0,38,0,100,0,2,2,0,0,2,21,0,0,0,0,0,1,0,0,0,0,0,0,0,"Suffering Highborne - On Data Set 2 2 - Set Faction 21"); +*/ diff --git a/sql/updates/world/4.3.4/2018_04_25_04_world_from_335_was_2018_04_22_00_world_335.sql b/sql/updates/world/4.3.4/2018_04_25_04_world_from_335_was_2018_04_22_00_world_335.sql new file mode 100644 index 00000000000..19109d05a13 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_04_25_04_world_from_335_was_2018_04_22_00_world_335.sql @@ -0,0 +1,16 @@ +/* +-- +DELETE FROM `npc_text` WHERE `ID` IN (15520,15521,15522,15525,15587,15841,16396,16660,16859,17482,17519); +INSERT INTO `npc_text` (`ID`, `text0_0`, `BroadcastTextID0`, `Probability0`, em0_0) VALUES +(15520, "Ah yes, our assault on the Horde town of Taurajo. I struggled with the implications of the decision.$B$BTaurajo was admittedly what you might call a 'soft target,' primarily a hunters' camp. Still, it had been used to recruit, equip, and train Horde infantry for many years.$B$BWhen our scouts reported that Taurajo's most dangerous units were out on the hunt, we had to act quickly.",39124, 1, 1), +(15521, "$B$BI would prefer not to use the term 'sacked,' but yes, the attack went off flawlessly. We removed Taurajo from the equation, confiscated its arms, and destroyed its smithing facilities. The assault gave our forces considerable breathing room and knocked the enemy off balance.$B$BNonetheless, during the assault, I instructed my men to leave a gap open in our lines...",39126, 1, 274), +(15522, "Taurajo had a significant civilian population. I wanted to ensure that they could escape the fighting, and many did, finding refuge in the north.$B$BThere are some, even in Alliance High Command, who argued that I let an opportunity slip away. That I should've taken hostages. But I don't see the value in those sort of terror-tactics.$B$BHear me out, $n: I want this war to end someday. It won't ever stop if we butcher or imprison civilians.$B$BI just pray that there are those on the other side who see things as I do.",39128, 1, 274), +(15525, "The lesson we've learned here in the Barrens is that nothing short of scorched earth will rout these Horde animals. No quarter!",39135, 1, 0), +(15587, "Be sure to check in with my son Marley at the digsite. He's a good kid - my eyes and ears over at Bael Modan.",39344, 1, 1), +(15841, "The Cataclysm has destroyed the western mountains of Thousand Needles. The South Sea has rushed in and the canyons are flooded.$B$BPlease, $c, you must come to our aid at New Thalanaar!",40354, 1, 5), +(16396, "Let's get this over with. I'd rather be back home at Aerie Peak than starin' down these ugly trolls.",43287, 1, 0), +(16660, "Sharpbeak's the finest gryphon in Aerie Peak. He'll get you right to the top of Jintha'Alor, and we'll take the top terraces in no time.",44808, 1, 0), +(16859, "No thanks! Maybe sometime in the future. Or the past. Not today.",45667, 1, 1), +(17482, "Thank you for saving me! But don't tell Ferli, ok? I said I busted out on my own!",48726, 1, 0), +(17519, "I wasn't expecting anyone down here. Come to keep me company, or just looking for a way out?",48894, 1, 0); +*/ diff --git a/sql/updates/world/4.3.4/2018_04_25_05_world_from_335_was_2018_04_24_00_world_335.sql b/sql/updates/world/4.3.4/2018_04_25_05_world_from_335_was_2018_04_24_00_world_335.sql new file mode 100644 index 00000000000..091080d8611 --- /dev/null +++ b/sql/updates/world/4.3.4/2018_04_25_05_world_from_335_was_2018_04_24_00_world_335.sql @@ -0,0 +1,98 @@ +/* +-- Quest "Ancient Spirit" +UPDATE `quest_template_addon` SET `SpecialFlags`=2 WHERE `ID`=4261; -- Prevents quest from auto completing +-- Arei +DELETE FROM `creature_text` WHERE `CreatureID`=9598; +INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES +(9598,0,0,"Please, help me to get through this cursed forest, $r.",12,0,100,0,0,0,5004,0,"Arei"), +(9598,1,0,"The corruption of Felwood has trapped my spirit here... I may never rest...",12,0,100,0,0,0,5037,0,"Arei"), +(9598,2,0,"That I must fight against my own kind deeply saddens me.",12,0,100,0,0,0,5008,0,"Arei"), +(9598,3,0,"The corruption of the fel has not left any of the creatures of Felwood untouched, $n. Please, be on your guard.",12,0,100,0,0,0,5005,0,"Arei"), +(9598,4,0,"I can sense it now, $n. Ashenvale lies down this path.",12,0,100,0,0,0,5023,0,"Arei"), +(9598,5,0,"I feel... something strange...",12,0,100,0,0,0,5026,0,"Arei"), +(9598,6,0,"$n, my form has now changed! The true strength of my spirit is returning to me now... The cursed grasp of the forest is leaving me.",12,0,100,0,0,0,5029,0,"Arei"), +(9598,7,0,"Thank you, $n. Now my spirit will finally be at peace.",12,0,100,0,0,0,5036,0,"Arei"), +(9598,8,0,"I sense the taint of corruption upon this $n. Help me destroy it!",12,0,100,0,0,0,5473,0,"Arei"), +(9598,8,1,"This creature suffers from the effects of the fel... We must end its misery.",12,0,100,0,0,0,5474,0,"Arei"), +(9598,8,2,"This $n has been driven mad from the corruption!",12,0,100,0,0,0,5475,0,"Arei"); + +UPDATE `creature_template` SET `AIName`="SmartAI" WHERE `entry`=9598; +DELETE FROM `smart_scripts` WHERE `entryorguid`=9598 AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (959800,959801,959802) AND `source_type`=9; +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(9598,0,0,1,19,0,100,0,4261,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0,"Arei - On Quest 'Ancient Spirit' Taken - Store Targetlist"), +(9598,0,1,2,61,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Quest 'Ancient Spirit' Taken - Remove Npc Flag Questgiver"), +(9598,0,2,0,61,0,100,0,0,0,0,0,80,959800,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Quest 'Ancient Spirit' Taken - Run Script"), +(9598,0,3,0,6,0,100,0,0,0,0,0,6,4261,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Just Died - Fail Quest 'Ancient Spirit'"), +(9598,0,4,0,6,0,100,0,0,0,0,0,1,1,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Just Died - Say Line 1"), +(9598,0,5,0,40,0,100,0,7,9598,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Waypoint 7 Reached - Say Line 2"), +(9598,0,6,0,40,0,100,0,7,9598,0,0,54,5000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Waypoint 7 Reached - Pause Waypoint"), +(9598,0,7,0,40,0,100,0,15,9598,0,0,1,3,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Waypoint 15 Reached - Say Line 3"), +(9598,0,8,0,40,0,100,0,15,9598,0,0,54,8000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Waypoint 15 Reached - Pause Waypoint"), +(9598,0,9,0,40,0,100,0,36,9598,0,0,107,1,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Waypoint 36 Reached - Summon Group 1"), +(9598,0,10,0,40,0,100,0,37,9598,0,0,80,959802,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Waypoint 36 Reached - Run Script"), +(9598,0,11,0,4,0,50,0,0,0,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Aggro - Say Line 8"), +(9598,0,12,0,0,0,100,0,6000,9000,16000,21000,11,5337,0,0,0,0,0,2,0,0,0,0,0,0,0,"Arei - In Combat - Cast 'Wither Strike'"), +(959800,9,0,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Script - Say Line 0"), +(959800,9,1,0,0,0,100,0,5000,5000,0,0,53,0,9598,0,0,0,2,1,0,0,0,0,0,0,0,"Arei - On Script - Start Waypoint"), +(959800,9,2,0,0,0,100,0,0,0,0,0,2,250,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Script - Set Faction 250"), +(959802,9,0,0,0,0,100,0,0,0,0,0,2,124,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Script - Set Faction 124"), +(959802,9,1,0,0,0,100,0,1000,1000,0,0,1,4,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Script - Say Line 4"), +(959802,9,2,0,0,0,100,0,5000,5000,0,0,1,5,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Script - Say Line 5"), +(959802,9,3,0,0,0,100,0,2000,2000,0,0,11,14888,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Script - Cast 'Arei Transform'"), +(959802,9,4,0,0,0,100,0,3000,3000,0,0,1,6,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Script - Say Line 6"), +(959802,9,5,0,0,0,100,0,8000,8000,0,0,1,7,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Script - Say Line 7"), +(959802,9,6,0,0,0,100,0,0,0,0,0,15,4261,0,0,0,0,0,12,1,0,0,0,0,0,0,"Arei - On Script - Complete Quest 'Ancient Spirit'"), +(959802,9,7,0,0,0,100,0,0,0,0,0,41,6000,0,0,0,0,0,1,0,0,0,0,0,0,0,"Arei - On Script - Despawn"); + +-- Condition +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=15033; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17,0,15033,0,0,29,0,9598,200,0,1,0,0,"","Spell 'Summon Ancient Spirits' cannot be casted if Arei is already summoned"); + +DELETE FROM `waypoints` WHERE `entry`=9598; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(9598,1,6004.265,-1180.494,376.377,''), +(9598,2,6002.512,-1157.294,381.407,''), +(9598,3,6029.228,-1139.720,383.127,''), +(9598,4,6042.479,-1128.963,386.582,''), +(9598,5,6062.820,-1115.522,386.850,''), +(9598,6,6089.188,-1111.907,383.105,''), +(9598,7,6104.390,-1114.561,380.490,''), +(9598,8,6115.080,-1128.572,375.779,''), +(9598,9,6119.352,-1147.314,372.518,''), +(9598,10,6119.003,-1176.082,371.072,''), +(9598,11,6120.982,-1198.408,373.432,''), +(9598,12,6123.521,-1226.636,374.119,''), +(9598,13,6127.737,-1246.035,373.574,''), +(9598,14,6133.433,-1253.642,369.100,''), +(9598,15,6150.787,-1269.151,369.240,''), +(9598,16,6155.805,-1275.029,373.627,''), +(9598,17,6163.544,-1307.130,376.234,''), +(9598,18,6174.800,-1340.885,379.039,''), +(9598,19,6191.144,-1371.260,378.453,''), +(9598,20,6215.652,-1397.517,376.012,''), +(9598,21,6243.784,-1407.675,371.594,''), +(9598,22,6280.775,-1408.259,370.554,''), +(9598,23,6325.360,-1406.688,370.082,''), +(9598,24,6355.000,-1404.337,370.646,''), +(9598,25,6374.679,-1399.176,372.105,''), +(9598,26,6395.803,-1367.057,374.910,''), +(9598,27,6408.569,-1333.487,376.616,''), +(9598,28,6409.075,-1312.168,379.598,''), +(9598,29,6418.689,-1277.697,381.638,''), +(9598,30,6441.689,-1247.316,387.246,''), +(9598,31,6462.136,-1226.316,397.610,''), +(9598,32,6478.021,-1216.260,408.284,''), +(9598,33,6499.632,-1217.087,419.461,''), +(9598,34,6523.165,-1220.780,430.549,''), +(9598,35,6542.716,-1216.997,437.788,''), +(9598,36,6557.279,-1211.125,441.452,''), +(9598,37,6574.568,-1204.589,443.216,''); + +DELETE FROM `creature_summon_groups` WHERE `summonerId`=9598; +INSERT INTO `creature_summon_groups` (`summonerId`, `summonerType`, `groupId`, `entry`, `position_x`, `position_y`, `position_z`, `orientation`, `summonType`, `summonTime`) VALUES +(9598,0,1,7139,6573.321,-1195.213,442.489,5.544130,3,300000), +(9598,0,1,7138,6573.240,-1213.475,443.643,2.371120,3,300000), +(9598,0,1,7138,6583.354,-1209.811,444.769,2.452802,3,300000); +*/ diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 5853c8914ee..26ec90fdd60 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -65,7 +65,7 @@ SmartScript::~SmartScript() bool SmartScript::IsSmart(Creature* c /*= nullptr*/) { bool smart = true; - if (c && c->GetAIName() != "SmartAI") + if (!dynamic_cast(c->AI())) smart = false; if (!me || me->GetAIName() != "SmartAI") @@ -80,7 +80,7 @@ bool SmartScript::IsSmart(Creature* c /*= nullptr*/) bool SmartScript::IsSmartGO(GameObject* g /*= nullptr*/) { bool smart = true; - if (g && g->GetAIName() != "SmartGameObjectAI") + if (!dynamic_cast(g->AI())) smart = false; if (!go || go->GetAIName() != "SmartGameObjectAI") diff --git a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp index f10e466b4e0..b1c6c341c42 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp +++ b/src/server/scripts/EasternKingdoms/Stratholme/boss_baroness_anastari.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2018 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,111 +15,129 @@ * with this program. If not, see . */ -/* ScriptData -SDName: Boss_Baroness_Anastari -SD%Complete: 90 -SDComment: MC disabled -SDCategory: Stratholme -EndScriptData */ - -#include "ScriptMgr.h" #include "InstanceScript.h" +#include "ObjectAccessor.h" +#include "Player.h" +#include "ScriptMgr.h" #include "ScriptedCreature.h" #include "stratholme.h" enum Spells { - SPELL_BANSHEEWAIL = 16565, - SPELL_BANSHEECURSE = 16867, - SPELL_SILENCE = 18327 - //SPELL_POSSESS = 17244 + SPELL_BANSHEEWAIL = 16565, + SPELL_BANSHEECURSE = 16867, + SPELL_SILENCE = 18327, + SPELL_POSSESS = 17244, // the charm on player + SPELL_POSSESSED = 17246, // the damage debuff on player + SPELL_POSSESS_INV = 17250 // baroness becomes invisible while possessing a target }; -class boss_baroness_anastari : public CreatureScript +enum BaronessAnastariEvents { -public: - boss_baroness_anastari() : CreatureScript("boss_baroness_anastari") { } + EVENT_SPELL_BANSHEEWAIL = 1, + EVENT_SPELL_BANSHEECURSE = 2, + EVENT_SPELL_SILENCE = 3, + EVENT_SPELL_POSSESS = 4, + EVENT_CHECK_POSSESSED = 5 +}; - struct boss_baroness_anastariAI : public ScriptedAI +struct boss_baroness_anastari : public BossAI +{ + boss_baroness_anastari(Creature* creature) : BossAI(creature, TYPE_BARONESS) { } + + ObjectGuid _possessedTargetGuid; + + void Reset() override { - boss_baroness_anastariAI(Creature* creature) : ScriptedAI(creature) + _possessedTargetGuid.Clear(); + + instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POSSESS); + instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_POSSESSED); + me->RemoveAurasDueToSpell(SPELL_POSSESS_INV); + + events.Reset(); + } + + void JustEngagedWith(Unit* /*who*/) override + { + events.ScheduleEvent(EVENT_SPELL_BANSHEEWAIL, 1s); + events.ScheduleEvent(EVENT_SPELL_BANSHEECURSE, 11s); + events.ScheduleEvent(EVENT_SPELL_SILENCE, 13s); + events.ScheduleEvent(EVENT_SPELL_POSSESS, 20s, 30s); + } + + void JustDied(Unit* /*killer*/) override + { + // needed until crystals implemented, + // see line 305 instance_stratholme.cpp + instance->SetData(TYPE_BARONESS, IN_PROGRESS); + } + + void UpdateAI(uint32 diff) override + { + if (!UpdateVictim()) + return; + + events.Update(diff); + + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; + + while (uint32 eventId = events.ExecuteEvent()) { - Initialize(); - instance = me->GetInstanceScript(); - } - - void Initialize() - { - BansheeWail_Timer = 1000; - BansheeCurse_Timer = 11000; - Silence_Timer = 13000; - //Possess_Timer = 35000; - } - - InstanceScript* instance; - - uint32 BansheeWail_Timer; - uint32 BansheeCurse_Timer; - uint32 Silence_Timer; - //uint32 Possess_Timer; - - void Reset() override - { - Initialize(); - } - - void JustEngagedWith(Unit* /*who*/) override - { - } - - void JustDied(Unit* /*killer*/) override - { - instance->SetData(TYPE_BARONESS, IN_PROGRESS); - } - - void UpdateAI(uint32 diff) override - { - if (!UpdateVictim()) - return; - - //BansheeWail - if (BansheeWail_Timer <= diff) + switch (eventId) { - if (rand32() % 100 < 95) + case EVENT_SPELL_BANSHEEWAIL: DoCastVictim(SPELL_BANSHEEWAIL); - //4 seconds until we should cast this again - BansheeWail_Timer = 4000; - } else BansheeWail_Timer -= diff; - - //BansheeCurse - if (BansheeCurse_Timer <= diff) - { - if (rand32() % 100 < 75) + events.Repeat(4s); + break; + case EVENT_SPELL_BANSHEECURSE: DoCastVictim(SPELL_BANSHEECURSE); - //18 seconds until we should cast this again - BansheeCurse_Timer = 18000; - } else BansheeCurse_Timer -= diff; - - //Silence - if (Silence_Timer <= diff) - { - if (rand32() % 100 < 80) + events.Repeat(18s); + break; + case EVENT_SPELL_SILENCE: DoCastVictim(SPELL_SILENCE); - //13 seconds until we should cast this again - Silence_Timer = 13000; - } else Silence_Timer -= diff; + events.Repeat(13s); + break; + case EVENT_SPELL_POSSESS: + if (Unit* possessTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true, false)) + { + DoCast(possessTarget, SPELL_POSSESS, true); + DoCast(possessTarget, SPELL_POSSESSED, true); + DoCastSelf(SPELL_POSSESS_INV, true); + _possessedTargetGuid = possessTarget->GetGUID(); + events.ScheduleEvent(EVENT_CHECK_POSSESSED, 0s); + } + else + events.Repeat(20s, 30s); + break; + case EVENT_CHECK_POSSESSED: + if (Player* possessedTarget = ObjectAccessor::GetPlayer(*me, _possessedTargetGuid)) + { + if (!possessedTarget->HasAura(SPELL_POSSESSED) || possessedTarget->HealthBelowPct(50)) + { + possessedTarget->RemoveAurasDueToSpell(SPELL_POSSESS); + possessedTarget->RemoveAurasDueToSpell(SPELL_POSSESSED); + me->RemoveAurasDueToSpell(SPELL_POSSESS_INV); + _possessedTargetGuid.Clear(); + events.ScheduleEvent(EVENT_SPELL_POSSESS, 20s, 30s); + events.CancelEvent(EVENT_CHECK_POSSESSED); + } + else + events.Repeat(1s); + } + break; + } - DoMeleeAttackIfReady(); + if (me->HasUnitState(UNIT_STATE_CASTING)) + return; } - }; - CreatureAI* GetAI(Creature* creature) const override - { - return GetStratholmeAI(creature); + DoMeleeAttackIfReady(); } }; void AddSC_boss_baroness_anastari() { - new boss_baroness_anastari(); + RegisterStratholmeCreatureAI(boss_baroness_anastari); } diff --git a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h index 061fd0af701..f1b877948ca 100644 --- a/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h +++ b/src/server/scripts/EasternKingdoms/Stratholme/stratholme.h @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2018 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 @@ -109,4 +108,6 @@ inline AI* GetStratholmeAI(T* obj) return GetInstanceAI(obj, StratholmeScriptName); } +#define RegisterStratholmeCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetStratholmeAI) + #endif