mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/ShrineOfTheStorm: Implement Lord Stormsong encounter (#31317)
This commit is contained in:
169
sql/updates/world/master/2025_10_05_00_world.sql
Normal file
169
sql/updates/world/master/2025_10_05_00_world.sql
Normal file
@@ -0,0 +1,169 @@
|
||||
SET @ATSPAWN := 271;
|
||||
SET @ATID := 174;
|
||||
SET @ATPROP := 167;
|
||||
|
||||
-- Creature
|
||||
UPDATE `creature_template_addon` SET `auras`='160758' WHERE `entry`=134060; -- 134060 (Lord Stormsong) - Mod Scale 140%
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_lord_stormsong' WHERE `entry`=134060;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_lord_stormsong_brother_pike' WHERE `entry`=139970;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_lord_stormsong_rexxar' WHERE `entry`=139971;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_lord_stormsong_ancient_mindbender' WHERE `entry`=137051;
|
||||
UPDATE `creature_template` SET `faction`=14, `speed_walk`=0.800000011920928955, `speed_run`=0.285714298486709594, `BaseAttackTime`=2000, `unit_flags`=0x2000000, `unit_flags2`=0x4000800, `unit_flags3`=0x1280000, `AIName`='SmartAI' WHERE `entry`=137036; -- Awoken Void
|
||||
|
||||
DELETE FROM `creature_template_difficulty` WHERE `Entry` IN (137036, 134060, 137051, 82347);
|
||||
INSERT INTO `creature_template_difficulty` (`Entry`, `DifficultyID`, `LevelScalingDeltaMin`, `LevelScalingDeltaMax`, `ContentTuningID`, `HealthScalingExpansion`, `HealthModifier`, `ManaModifier`, `ArmorModifier`, `DamageModifier`, `CreatureDifficultyID`, `TypeFlags`, `TypeFlags2`, `TypeFlags3`, `LootID`, `PickPocketLootID`, `SkinLootID`, `GoldMin`, `GoldMax`, `StaticFlags1`, `StaticFlags2`, `StaticFlags3`, `StaticFlags4`, `StaticFlags5`, `StaticFlags6`, `StaticFlags7`, `StaticFlags8`, `VerifiedBuild`) VALUES
|
||||
(137036, 0, 0, 0, 500, 0, 1, 1, 1, 1, 143479, 1610612752, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137036, 1, 0, 0, 500, 7, 1, 1, 1, 1, 143479, 1610612752, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137036, 2, 0, 0, 501, 7, 1, 1, 1, 1, 158853, 1610612752, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137036, 23, 0, 0, 502, 7, 1, 1, 1, 1, 158854, 1610612752, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(134060, 0, 2, 2, 500, 7, 35, 55, 1, 1, 140110, 2097224, 129, 0, 0, 0, 0, 0, 0, 268435456, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(134060, 1, 2, 2, 500, 7, 35, 55, 1, 1, 140110, 2097224, 129, 0, 0, 0, 0, 0, 0, 268435456, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(134060, 2, 2, 2, 501, 7, 35, 55.3403, 1, 1, 144314, 2097224, 129, 0, 0, 0, 0, 0, 0, 268435456, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(134060, 23, 2, 2, 502, 7, 35, 55.3403, 1, 1, 144315, 2097224, 129, 0, 0, 0, 0, 0, 0, 268435456, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137051, 0, 0, 0, 500, 7, 3, 1, 1, 1, 143496, 2097224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137051, 1, 0, 0, 500, 7, 3, 1, 1, 1, 143496, 2097224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137051, 2, 0, 0, 501, 7, 3, 1, 1, 1, 144310, 2097224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(137051, 23, 0, 0, 502, 7, 3, 1, 1, 1, 144311, 2097224, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(82347, 0, 0, 0, 181, 10, 0.01, 1, 1, 1, 80443, 0, 0, 0, 0, 0, 0, 0, 0, 536870912, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(82347, 1, 0, 0, 181, 10, 0.01, 1, 1, 1, 80443, 0, 0, 0, 0, 0, 0, 0, 0, 536870912, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(82347, 2, 0, 0, 181, 10, 1, 1, 1, 1, 80443, 0, 0, 0, 0, 0, 0, 0, 0, 536870912, 0, 0, 0, 0, 0, 0, 0, 63305),
|
||||
(82347, 23, 0, 0, 181, 9, 0.01, 1, 1, 1, 80443, 0, 0, 0, 0, 0, 0, 0, 0, 536870912, 0, 0, 0, 0, 0, 0, 0, 63305);
|
||||
|
||||
-- Areatrigger
|
||||
DELETE FROM `areatrigger_create_properties` WHERE (`IsCustom`=0 AND `Id` IN (13289));
|
||||
INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `SpellForVisuals`, `TimeToTargetScale`, `Speed`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(13289, 0, 17892, 0, 4, 0, 0, 0, 0, -1, 0, 0, NULL, 0, 0, 4, 1.5, 1.5, 4, 4, 1, 1, 0, 0, 'at_lord_stormsong_waken_the_void', 63305); -- Spell: 269094 (Waken the Void)
|
||||
|
||||
DELETE FROM `areatrigger_template` WHERE (`IsCustom`=0 AND `Id` IN (17892));
|
||||
INSERT INTO `areatrigger_template` (`Id`, `IsCustom`, `VerifiedBuild`) VALUES
|
||||
(17892, 0, 63305);
|
||||
|
||||
DELETE FROM `areatrigger` WHERE `SpawnId`=@ATSPAWN;
|
||||
INSERT INTO `areatrigger` (`SpawnId`, `AreaTriggerCreatePropertiesId`, `IsCustom`, `MapId`, `SpawnDifficulties`, `PosX`, `PosY`, `PosZ`, `Orientation`, `PhaseUseFlags`, `PhaseId`, `PhaseGroup`, `ScriptName`, `Comment`, `VerifiedBuild`) VALUES
|
||||
(@ATSPAWN, @ATPROP, 1, 1864, '1,2,23,8', 3578.1179, -1450.8363, 156.6917, 2.635109, 0, 0, 0, 'at_lord_stormsong_intro', 'Shrine of the Storm - Lord Stormsong intro', 0);
|
||||
|
||||
DELETE FROM `areatrigger_create_properties` WHERE `Id`=@ATPROP AND `IsCustom`=1;
|
||||
INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `SpellForVisuals`, `TimeToTargetScale`, `Speed`, `SpeedIsTime`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(@ATPROP, 1, @ATID, 1, 0, 0, 0, 0, 0, -1, 0, 0, NULL, 0, 0, 0, 1, 20, 10, 5, 20, 10, 5, 0, 0, '', 0);
|
||||
|
||||
DELETE FROM `areatrigger_template` WHERE `Id`=@ATID AND `IsCustom`=1;
|
||||
INSERT INTO `areatrigger_template` (`Id`, `IsCustom`, `Flags`, `ActionSetId`, `ActionSetFlags`, `VerifiedBuild`) VALUES
|
||||
(@ATID, 1, 1, 0, 0, 0);
|
||||
|
||||
-- Spells
|
||||
DELETE FROM `serverside_spell` WHERE `Id` = 269396;
|
||||
INSERT INTO `serverside_spell` (`Id`, `DifficultyID`, `CategoryId`, `Dispel`, `Mechanic`, `Attributes`, `AttributesEx`, `AttributesEx2`, `AttributesEx3`, `AttributesEx4`, `AttributesEx5`, `AttributesEx6`, `AttributesEx7`, `AttributesEx8`, `AttributesEx9`, `AttributesEx10`, `AttributesEx11`, `AttributesEx12`, `AttributesEx13`, `AttributesEx14`, `AttributesEx15`, `Stances`, `StancesNot`, `Targets`, `TargetCreatureType`, `RequiresSpellFocus`, `FacingCasterFlags`, `CasterAuraState`, `TargetAuraState`, `ExcludeCasterAuraState`, `ExcludeTargetAuraState`, `CasterAuraSpell`, `TargetAuraSpell`, `ExcludeCasterAuraSpell`, `ExcludeTargetAuraSpell`, `CasterAuraType`, `TargetAuraType`, `ExcludeCasterAuraType`, `ExcludeTargetAuraType`, `CastingTimeIndex`, `RecoveryTime`, `CategoryRecoveryTime`, `StartRecoveryCategory`, `StartRecoveryTime`, `InterruptFlags`, `AuraInterruptFlags1`, `AuraInterruptFlags2`, `ChannelInterruptFlags1`, `ChannelInterruptFlags2`, `ProcFlags`, `ProcFlags2`, `ProcChance`, `ProcCharges`, `ProcCooldown`, `ProcBasePPM`, `MaxLevel`, `BaseLevel`, `SpellLevel`, `DurationIndex`, `RangeIndex`, `Speed`, `LaunchDelay`, `StackAmount`, `EquippedItemClass`, `EquippedItemSubClassMask`, `EquippedItemInventoryTypeMask`, `ContentTuningId`, `SpellName`, `ConeAngle`, `ConeWidth`, `MaxTargetLevel`, `MaxAffectedTargets`, `SpellFamilyName`, `SpellFamilyFlags1`, `SpellFamilyFlags2`, `SpellFamilyFlags3`, `SpellFamilyFlags4`, `DmgClass`, `PreventionType`, `AreaGroupId`, `SchoolMask`, `ChargeCategoryId`) VALUES
|
||||
(269396, 0, 0, 0, 0, 0x29240180, 0x000004A8, 0x10484004, 0x00070000, 0x00800080, 0x00060008, 0x00001000, 0x00000040, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 0, 0, 0, 0, 0, 0, 21, 1, 0, 0, 0, -1, -1, 0, 0, 'Lord Stormsong Gain Energy', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
|
||||
|
||||
DELETE FROM `serverside_spell_effect` WHERE `SpellID` = 269396;
|
||||
INSERT INTO `serverside_spell_effect` (`SpellID`, `EffectIndex`, `DifficultyID`, `Effect`, `EffectAura`, `EffectAmplitude`, `EffectAttributes`, `EffectAuraPeriod`, `EffectBonusCoefficient`, `EffectChainAmplitude`, `EffectChainTargets`, `EffectItemType`, `EffectMechanic`, `EffectPointsPerResource`, `EffectPosFacing`, `EffectRealPointsPerLevel`, `EffectTriggerSpell`, `BonusCoefficientFromAP`, `PvpMultiplier`, `Coefficient`, `Variance`, `ResourceCoefficient`, `GroupSizeBasePointsCoefficient`, `EffectBasePoints`, `EffectMiscValue1`, `EffectMiscValue2`, `EffectRadiusIndex1`, `EffectRadiusIndex2`, `EffectSpellClassMask1`, `EffectSpellClassMask2`, `EffectSpellClassMask3`, `EffectSpellClassMask4`, `ImplicitTarget1`, `ImplicitTarget2`) VALUES
|
||||
(269396, 0, 0, 6, 226, 0, 0, 1000, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`IN ('spell_lord_stormsong_release_void_missile', 'spell_lord_stormsong_release_void', 'spell_lord_stormsong_ancient_mindbender', 'spell_lord_stormsong_energize', 'spell_lord_stormsong_fixate', 'spell_lord_stormsong_surrender_to_the_void', 'spell_lord_stormsong_disciple_of_the_vol_zith', 'spell_lord_stormsong_waken_the_void_missile');
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(269131, 'spell_lord_stormsong_ancient_mindbender'),
|
||||
(269396, 'spell_lord_stormsong_energize'),
|
||||
(269103, 'spell_lord_stormsong_fixate'),
|
||||
(274711, 'spell_lord_stormsong_release_void'),
|
||||
(274710, 'spell_lord_stormsong_release_void_missile'),
|
||||
(269242, 'spell_lord_stormsong_surrender_to_the_void'),
|
||||
(269289, 'spell_lord_stormsong_disciple_of_the_vol_zith'),
|
||||
(269021, 'spell_lord_stormsong_waken_the_void_missile');
|
||||
|
||||
-- Texts
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 134060;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(134060, 0, 0, '|TInterface\\Icons\\Spell_shadow_mindflay.blp:20|tAn |cFFFF0000|Hspell:269131|h[Ancient Mindbender]|h|r attaches to |cFFFF0000$n|r!', 41, 0, 100, 0, 0, 0, 152885, 0, 'Lord Stormsong to Player');
|
||||
|
||||
-- Sai
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=137036 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `Difficulties`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param_string`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `action_param7`, `action_param_string`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_param_string`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(137036, 0, 0, 1, '', 54, 0, 100, 0, 0, 0, 0, 0, 0, '', 85, 269021, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Awoken Void - On summoned - Self: Cast spell 269021'),
|
||||
(137036, 0, 1, 0, '', 61, 0, 100, 0, 0, 0, 0, 0, 0, '', 8, 0, 0, 0, 0, 0, 0, 0, NULL, 1, 0, 0, 0, 0, NULL, 0, 0, 0, 0, 'Awoken Void - On linked - Set Reactstate React Passive');
|
||||
|
||||
-- Conversation
|
||||
DELETE FROM `conversation_actors` WHERE (`ConversationId`=8767 AND `Idx` = 0) OR (`ConversationId`=8766 AND `Idx` = 0) OR (`ConversationId`=8751 AND `Idx` IN (1,0)) OR (`ConversationId`=8749 AND `Idx` IN (1,0)) OR (`ConversationId`=8750 AND `Idx` IN (1,0));
|
||||
INSERT INTO `conversation_actors` (`ConversationId`, `ConversationActorId`, `ConversationActorGuid`, `Idx`, `CreatureId`, `CreatureDisplayInfoId`, `NoActorObject`, `ActivePlayerObject`, `VerifiedBuild`) VALUES
|
||||
(8767, 65085, 0, 0, 139971, 0, 0, 0, 63305), -- Full: 0x2016D4E90088B0C00058DC00005ACAFC Creature/0 R1461/S22748 Map: 1864 (Shrine of the Storm) Entry: 139971 (Rexxar) Low: 5950204
|
||||
(8766, 65078, 0, 0, 139970, 0, 0, 0, 63305), -- Full: 0x20424CE90088B0800029BA000057ECD7 Creature/0 R4243/S10682 Map: 1864 (Shrine of the Storm) Entry: 139970 (Brother Pike) Low: 5762263
|
||||
(8751, 65085, 0, 1, 139971, 0, 0, 0, 63305), -- Full: 0x2016D4E90088B0C00058DC00005ACAFC Creature/0 R1461/S22748 Map: 1864 (Shrine of the Storm) Entry: 139971 (Rexxar) Low: 5950204
|
||||
(8751, 62882, 7000893, 0, 0, 0, 0, 0, 63305), -- Full: 0x2016D4E90082EB000058DC00005AC3A6 Creature/0 R1461/S22748 Map: 1864 (Shrine of the Storm) Entry: 134060 (Lord Stormsong) Low: 5948326
|
||||
(8749, 65076, 7000896, 1, 0, 0, 0, 0, 63305), -- Full: 0x202FD4E90088AEC0003F4E000052B167 Creature/0 R3061/S16206 Map: 1864 (Shrine of the Storm) Entry: 139963 (Queen Azshara) Low: 5419367
|
||||
(8749, 62882, 7000893, 0, 0, 0, 0, 0, 63305), -- Full: 0x202FD4E90082EB00003F4E000052B167 Creature/0 R3061/S16206 Map: 1864 (Shrine of the Storm) Entry: 134060 (Lord Stormsong) Low: 5419367
|
||||
(8750, 62882, 7000893, 1, 0, 0, 0, 0, 63305), -- Full: 0x202FD4E90082EB00003F4E000052B167 Creature/0 R3061/S16206 Map: 1864 (Shrine of the Storm) Entry: 134060 (Lord Stormsong) Low: 5419367
|
||||
(8750, 65078, 0, 0, 139970, 0, 0, 0, 63305); -- Full: 0x202FD4E90088B080003F4E000052B241 Creature/0 R3061/S16206 Map: 1864 (Shrine of the Storm) Entry: 139970 (Brother Pike) Low: 5419585
|
||||
|
||||
DELETE FROM `conversation_line_template` WHERE `Id` IN (19655, 19654, 19653, 19652, 19651, 19650, 19598, 19597, 19612, 19611, 19610, 19609, 19608, 19607, 19606, 19605);
|
||||
INSERT INTO `conversation_line_template` (`Id`, `UiCameraID`, `ActorIdx`, `Flags`, `ChatType`, `VerifiedBuild`) VALUES
|
||||
(19655, 0, 0, 0, 0, 63305),
|
||||
(19654, 0, 0, 0, 0, 63305),
|
||||
(19653, 0, 0, 0, 0, 63305),
|
||||
(19652, 0, 0, 0, 0, 63305),
|
||||
(19651, 0, 0, 0, 0, 63305),
|
||||
(19650, 0, 0, 0, 0, 63305),
|
||||
(19598, 0, 1, 0, 0, 63305),
|
||||
(19597, 0, 0, 0, 0, 63305),
|
||||
(19612, 0, 1, 0, 0, 63305),
|
||||
(19611, 0, 1, 0, 0, 63305),
|
||||
(19610, 0, 0, 0, 0, 63305),
|
||||
(19609, 0, 1, 0, 1, 63305),
|
||||
(19608, 0, 0, 0, 0, 63305),
|
||||
(19607, 0, 1, 0, 0, 63305),
|
||||
(19606, 0, 1, 0, 1, 63305),
|
||||
(19605, 0, 0, 0, 1, 63305);
|
||||
|
||||
DELETE FROM `conversation_template` WHERE `Id` IN (8750, 8749, 8767, 8766, 8751);
|
||||
INSERT INTO `conversation_template` (`Id`, `FirstLineID`, `TextureKitId`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(8750, 19605, 0, 'conversation_lord_stormsong_brother_pike_intro_outro', 63305),
|
||||
(8767, 19653, 0, 'conversation_lord_stormsong_rexxar_outro', 63305),
|
||||
(8766, 19650, 0, 'conversation_lord_stormsong_brother_pike_intro_outro', 63305),
|
||||
(8751, 19610, 0, 'conversation_lord_stormsong_rexxar_intro', 63305),
|
||||
(8749, 19597, 0, '', 63305);
|
||||
|
||||
-- Waypoints
|
||||
SET @ENTRY := 139970;
|
||||
SET @PATHOFFSET := 0;
|
||||
SET @PATH := @ENTRY * 100 + @PATHOFFSET;
|
||||
DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
|
||||
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
|
||||
(@PATH, 1, 0x0, NULL, 'Brother Pike/Rexxar - Lord Stormsong intro path');
|
||||
|
||||
DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
|
||||
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
|
||||
(@PATH, 0, 3610.2056, -1374.7302, 160.579, NULL, 0),
|
||||
(@PATH, 1, 3608.8958, -1378.4115, 160.57855, NULL, 0),
|
||||
(@PATH, 2, 3607.586, -1382.0928, 160.57811, NULL, 0),
|
||||
(@PATH, 3, 3606.2456, -1385.8595, 160.0007, NULL, 0),
|
||||
(@PATH, 4, 3604.7078, -1390.1816, 159.93288, NULL, 0),
|
||||
(@PATH, 5, 3603.3623, -1393.9633, 159.97807, NULL, 0),
|
||||
(@PATH, 6, 3602.0173, -1397.743, 159.97806, NULL, 0),
|
||||
(@PATH, 7, 3595.3533, -1411.257, 159.97807, NULL, 0),
|
||||
(@PATH, 8, 3587.605, -1425.5087, 160.00375, NULL, 0),
|
||||
(@PATH, 9, 3579.908, -1436.9341, 159.97806, NULL, 0),
|
||||
(@PATH, 10, 3561.501, -1465.5017, 153.70235, NULL, 0),
|
||||
(@PATH, 11, 3557.8325, -1476.3142, 153.37808, NULL, 0);
|
||||
|
||||
SET @ENTRY := 139970;
|
||||
SET @PATHOFFSET := 1;
|
||||
SET @PATH := @ENTRY * 100 + @PATHOFFSET;
|
||||
DELETE FROM `waypoint_path` WHERE `PathId`= @PATH;
|
||||
INSERT INTO `waypoint_path` (`PathId`, `MoveType`, `Flags`, `Velocity`, `Comment`) VALUES
|
||||
(@PATH, 1, 0x0, NULL, 'Brother Pike/Rexxar - Lord Stormsong outro path');
|
||||
|
||||
DELETE FROM `waypoint_path_node` WHERE `PathId`= @PATH;
|
||||
INSERT INTO `waypoint_path_node` (`PathId`, `NodeId`, `PositionX`, `PositionY`, `PositionZ`, `Orientation`, `Delay`) VALUES
|
||||
(@PATH, 0, 3546.2266, -1492.658, 153.37653, NULL, 0),
|
||||
(@PATH, 1, 3542.8281, -1499.783, 154.04007, NULL, 0),
|
||||
(@PATH, 2, 3539.2778, -1512.4166, 153.60727, NULL, 0);
|
||||
|
||||
-- Conditions
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=274646;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 274646, 0, 0, 51, 0, 5, 139970, 0, '', 0, 0, 0, '', 'Spell \'Dark Binding\' can only hit \'Brother Pike\''),
|
||||
(13, 2, 274646, 0, 0, 51, 0, 5, 139970, 0, '', 0, 0, 0, '', 'Spell \'Dark Binding\' can only hit \'Brother Pike\''),
|
||||
(13, 1, 274646, 0, 1, 51, 0, 5, 139971, 0, '', 0, 0, 0, '', 'Spell \'Dark Binding\' can only hit \'Rexxar\''),
|
||||
(13, 2, 274646, 0, 1, 51, 0, 5, 139971, 0, '', 0, 0, 0, '', 'Spell \'Dark Binding\' can only hit \'Rexxar\'');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=269242;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 269242, 0, 0, 51, 0, 5, 134060, 0, '', 0, 0, 0, '', 'Spell \'Surrender to the Void\' can only hit \'Lord Stormsong\'');
|
||||
@@ -4968,7 +4968,7 @@ void SpellMgr::LoadSpellInfoCorrections()
|
||||
});
|
||||
|
||||
// Conversation
|
||||
ApplySpellFix({ 274668, 274669 }, [](SpellInfo* spellInfo)
|
||||
ApplySpellFix({ 274668, 274669, 274622, 274640, 274641, 274674, 274675 }, [](SpellInfo* spellInfo)
|
||||
{
|
||||
ApplySpellEffectFix(spellInfo, EFFECT_0, [](SpellEffectInfo* spellEffectInfo)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,645 @@
|
||||
/*
|
||||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaTrigger.h"
|
||||
#include "AreaTriggerAI.h"
|
||||
#include "Conversation.h"
|
||||
#include "ConversationAI.h"
|
||||
#include "Creature.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "MotionMaster.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "Vehicle.h"
|
||||
#include "shrine_of_the_storm.h"
|
||||
|
||||
enum LordStormsongSpells
|
||||
{
|
||||
SPELL_ANCIENT_MINDBENDER = 269131,
|
||||
SPELL_CONVERSATION = 274622,
|
||||
SPELL_CONVERSATION_ALLIANCE_INTRO = 274640,
|
||||
SPELL_CONVERSATION_ALLIANCE_OUTRO = 274674,
|
||||
SPELL_CONVERSATION_HORDE_INTRO = 274641,
|
||||
SPELL_CONVERSATION_HORDE_OUTRO = 274675,
|
||||
SPELL_DARK_BINDING = 274646,
|
||||
SPELL_DISCIPLE_OF_THE_VOL_ZITH = 269289,
|
||||
SPELL_ENERGIZE = 269396, // Serverside
|
||||
SPELL_EXPLOSIVE_VOID = 269104,
|
||||
SPELL_FIXATE = 269103,
|
||||
SPELL_MIND_REND = 268896,
|
||||
SPELL_RELEASE_VOID = 274711,
|
||||
SPELL_RIDE_VEHICLE = 46598,
|
||||
SPELL_SURRENDER_TO_THE_VOID = 269242,
|
||||
SPELL_VOID_BOLT = 268347,
|
||||
SPELL_WAKEN_THE_VOID_AREATRIGGER = 269094,
|
||||
SPELL_WAKEN_THE_VOID_SUMMON = 269095,
|
||||
SPELL_WAKEN_THE_VOID_AREA = 269097
|
||||
};
|
||||
|
||||
enum LordStormsongEvents
|
||||
{
|
||||
EVENT_VOID_BOLT = 1,
|
||||
EVENT_MIND_REND,
|
||||
EVENT_WAKEN_THE_VOID,
|
||||
EVENT_CHECK_POWER,
|
||||
|
||||
EVENT_OUTRO
|
||||
};
|
||||
|
||||
enum LordStormsongTexts
|
||||
{
|
||||
SAY_MINDBENDER_WARNING = 0
|
||||
};
|
||||
|
||||
enum LordStormsongActions
|
||||
{
|
||||
ACTION_START_INTRO = 1,
|
||||
ACTION_START_OUTRO
|
||||
};
|
||||
|
||||
enum LordStormsongMisc
|
||||
{
|
||||
DISPLAY_POWERID = 425,
|
||||
|
||||
NPC_QUEEN_AZSHARA = 139963,
|
||||
NPC_ANCIENT_MINDBENDER = 137051,
|
||||
NPC_WATER_STALKER = 82347,
|
||||
|
||||
CONVO_ACTOR_BROTHER_PIKE = 65078,
|
||||
CONVO_ACTOR_REXXAR = 65085,
|
||||
|
||||
PATH_INTRO = 13997000,
|
||||
PATH_OUTRO = 13997001,
|
||||
|
||||
WAYPOINT_BOSS_INTRO = 11,
|
||||
WAYPOINT_BOSS_OUTRO = 2
|
||||
};
|
||||
|
||||
constexpr Position IntroPosition = { 3608.3933f, -1379.824f, 160.573f, 4.370550f };
|
||||
|
||||
// 134060 - Lord Stormsong
|
||||
struct boss_lord_stormsong : public BossAI
|
||||
{
|
||||
boss_lord_stormsong(Creature* creature) : BossAI(creature, DATA_LORD_STORMSONG) { }
|
||||
|
||||
void JustAppeared() override
|
||||
{
|
||||
me->SetPowerType(POWER_ENERGY);
|
||||
me->SetPower(POWER_ENERGY, 55); // Energy bar is bugged on retail, but its working fine
|
||||
me->SetOverrideDisplayPowerId(DISPLAY_POWERID); // No aura handle
|
||||
|
||||
if (instance->GetData(DATA_LORD_STORMSONG_INTRO) == DONE)
|
||||
me->SetImmuneToPC(false);
|
||||
}
|
||||
|
||||
void DespawnMindbenders()
|
||||
{
|
||||
std::list<Creature*> mindbenders;
|
||||
me->GetCreatureListWithOptionsInGrid(mindbenders, 200.0f, { .CreatureId = NPC_ANCIENT_MINDBENDER });
|
||||
for (Creature* mindbender : mindbenders)
|
||||
mindbender->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
instance->SetBossState(DATA_LORD_STORMSONG, FAIL);
|
||||
|
||||
_EnterEvadeMode();
|
||||
_DespawnAtEvade();
|
||||
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_ANCIENT_MINDBENDER);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DISCIPLE_OF_THE_VOL_ZITH);
|
||||
DespawnMindbenders();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_ENGAGE, me, 1);
|
||||
instance->SetBossState(DATA_LORD_STORMSONG, IN_PROGRESS);
|
||||
|
||||
DoCastSelf(SPELL_ENERGIZE);
|
||||
|
||||
events.ScheduleEvent(EVENT_VOID_BOLT, 8500ms);
|
||||
events.ScheduleEvent(EVENT_WAKEN_THE_VOID, 13500ms);
|
||||
events.ScheduleEvent(EVENT_CHECK_POWER, 500ms);
|
||||
|
||||
if (IsHeroicOrHigher())
|
||||
events.ScheduleEvent(EVENT_MIND_REND, 16s);
|
||||
}
|
||||
|
||||
void DoAction(int32 actionId) override
|
||||
{
|
||||
switch (actionId)
|
||||
{
|
||||
case ACTION_START_INTRO:
|
||||
{
|
||||
DoCastSelf(SPELL_CONVERSATION);
|
||||
me->SetEmoteState(EMOTE_ONESHOT_NONE);
|
||||
me->GetMap()->SummonCreature(instance->instance->GetTeamInInstance() == HORDE ? NPC_LORD_STORMSONG_REXXAR : NPC_LORD_STORMSONG_BROTHER_PIKE, IntroPosition);
|
||||
|
||||
scheduler.Schedule(11s, [this](TaskContext task)
|
||||
{
|
||||
me->SetFacingTo(1.047197f);
|
||||
me->SetOrientation(me->GetOrientation());
|
||||
Creature* azshara = me->FindNearestCreature(NPC_QUEEN_AZSHARA, 50.0f);
|
||||
if (!azshara)
|
||||
return;
|
||||
|
||||
azshara->DespawnOrUnsummon();
|
||||
|
||||
task.Schedule(16s, [this](TaskContext task)
|
||||
{
|
||||
DoCastSelf(SPELL_DARK_BINDING);
|
||||
|
||||
task.Schedule(6s, [this](TaskContext)
|
||||
{
|
||||
me->SetImmuneToPC(false);
|
||||
me->SetEmoteState(EMOTE_STATE_READY1H);
|
||||
instance->SetData(DATA_LORD_STORMSONG_INTRO, DONE);
|
||||
});
|
||||
});
|
||||
});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHitTarget(WorldObject* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (!target->IsPlayer())
|
||||
return;
|
||||
|
||||
if (spellInfo->Id == SPELL_ANCIENT_MINDBENDER)
|
||||
Talk(SAY_MINDBENDER_WARNING, target);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
instance->SendEncounterUnit(ENCOUNTER_FRAME_DISENGAGE, me);
|
||||
instance->SetBossState(DATA_LORD_STORMSONG, DONE);
|
||||
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_ANCIENT_MINDBENDER);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_DISCIPLE_OF_THE_VOL_ZITH);
|
||||
|
||||
DespawnMindbenders();
|
||||
|
||||
Creature* pikeOrRexxar = me->GetInstanceScript()->GetCreature(instance->instance->GetTeamInInstance() == HORDE ? DATA_LORD_STORMSONG_REXXAR : DATA_LORD_STORMSONG_BROTHER_PIKE);
|
||||
if (!pikeOrRexxar)
|
||||
return;
|
||||
|
||||
pikeOrRexxar->AI()->DoAction(ACTION_START_OUTRO);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
scheduler.Update(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_VOID_BOLT:
|
||||
{
|
||||
DoCastVictim(SPELL_VOID_BOLT);
|
||||
events.Repeat(8500ms);
|
||||
break;
|
||||
}
|
||||
case EVENT_MIND_REND:
|
||||
{
|
||||
DoCastSelf(SPELL_MIND_REND);
|
||||
events.Repeat(10500ms);
|
||||
break;
|
||||
}
|
||||
case EVENT_WAKEN_THE_VOID:
|
||||
{
|
||||
DoCastSelf(SPELL_WAKEN_THE_VOID_AREA);
|
||||
events.Repeat(43500ms);
|
||||
break;
|
||||
}
|
||||
case EVENT_CHECK_POWER:
|
||||
{
|
||||
if (me->GetPower(POWER_ENERGY) >= 100)
|
||||
{
|
||||
DoCast(SPELL_ANCIENT_MINDBENDER);
|
||||
events.RescheduleEvent(EVENT_CHECK_POWER, 2s);
|
||||
}
|
||||
events.Repeat(500ms);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// 137051 - Ancient Mindbender
|
||||
struct boss_lord_stormsong_ancient_mindbender : public ScriptedAI
|
||||
{
|
||||
boss_lord_stormsong_ancient_mindbender(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void JustAppeared() override
|
||||
{
|
||||
TempSummon* tempSummon = me->ToTempSummon();
|
||||
if (!tempSummon)
|
||||
return;
|
||||
|
||||
tempSummon->CastSpell(tempSummon->GetSummoner(), SPELL_RIDE_VEHICLE, TRIGGERED_FULL_MASK);
|
||||
}
|
||||
};
|
||||
|
||||
// 139971 - Rexxar
|
||||
// 139970 - Brother Pike
|
||||
template<uint32 ConvoIntroSpellId, uint32 ConvoOutroSpellId>
|
||||
struct boss_lord_stormsong_intro_npc : public ScriptedAI
|
||||
{
|
||||
boss_lord_stormsong_intro_npc(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void JustAppeared() override
|
||||
{
|
||||
me->GetMotionMaster()->MovePath(PATH_INTRO, false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId, uint32 pathId) override
|
||||
{
|
||||
if (pathId == PATH_INTRO)
|
||||
{
|
||||
if (waypointId == WAYPOINT_BOSS_INTRO)
|
||||
DoCastSelf(ConvoIntroSpellId);
|
||||
}
|
||||
else if (pathId == PATH_OUTRO)
|
||||
{
|
||||
if (waypointId == WAYPOINT_BOSS_OUTRO)
|
||||
DoCastSelf(ConvoOutroSpellId);
|
||||
}
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action != ACTION_START_OUTRO)
|
||||
return;
|
||||
|
||||
Creature* stalker = me->FindNearestCreature(NPC_WATER_STALKER, 100.0f);
|
||||
if (!stalker)
|
||||
return;
|
||||
|
||||
stalker->CastSpell(stalker, SPELL_RELEASE_VOID, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
|
||||
_events.ScheduleEvent(EVENT_OUTRO, 2s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (_events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_OUTRO:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_DARK_BINDING);
|
||||
me->GetMotionMaster()->MovePath(PATH_OUTRO, false);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
// 269396 - Lord Stormsong Gain Energy (SERVERSIDE)
|
||||
class spell_lord_stormsong_energize : public AuraScript
|
||||
{
|
||||
static constexpr std::array<uint8, 2> LordStormsongEnergizeCycle = { 2, 3 };
|
||||
|
||||
void PeriodicTick(AuraEffect const* aurEff) const
|
||||
{
|
||||
uint8 cycleIdx = aurEff->GetTickNumber() % LordStormsongEnergizeCycle.size();
|
||||
GetTarget()->ModifyPower(POWER_ENERGY, LordStormsongEnergizeCycle[cycleIdx]);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_lord_stormsong_energize::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 269021 - Waken the Void
|
||||
class spell_lord_stormsong_waken_the_void_missile : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WAKEN_THE_VOID_AREATRIGGER, SPELL_FIXATE });
|
||||
}
|
||||
|
||||
void HandleHitTarget(SpellEffIndex /*effIndex*/) const
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
caster->CastSpell(GetHitUnit(), SPELL_WAKEN_THE_VOID_AREATRIGGER, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
caster->CastSpell(caster, SPELL_FIXATE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_lord_stormsong_waken_the_void_missile::HandleHitTarget, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 269103 - Fixate
|
||||
class spell_lord_stormsong_fixate : public SpellScript
|
||||
{
|
||||
void HandleFixate(SpellEffIndex /*effIndex*/) const
|
||||
{
|
||||
Creature* caster = GetCaster()->ToCreature();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
caster->GetMotionMaster()->MoveFollow(GetHitUnit(), 0.0f);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_lord_stormsong_fixate::HandleFixate, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_lord_stormsong_fixate_aura : public AuraScript
|
||||
{
|
||||
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
|
||||
{
|
||||
Creature* caster = GetCaster()->ToCreature();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
caster->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_lord_stormsong_fixate_aura::AfterRemove, EFFECT_0, SPELL_AURA_MOD_FIXATE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 269131 - Ancient Mindbender
|
||||
class spell_lord_stormsong_ancient_mindbender : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_SURRENDER_TO_THE_VOID });
|
||||
}
|
||||
|
||||
void HandleHit(SpellEffIndex /*effIndex*/) const
|
||||
{
|
||||
Unit* target = GetHitUnit();
|
||||
target->SummonCreature(NPC_ANCIENT_MINDBENDER, target->GetPosition(), TEMPSUMMON_MANUAL_DESPAWN);
|
||||
target->CastSpell(target, SPELL_SURRENDER_TO_THE_VOID, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_lord_stormsong_ancient_mindbender::HandleHit, EFFECT_11, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_lord_stormsong_ancient_mindbender_aura : public AuraScript
|
||||
{
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) const
|
||||
{
|
||||
Vehicle* playerVehicle = GetTarget()->GetVehicleKit();
|
||||
if (!playerVehicle)
|
||||
return;
|
||||
|
||||
Unit* ancientMindbender = playerVehicle->GetPassenger(0);
|
||||
if (!ancientMindbender)
|
||||
return;
|
||||
|
||||
Creature* mindbender = ancientMindbender->ToCreature();
|
||||
if (!mindbender)
|
||||
return;
|
||||
|
||||
mindbender->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_lord_stormsong_ancient_mindbender_aura::OnRemove, EFFECT_2, SPELL_AURA_SET_VEHICLE_ID, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 269242 - Surrender to the Void
|
||||
class spell_lord_stormsong_surrender_to_the_void : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /* effIndex */) const
|
||||
{
|
||||
GetHitUnit()->m_Events.AddEvent([hitUnit = GetHitUnit(), casterGUID = GetCaster()->GetGUID(), spellId = GetEffectValue()]()
|
||||
{
|
||||
if (Unit* caster = ObjectAccessor::GetUnit(*hitUnit, casterGUID))
|
||||
hitUnit->CastSpell(caster, uint32(spellId), TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
}, 0ms);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_lord_stormsong_surrender_to_the_void::HandleDummy, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
// 269289 - Disciple of the Vol'zith
|
||||
class spell_lord_stormsong_disciple_of_the_vol_zith : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
|
||||
}
|
||||
|
||||
void HandlePeriodic(AuraEffect const* /*aurEff*/) const
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, GetEffectInfo(EFFECT_0).CalcValue(), TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_lord_stormsong_disciple_of_the_vol_zith::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 274711 - Release Void
|
||||
class spell_lord_stormsong_release_void : public AuraScript
|
||||
{
|
||||
void OnRemove(AuraEffect const* /*auraEffect*/, AuraEffectHandleModes /*mode*/) const
|
||||
{
|
||||
if (Creature* creatureCaster = GetCaster()->ToCreature())
|
||||
creatureCaster->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectRemove += AuraEffectRemoveFn(spell_lord_stormsong_release_void::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
// 274710 - Release Void
|
||||
class spell_lord_stormsong_release_void_missile : public SpellScript
|
||||
{
|
||||
void ModDestHeight(SpellDestination& dest) const
|
||||
{
|
||||
Position const offset = { 0.0f, 0.0f, 20.0f, 0.0f };
|
||||
dest.RelocateOffset(offset);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_lord_stormsong_release_void_missile::ModDestHeight, EFFECT_1, TARGET_DEST_DEST_RANDOM);
|
||||
}
|
||||
};
|
||||
|
||||
// 269094 - Waken the Void
|
||||
struct at_lord_stormsong_waken_the_void : AreaTriggerAI
|
||||
{
|
||||
using AreaTriggerAI::AreaTriggerAI;
|
||||
|
||||
void OnUnitEnter(Unit* unit) override
|
||||
{
|
||||
if (!unit->IsPlayer())
|
||||
return;
|
||||
|
||||
Unit* caster = at->GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
caster->CastSpell(unit, SPELL_EXPLOSIVE_VOID, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
unit->RemoveAurasDueToSpell(SPELL_FIXATE);
|
||||
at->Remove();
|
||||
}
|
||||
};
|
||||
|
||||
// Id - XXX
|
||||
struct at_lord_stormsong_intro : AreaTriggerAI
|
||||
{
|
||||
at_lord_stormsong_intro(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) { }
|
||||
|
||||
void OnUnitEnter(Unit* unit) override
|
||||
{
|
||||
Player* player = unit->ToPlayer();
|
||||
if (!player || player->IsGameMaster())
|
||||
return;
|
||||
|
||||
InstanceScript* instance = at->GetInstanceScript();
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Creature* lordStormsong = instance->GetCreature(DATA_LORD_STORMSONG))
|
||||
lordStormsong->AI()->DoAction(ACTION_START_INTRO);
|
||||
|
||||
at->Remove();
|
||||
}
|
||||
};
|
||||
|
||||
// 274640 - Conversation
|
||||
// 274674 - Conversation
|
||||
class conversation_lord_stormsong_brother_pike_intro_outro : public ConversationAI
|
||||
{
|
||||
public:
|
||||
conversation_lord_stormsong_brother_pike_intro_outro(Conversation* conversation) : ConversationAI(conversation) { }
|
||||
|
||||
void OnCreate(Unit* creator) override
|
||||
{
|
||||
conversation->AddActor(CONVO_ACTOR_BROTHER_PIKE, 0, creator->GetGUID());
|
||||
}
|
||||
};
|
||||
|
||||
// 274641 - Conversation
|
||||
class conversation_lord_stormsong_rexxar_intro : public ConversationAI
|
||||
{
|
||||
public:
|
||||
conversation_lord_stormsong_rexxar_intro(Conversation* conversation) : ConversationAI(conversation) { }
|
||||
|
||||
void OnCreate(Unit* creator) override
|
||||
{
|
||||
conversation->AddActor(CONVO_ACTOR_REXXAR, 1, creator->GetGUID());
|
||||
}
|
||||
};
|
||||
|
||||
// 274675 - Conversation
|
||||
class conversation_lord_stormsong_rexxar_outro : public ConversationAI
|
||||
{
|
||||
public:
|
||||
conversation_lord_stormsong_rexxar_outro(Conversation* conversation) : ConversationAI(conversation) { }
|
||||
|
||||
void OnCreate(Unit* creator) override
|
||||
{
|
||||
conversation->AddActor(CONVO_ACTOR_REXXAR, 0, creator->GetGUID());
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_lord_stormsong()
|
||||
{
|
||||
RegisterShrineOfTheStormCreatureAI(boss_lord_stormsong);
|
||||
RegisterShrineOfTheStormCreatureAI(boss_lord_stormsong_ancient_mindbender);
|
||||
new GenericCreatureScript<boss_lord_stormsong_intro_npc<SPELL_CONVERSATION_HORDE_INTRO, SPELL_CONVERSATION_HORDE_OUTRO>>("boss_lord_stormsong_rexxar");
|
||||
new GenericCreatureScript<boss_lord_stormsong_intro_npc<SPELL_CONVERSATION_ALLIANCE_INTRO, SPELL_CONVERSATION_ALLIANCE_OUTRO>>("boss_lord_stormsong_brother_pike");
|
||||
|
||||
RegisterSpellScript(spell_lord_stormsong_energize);
|
||||
RegisterSpellScript(spell_lord_stormsong_waken_the_void_missile);
|
||||
RegisterSpellAndAuraScriptPair(spell_lord_stormsong_fixate, spell_lord_stormsong_fixate_aura);
|
||||
RegisterSpellAndAuraScriptPair(spell_lord_stormsong_ancient_mindbender, spell_lord_stormsong_ancient_mindbender_aura);
|
||||
RegisterSpellScript(spell_lord_stormsong_surrender_to_the_void);
|
||||
RegisterSpellScript(spell_lord_stormsong_disciple_of_the_vol_zith);
|
||||
RegisterSpellScript(spell_lord_stormsong_release_void);
|
||||
RegisterSpellScript(spell_lord_stormsong_release_void_missile);
|
||||
|
||||
RegisterAreaTriggerAI(at_lord_stormsong_waken_the_void);
|
||||
|
||||
RegisterAreaTriggerAI(at_lord_stormsong_intro);
|
||||
|
||||
RegisterConversationAI(conversation_lord_stormsong_brother_pike_intro_outro);
|
||||
RegisterConversationAI(conversation_lord_stormsong_rexxar_intro);
|
||||
RegisterConversationAI(conversation_lord_stormsong_rexxar_outro);
|
||||
}
|
||||
@@ -23,17 +23,20 @@
|
||||
static BossBoundaryData const boundaries =
|
||||
{
|
||||
{ DATA_AQUSIRR, new ZRangeBoundary(119.89f, 132.9f) },
|
||||
{ DATA_TIDESAGE_COUNCIL, new CircleBoundary({ 3939.6357f, -1007.4829f, 109.2227f }, 60.0f)}
|
||||
{ DATA_TIDESAGE_COUNCIL, new CircleBoundary({ 3939.6357f, -1007.4829f, 109.2227f }, 60.0f) },
|
||||
{ DATA_LORD_STORMSONG, new ZRangeBoundary(146.85f, 157.03f) }
|
||||
};
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ BOSS_AQUSIRR, DATA_AQUSIRR },
|
||||
{ BOSS_BROTHER_IRONHULL, DATA_BROTHER_IRONHULL },
|
||||
{ BOSS_GALECALLER_FAYE, DATA_GALECALLER_FAYE },
|
||||
{ BOSS_LORD_STORMSONG, DATA_LORD_STORMSONG },
|
||||
{ BOSS_VOLZITH_THE_WHISPERER, DATA_VOLZITH_THE_WHISPERER },
|
||||
{ 0, 0 } // END
|
||||
{ BOSS_AQUSIRR, DATA_AQUSIRR },
|
||||
{ BOSS_BROTHER_IRONHULL, DATA_BROTHER_IRONHULL },
|
||||
{ BOSS_GALECALLER_FAYE, DATA_GALECALLER_FAYE },
|
||||
{ BOSS_LORD_STORMSONG, DATA_LORD_STORMSONG },
|
||||
{ BOSS_VOLZITH_THE_WHISPERER, DATA_VOLZITH_THE_WHISPERER },
|
||||
{ NPC_LORD_STORMSONG_BROTHER_PIKE, DATA_LORD_STORMSONG_BROTHER_PIKE },
|
||||
{ NPC_LORD_STORMSONG_REXXAR, DATA_LORD_STORMSONG_REXXAR },
|
||||
{ 0, 0 } // END
|
||||
};
|
||||
|
||||
DungeonEncounterData const encounters[] =
|
||||
@@ -58,7 +61,36 @@ public:
|
||||
LoadBossBoundaries(boundaries);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
LoadDungeonEncounterData(encounters);
|
||||
|
||||
_lordStormsongIntroState = NOT_STARTED;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 dataId) const override
|
||||
{
|
||||
switch (dataId)
|
||||
{
|
||||
case DATA_LORD_STORMSONG_INTRO:
|
||||
return _lordStormsongIntroState;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 dataId, uint32 value) override
|
||||
{
|
||||
switch (dataId)
|
||||
{
|
||||
case DATA_LORD_STORMSONG_INTRO:
|
||||
_lordStormsongIntroState = value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _lordStormsongIntroState;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -34,7 +34,11 @@ enum ShrineOfTheStormDataTypes
|
||||
DATA_VOLZITH_THE_WHISPERER = 3,
|
||||
|
||||
DATA_BROTHER_IRONHULL,
|
||||
DATA_GALECALLER_FAYE
|
||||
DATA_GALECALLER_FAYE,
|
||||
|
||||
DATA_LORD_STORMSONG_INTRO,
|
||||
DATA_LORD_STORMSONG_BROTHER_PIKE,
|
||||
DATA_LORD_STORMSONG_REXXAR
|
||||
};
|
||||
|
||||
enum ShrineOfTheStormCreatureIds
|
||||
@@ -50,6 +54,9 @@ enum ShrineOfTheStormCreatureIds
|
||||
NPC_SHRINE_OF_THE_STORM_DUMMY = 139986,
|
||||
NPC_GRASPING_TENTACLE = 134612,
|
||||
NPC_AQUALING = 134828,
|
||||
|
||||
NPC_LORD_STORMSONG_BROTHER_PIKE = 139970,
|
||||
NPC_LORD_STORMSONG_REXXAR = 139971
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
|
||||
@@ -28,6 +28,7 @@ void AddSC_drustvar_chapter_3_an_airtight_alibi();
|
||||
// Shrine of the Storm
|
||||
void AddSC_boss_aqusirr();
|
||||
void AddSC_boss_tidesage_council();
|
||||
void AddSC_boss_lord_stormsong();
|
||||
void AddSC_instance_shrine_of_the_storm();
|
||||
|
||||
// Waycrest Manor
|
||||
@@ -52,6 +53,7 @@ void AddKulTirasScripts()
|
||||
// Shrine of the Storm
|
||||
AddSC_boss_aqusirr();
|
||||
AddSC_boss_tidesage_council();
|
||||
AddSC_boss_lord_stormsong();
|
||||
AddSC_instance_shrine_of_the_storm();
|
||||
|
||||
// Waycrest Manor
|
||||
|
||||
Reference in New Issue
Block a user