Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-06-29 21:57:41 +08:00
29 changed files with 962 additions and 984 deletions

View File

@@ -0,0 +1,25 @@
-- DB update 2024_06_28_01 -> 2024_06_28_02
UPDATE `smart_scripts` SET `link` = 2 WHERE `entryorguid` IN (188049, 188130, 188134, 188135, 188137, 188138, 188139, 188143, 188144, 188145, 188146, 188147, 188148, 188149, 188150, 188151, 188152, 188153, 188154) AND `id` = 1 AND `event_type` = 62;
DELETE FROM `smart_scripts` WHERE `id` = 2 AND `entryorguid` IN (188049, 188130, 188134, 188135, 188137, 188138, 188139, 188143, 188144, 188145, 188146, 188147, 188148, 188149, 188150, 188151, 188152, 188153, 188154) AND `event_type` = 61;
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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(188049, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188130, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188134, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188135, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188137, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188138, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188139, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188143, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188144, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188145, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188146, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188147, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188148, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188149, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188150, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188151, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188152, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188153, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant'),
(188154, 1, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Ice Stone - On Gossip Option 0 Selected - Despawn Instant');
UPDATE `gameobject` SET `spawntimesecs` = 30 WHERE `id` IN (188049, 188130, 188134, 188135, 188137, 188138, 188139, 188143, 188144, 188145, 188146, 188147, 188148, 188149, 188150, 188151, 188152, 188153, 188154);

View File

@@ -0,0 +1,6 @@
-- DB update 2024_06_28_02 -> 2024_06_28_03
UPDATE `creature_model_info` SET `BoundingRadius` = 1, `CombatReach` = 11 WHERE `DisplayID` = 23344;
UPDATE `creature_model_info` SET `BoundingRadius` = 0.694444000720977783 WHERE `DisplayID` = 20990;
UPDATE `creature_model_info` SET `BoundingRadius` = 0.620000004768371582, `CombatReach` = 3 WHERE `DisplayID` = 20433;
UPDATE `creature_model_info` SET `BoundingRadius` = 0.305559992790222167 WHERE `DisplayID` = 23504;
UPDATE `creature_model_info` SET `BoundingRadius` = 2 WHERE `DisplayID` = 23447;

View File

@@ -0,0 +1,10 @@
-- DB update 2024_06_28_03 -> 2024_06_28_04
DELETE FROM `creature` WHERE `guid` = 1554 AND `id1` = 25952;
INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `VerifiedBuild`) VALUES
(1554, 25952, 547, 3717, 3717, 3, 1, 0, -97.468841552734375, -231.198196411132812, -2.10892963409423828, 1.466076612472534179, 7200, 0, 0, 42, 0, 0, 0, 0, 0, 55141);
UPDATE `creature_template_movement` SET `Flight` = 1 WHERE `CreatureId` = 25952;
DELETE FROM `game_event_creature` WHERE `eventEntry` = 1 AND `guid` = 1554;
INSERT INTO `game_event_creature` (`eventEntry`, `guid`) VALUES
(1, 1554);

View File

@@ -0,0 +1,4 @@
-- DB update 2024_06_28_04 -> 2024_06_29_00
DELETE FROM `item_loot_template` WHERE `Entry` = 35512;
INSERT INTO `item_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
(35512, 17202, 0, 100, 0, 1, 0, 2, 5, 'Pocket Full of Snow - Snowball');

View File

@@ -0,0 +1,19 @@
-- DB update 2024_06_29_00 -> 2024_06_29_01
-- Worg Master Kruush, Ripp, Feng
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (19442,19458,19459));
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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(19442, 0, 0, 0, 0, 0, 100, 0, 5000, 5000, 8000, 8000, 0, 0, 11, 30478, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Worg Master Kruush - In Combat - Cast \'Hemorrhage\''),
(19442, 0, 1, 2, 2, 0, 100, 1, 0, 25, 0, 0, 0, 0, 11, 8599, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Worg Master Kruush - Between 0-25% Health - Cast \'Enrage\' (No Repeat)'),
(19442, 0, 2, 0, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Worg Master Kruush - Between 0-25% Health - Say Line 1 (No Repeat)'),
(19442, 0, 3, 4, 4, 0, 100, 1, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Worg Master Kruush - On Aggro - Store Targetlist (No Repeat)'),
(19442, 0, 4, 5, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Worg Master Kruush - On Aggro - Say Line 0 (No Repeat)'),
(19442, 0, 5, 6, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 9, 19458, 0, 30, 1, 0, 0, 0, 0, 'Worg Master Kruush - On Aggro - Send Target 1 (No Repeat)'),
(19442, 0, 6, 7, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 100, 1, 0, 0, 0, 0, 0, 9, 19459, 0, 30, 1, 0, 0, 0, 0, 'Worg Master Kruush - On Aggro - Send Target 1 (No Repeat)'),
(19442, 0, 7, 8, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 19458, 0, 30, 1, 0, 0, 0, 0, 'Worg Master Kruush - On Aggro - Set Data 1 1 (No Repeat)'),
(19442, 0, 8, 0, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 45, 1, 1, 0, 0, 0, 0, 9, 19459, 0, 30, 1, 0, 0, 0, 0, 'Worg Master Kruush - On Aggro - Set Data 1 1 (No Repeat)'),
(19442, 0, 9, 10, 6, 0, 100, 1, 0, 0, 0, 0, 0, 0, 45, 2, 1, 0, 0, 0, 0, 9, 19458, 0, 30, 1, 0, 0, 0, 0, 'Worg Master Kruush - On Just Died - Set Data 2 1 (No Repeat)'),
(19442, 0, 10, 0, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 45, 2, 1, 0, 0, 0, 0, 9, 19459, 0, 30, 1, 0, 0, 0, 0, 'Worg Master Kruush - On Just Died - Set Data 2 1 (No Repeat)'),
(19458, 0, 0, 0, 38, 0, 100, 0, 2, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Ripp - On Data Set 2 1 - Flee For Assist'),
(19458, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Ripp - On Data Set 1 1 - Start Attacking'),
(19459, 0, 0, 0, 38, 0, 100, 0, 2, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Feng - On Data Set 2 1 - Flee For Assist'),
(19459, 0, 1, 0, 38, 0, 100, 0, 1, 1, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 'Feng - On Data Set 1 1 - Start Attacking');

View File

@@ -0,0 +1,13 @@
-- DB update 2024_06_29_01 -> 2024_06_29_02
-- Horvon the Armorer, Greatfather Aldrimus
DELETE FROM `creature_template_addon` WHERE `entry` IN (19879,19698);
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `visibilityDistanceType`, `auras`) VALUES
(19879, 0, 0, 0, 1, 0, 0, '32648'),
(19698, 0, 0, 8, 1, 0, 0, '32648');
UPDATE `creature_template` SET `ScriptName` = '' WHERE (`entry` = 19698);
DELETE FROM `spell_area` WHERE `spell`=32649 AND `area`=3688;
INSERT INTO `spell_area` (`spell`, `area`, `quest_start`, `quest_end`, `aura_spell`, `racemask`, `gender`, `autocast`, `quest_start_status`, `quest_end_status`) VALUES
(32649, 3688, 10045, 0, 0, 0, 2, 1, 64, 11),
(32649, 3688, 10252, 0, 0, 0, 2, 1, 64, 11);

View File

@@ -0,0 +1,12 @@
-- DB update 2024_06_29_02 -> 2024_06_29_03
--
UPDATE `spell_script_names` SET `ScriptName`='spell_kiljaeden_shadow_spike_aura' WHERE `spell_id`=46680;
UPDATE `spell_script_names` SET `ScriptName`='spell_kiljaeden_darkness_aura' WHERE `spell_id`=46605;
UPDATE `spell_script_names` SET `ScriptName`='spell_kiljaeden_vengeance_of_the_blue_flight_aura' WHERE `spell_id`=45839;
UPDATE `spell_script_names` SET `ScriptName`='spell_kiljaeden_armageddon_periodic_aura' WHERE `spell_id`=45921;
UPDATE `spell_script_names` SET `ScriptName`='spell_muru_summon_blood_elves_periodic_aura' WHERE `spell_id`=46041;
UPDATE `spell_script_names` SET `ScriptName`='spell_muru_darkness_aura' WHERE `spell_id`=45996;
UPDATE `spell_script_names` SET `ScriptName`='spell_entropius_void_zone_visual_aura' WHERE `spell_id`=46265;
UPDATE `spell_script_names` SET `ScriptName`='spell_kalecgos_curse_of_boundless_agony_aura' WHERE `spell_id`=45032;
UPDATE `spell_script_names` SET `ScriptName`='spell_kalecgos_spectral_realm_aura' WHERE `spell_id`=46021;
UPDATE `spell_script_names` SET `ScriptName`='spell_felmyst_fog_of_corruption_charm_aura' WHERE `spell_id`=45717;

View File

@@ -0,0 +1,20 @@
-- DB update 2024_06_29_03 -> 2024_06_29_04
-- Eclipsion Spellbinder
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 35190);
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
(13, 1, 35190, 0, 0, 31, 0, 3, 20431, 0, 0, 0, 0, '', 'Eclipsion Spellbinder\'s Crystal Channel implicit target Eclipse Point - Bloodcrystal Spell Orgin');
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` IN (22017,22022));
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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(22017, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2400, 3800, 0, 0, 11, 34446, 64, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 'Eclipsion Spellbinder - In Combat - Cast \'Arcane Missiles\''),
(22017, 0, 1, 0, 0, 0, 100, 0, 8000, 12000, 18000, 24000, 0, 0, 11, 18972, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Eclipsion Spellbinder - In Combat - Cast \'Slow\''),
(22017, 0, 2, 0, 2, 0, 100, 0, 0, 40, 0, 0, 0, 0, 11, 38171, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eclipsion Spellbinder - Between 0-40% Health - Cast \'Summon Arcane Bursts\''),
(22017, 0, 3, 0, 2, 0, 100, 0, 0, 15, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Eclipsion Spellbinder - Between 0-15% Health - Flee For Assist'),
(22017, 0, 4, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 35190, 0, 0, 0, 0, 0, 19, 20431, 20, 0, 0, 0, 0, 0, 0, 'Eclipsion Spellbinder - On Reset - Cast \'Crystal Channel\''),
(22022, 0, 0, 0, 0, 0, 100, 0, 3000, 6000, 6000, 12000, 0, 0, 11, 34517, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Arcane Burst - In Combat - Cast \'Arcane Explosion\''),
(22022, 0, 1, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 21, 30, 0, 0, 0, 0, 0, 0, 0, 'Arcane Burst - On Just Summoned - Start Attacking');
DELETE FROM `creature` WHERE (`id1` = 20431 AND `guid` IN (73519,73520));
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
(73519, 20431, 0, 0, 530, 0, 0, 1, 1, 0, -4151.47, 1285.95, 66.784, 5.89921, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL),
(73520, 20431, 0, 0, 530, 0, 0, 1, 1, 0, -4280.86, 1311.67, 66.6485, 0.733038, 300, 0, 0, 42, 0, 0, 0, 0, 0, '', 0, 0, NULL);

View File

@@ -0,0 +1,69 @@
-- DB update 2024_06_29_04 -> 2024_06_29_05
-- Tideress
UPDATE `creature` SET position_x = 1958.41, position_y = -945.92, position_z = 70.11, orientation = 4.153880, MovementType = 2 WHERE `id1` = 12759 AND `guid` = 34224;
UPDATE `creature_addon` SET `path_id` = 342240 WHERE `guid` = 34224;
DELETE FROM `waypoint_data` WHERE `id` = 342240;
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`, `action`, `action_chance`, `wpguid`) VALUES
(342240, 1, 1950.76, -957.199, 65.9789, 100, 0, 0, 0, 100, 0),
(342240, 2, 1949.7, -971.117, 62.4051, 100, 0, 0, 0, 100, 0),
(342240, 3, 1952.04, -984.871, 63.578, 100, 0, 0, 0, 100, 0),
(342240, 4, 1958.59, -995.102, 69.6525, 100, 0, 0, 0, 100, 0),
(342240, 5, 1958.25, -1010.11, 77.985, 100, 0, 0, 0, 100, 0),
(342240, 6, 1965.77, -1023.12, 88.7347, 100, 0, 0, 0, 100, 0),
(342240, 7, 1968.2, -1033.66, 93.133, 100, 0, 0, 0, 100, 0),
(342240, 8, 1966.17, -1043.44, 94.9841, 100, 0, 0, 0, 100, 0),
(342240, 9, 1973.94, -1049.95, 95.6832, 100, 0, 0, 0, 100, 0),
(342240, 10, 1986.89, -1056.69, 96.4432, 100, 0, 0, 0, 100, 0),
(342240, 11, 1995.48, -1071.04, 94.9886, 100, 0, 0, 0, 100, 0),
(342240, 12, 1997.02, -1086.65, 94.846, 100, 0, 0, 0, 100, 0),
(342240, 13, 2001.35, -1109.18, 95.674, 100, 0, 0, 0, 100, 0),
(342240, 14, 1992.91, -1089.13, 94.9791, 100, 0, 0, 0, 100, 0),
(342240, 15, 1977.37, -1091.98, 93.5929, 100, 0, 0, 0, 100, 0),
(342240, 16, 1960.89, -1106.05, 81.5004, 100, 0, 0, 0, 100, 0),
(342240, 17, 1950.73, -1121.58, 76.5911, 100, 0, 0, 0, 100, 0),
(342240, 18, 1952.45, -1137.8, 74.7081, 100, 0, 0, 0, 100, 0),
(342240, 19, 1951.68, -1152.21, 74.7775, 100, 0, 0, 0, 100, 0),
(342240, 20, 1959.66, -1179.49, 63.8513, 100, 0, 0, 0, 100, 0),
(342240, 21, 1967.89, -1196.3, 59.4363, 100, 0, 0, 0, 100, 0),
(342240, 22, 1966.14, -1211.91, 57.2217, 100, 0, 0, 0, 100, 0),
(342240, 23, 1941.16, -1212.98, 56.7257, 100, 0, 0, 0, 100, 0),
(342240, 24, 1932.03, -1226.02, 59.3121, 100, 0, 0, 0, 100, 0),
(342240, 25, 1940.4, -1246.86, 58.4144, 100, 0, 0, 0, 100, 0),
(342240, 26, 1947.89, -1264.91, 60.367, 100, 0, 0, 0, 100, 0),
(342240, 27, 1949.59, -1283.22, 65.9393, 100, 0, 0, 0, 100, 0),
(342240, 28, 1941.54, -1297.67, 74.969, 100, 0, 0, 0, 100, 0),
(342240, 29, 1936.7, -1307.34, 80.0226, 100, 0, 0, 0, 100, 0),
(342240, 30, 1920.6, -1309.47, 82.8535, 100, 0, 0, 0, 100, 0),
(342240, 31, 1902.6, -1303.77, 86.9758, 100, 0, 0, 0, 100, 0),
(342240, 32, 1920.6, -1309.47, 82.8535, 100, 0, 0, 0, 100, 0),
(342240, 33, 1936.7, -1307.34, 80.0226, 100, 0, 0, 0, 100, 0),
(342240, 34, 1941.54, -1297.67, 74.969, 100, 0, 0, 0, 100, 0),
(342240, 35, 1949.59, -1283.22, 65.9393, 100, 0, 0, 0, 100, 0),
(342240, 36, 1947.89, -1264.91, 60.367, 100, 0, 0, 0, 100, 0),
(342240, 37, 1940.4, -1246.86, 58.4144, 100, 0, 0, 0, 100, 0),
(342240, 38, 1932.03, -1226.02, 59.3121, 100, 0, 0, 0, 100, 0),
(342240, 39, 1941.14, -1212.98, 56.7217, 100, 0, 0, 0, 100, 0),
(342240, 40, 1966.12, -1211.9, 57.2257, 100, 0, 0, 0, 100, 0),
(342240, 41, 1967.89, -1196.3, 59.4363, 100, 0, 0, 0, 100, 0),
(342240, 42, 1959.66, -1179.49, 63.8513, 100, 0, 0, 0, 100, 0),
(342240, 43, 1951.68, -1152.21, 74.7775, 100, 0, 0, 0, 100, 0),
(342240, 44, 1952.45, -1137.8, 74.7081, 100, 0, 0, 0, 100, 0),
(342240, 45, 1950.73, -1121.58, 76.5911, 100, 0, 0, 0, 100, 0),
(342240, 46, 1960.89, -1106.05, 81.5004, 100, 0, 0, 0, 100, 0),
(342240, 47, 1977.37, -1091.98, 93.5929, 100, 0, 0, 0, 100, 0),
(342240, 48, 1992.91, -1089.13, 94.9791, 100, 0, 0, 0, 100, 0),
(342240, 49, 2001.35, -1109.18, 95.674, 100, 0, 0, 0, 100, 0),
(342240, 50, 1997.02, -1086.65, 94.846, 100, 0, 0, 0, 100, 0),
(342240, 51, 1995.48, -1071.04, 94.9886, 100, 0, 0, 0, 100, 0),
(342240, 52, 1986.89, -1056.69, 96.4432, 100, 0, 0, 0, 100, 0),
(342240, 53, 1973.94, -1049.95, 95.6832, 100, 0, 0, 0, 100, 0),
(342240, 54, 1966.28, -1043.53, 94.9587, 100, 0, 0, 0, 100, 0),
(342240, 55, 1968.19, -1033.7, 93.1832, 100, 0, 0, 0, 100, 0),
(342240, 56, 1965.77, -1023.12, 88.7347, 100, 0, 0, 0, 100, 0),
(342240, 57, 1958.25, -1010.11, 77.985, 100, 0, 0, 0, 100, 0),
(342240, 58, 1958.59, -995.102, 69.6525, 100, 0, 0, 0, 100, 0),
(342240, 59, 1952.04, -984.871, 63.578, 100, 0, 0, 0, 100, 0),
(342240, 60, 1949.7, -971.117, 62.4051, 100, 0, 0, 0, 100, 0),
(342240, 61, 1950.76, -957.199, 65.9789, 100, 0, 0, 0, 100, 0),
(342240, 62, 1956.02, -946.128, 71.0499, 100, 0, 0, 0, 100, 0);

View File

@@ -0,0 +1,8 @@
-- DB update 2024_06_29_05 -> 2024_06_29_06
-- Shadowy Summoner
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 17088);
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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(17088, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 8722, 3, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowy Summoner - On Reset - Cast \'Summon Succubus\''),
(17088, 0, 1, 0, 0, 0, 100, 0, 6000, 15000, 21000, 35000, 0, 0, 11, 32940, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowy Summoner - In Combat - Cast \'Shadow Rush\''),
(17088, 0, 2, 0, 9, 0, 100, 0, 1500, 1500, 1500, 1500, 5, 30, 11, 13878, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowy Summoner - Within 5-30 Range - Cast \'Scorch\''),
(17088, 0, 3, 0, 9, 0, 100, 0, 5000, 10000, 5000, 10000, 0, 5, 11, 13878, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Shadowy Summoner - Within 0-5 Range - Cast \'Scorch\'');

View File

@@ -0,0 +1,14 @@
-- DB update 2024_06_29_06 -> 2024_06_29_07
-- Eye of Grillok
UPDATE `spell_dbc` SET `Effect_1` = 164,`EffectTriggerSpell_1` = 38495 WHERE (`ID` = 38529);
DELETE FROM `spell_script_names` WHERE `spell_id`=38554;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(38554, 'spell_item_eye_of_grillok');
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 17) AND (`SourceGroup` = 0) AND (`SourceEntry` = 38554);
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 22177);
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`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
(22177, 0, 0, 1, 8, 0, 100, 512, 38530, 0, 0, 0, 0, 0, 33, 22177, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Eye of Grillok Quest Credit Bunny - On Spellhit \'Quest Credit for Eye of Grillok\' - Quest Credit 10813'),
(22177, 0, 1, 0, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 11, 38529, 2, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Eye of Grillok Quest Credit Bunny - On Spellhit \'Quest Credit for Eye of Grillok\' - Cast \'Serverside - Cancel Eye of Grillok\'');

View File

@@ -0,0 +1,3 @@
-- remove duplicate 25962 'Fire Eater' spawns
DELETE FROM `creature` WHERE (`id1` = 25962) AND (`guid` IN (25954, 25957));
DELETE FROM `game_event_creature` WHERE (`eventEntry` = 1) AND (`guid` IN (25954, 25957));

View File

@@ -383,7 +383,7 @@ void wstrToLower(std::wstring& str) { std::transform(std::begin(str), std::end(s
void strToUpper(std::string& str) { std::transform(std::begin(str), std::end(str), std::begin(str), charToUpper); }
void strToLower(std::string& str) { std::transform(std::begin(str), std::end(str), std::begin(str), charToLower); }
std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension)
std::wstring GetMainPartOfName(std::wstring const& wname, uint32_t declension)
{
// supported only Cyrillic cases
if (wname.empty() || !isCyrillicCharacter(wname[0]) || declension > 5)
@@ -392,22 +392,22 @@ std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension)
}
// Important: end length must be <= MAX_INTERNAL_PLAYER_NAME-MAX_PLAYER_NAME (3 currently)
static std::wstring const a_End = { wchar_t(0x0430), wchar_t(0x0000) };
static std::wstring const o_End = { wchar_t(0x043E), wchar_t(0x0000) };
static std::wstring const ya_End = { wchar_t(0x044F), wchar_t(0x0000) };
static std::wstring const ie_End = { wchar_t(0x0435), wchar_t(0x0000) };
static std::wstring const i_End = { wchar_t(0x0438), wchar_t(0x0000) };
static std::wstring const yeru_End = { wchar_t(0x044B), wchar_t(0x0000) };
static std::wstring const u_End = { wchar_t(0x0443), wchar_t(0x0000) };
static std::wstring const yu_End = { wchar_t(0x044E), wchar_t(0x0000) };
static std::wstring const oj_End = { wchar_t(0x043E), wchar_t(0x0439), wchar_t(0x0000) };
static std::wstring const ie_j_End = { wchar_t(0x0435), wchar_t(0x0439), wchar_t(0x0000) };
static std::wstring const io_j_End = { wchar_t(0x0451), wchar_t(0x0439), wchar_t(0x0000) };
static std::wstring const o_m_End = { wchar_t(0x043E), wchar_t(0x043C), wchar_t(0x0000) };
static std::wstring const io_m_End = { wchar_t(0x0451), wchar_t(0x043C), wchar_t(0x0000) };
static std::wstring const ie_m_End = { wchar_t(0x0435), wchar_t(0x043C), wchar_t(0x0000) };
static std::wstring const soft_End = { wchar_t(0x044C), wchar_t(0x0000) };
static std::wstring const j_End = { wchar_t(0x0439), wchar_t(0x0000) };
static std::wstring const a_End = L"\u0430";
static std::wstring const o_End = L"\u043E";
static std::wstring const ya_End = L"\u044F";
static std::wstring const ie_End = L"\u0435";
static std::wstring const i_End = L"\u0438";
static std::wstring const yeru_End = L"\u044B";
static std::wstring const u_End = L"\u0443";
static std::wstring const yu_End = L"\u044E";
static std::wstring const oj_End = L"\u043E\u0439";
static std::wstring const ie_j_End = L"\u0435\u0439";
static std::wstring const io_j_End = L"\u0451\u0439";
static std::wstring const o_m_End = L"\u043E\u043C";
static std::wstring const io_m_End = L"\u0451\u043C";
static std::wstring const ie_m_End = L"\u0435\u043C";
static std::wstring const soft_End = L"\u044C";
static std::wstring const j_End = L"\u0439";
static std::array<std::array<std::wstring const*, 7>, 6> const dropEnds = {{
{ &a_End, &o_End, &ya_End, &ie_End, &soft_End, &j_End, nullptr },
@@ -421,16 +421,21 @@ std::wstring GetMainPartOfName(std::wstring const& wname, uint32 declension)
std::size_t const thisLen = wname.length();
std::array<std::wstring const*, 7> const& endings = dropEnds[declension];
for (auto itr = endings.begin(), end = endings.end(); (itr != end) && *itr; ++itr)
for (const std::wstring* endingPtr : endings)
{
std::wstring const& ending = **itr;
if (endingPtr == nullptr)
{
break;
}
std::wstring const& ending = *endingPtr;
std::size_t const endLen = ending.length();
if (endLen > thisLen)
{
continue;
}
if (wname.substr(thisLen - endLen, thisLen) == ending)
if (wname.compare(thisLen - endLen, endLen, ending) == 0)
{
return wname.substr(0, thisLen - endLen);
}

View File

@@ -6394,23 +6394,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
Unit::Kill(target, target);
return;
}
// Eye of Grillok
case 38495:
triggerSpellId = 38530;
break;
// Absorb Eye of Grillok (Zezzak's Shard)
case 38554:
{
if (!caster || target->GetTypeId() != TYPEID_UNIT)
return;
caster->CastSpell(caster, 38495, true, nullptr, this);
Creature* creatureTarget = target->ToCreature();
creatureTarget->DespawnOrUnsummon();
return;
}
// Tear of Azzinoth Summon Channel - it's not really supposed to do anything, and this only prevents the console spam
case 39857:
triggerSpellId = 39856;

View File

@@ -4590,7 +4590,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// Holiday - Midsummer, Ribbon Pole Periodic Visual
ApplySpellFix({ 45406 }, [](SpellInfo* spellInfo)
{
spellInfo->AuraInterruptFlags |= ( AURA_INTERRUPT_FLAG_MOUNT | AURA_INTERRUPT_FLAG_CAST );
spellInfo->AuraInterruptFlags |= ( AURA_INTERRUPT_FLAG_MOUNT | AURA_INTERRUPT_FLAG_CAST | AURA_INTERRUPT_FLAG_TALK );
});
// Improved Mind Flay and Smite
@@ -4804,6 +4804,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx6 |= SPELL_ATTR6_NO_CATEGORY_COOLDOWN_MODS;
});
// Eye of Grillok
ApplySpellFix({ 38495 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].TriggerSpell = 38530; // Quest Credit for Eye of Grillok
});
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
{
SpellInfo* spellInfo = mSpellInfoMap[i];
@@ -4925,6 +4931,14 @@ void SpellMgr::LoadSpellInfoCorrections()
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1921)); // The Taunka
factionTemplateEntry->hostileMask |= 8;
// Remove 1 from guards friendly mask, making able to attack players
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1857)); // Area 52 Bruiser
factionTemplateEntry->friendlyMask &= ~1;
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1806)); // Netherstorm Agent
factionTemplateEntry->friendlyMask &= ~1;
factionTemplateEntry = const_cast<FactionTemplateEntry*>(sFactionTemplateStore.LookupEntry(1812)); // K3 Bruiser
factionTemplateEntry->friendlyMask &= ~1;
// Remove vehicles attr, making accessories selectable
VehicleSeatEntry* vse = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(4689)); // Siege Engine, Accessory
vse->m_flags &= ~VEHICLE_SEAT_FLAG_PASSENGER_NOT_SELECTABLE;

View File

@@ -406,118 +406,90 @@ public:
}
};
class spell_madrigosa_activate_barrier : public SpellScriptLoader
class spell_madrigosa_activate_barrier : public SpellScript
{
public:
spell_madrigosa_activate_barrier() : SpellScriptLoader("spell_madrigosa_activate_barrier") { }
PrepareSpellScript(spell_madrigosa_activate_barrier);
class spell_madrigosa_activate_barrier_SpellScript : public SpellScript
void HandleActivateObject(SpellEffIndex effIndex)
{
PrepareSpellScript(spell_madrigosa_activate_barrier_SpellScript);
void HandleActivateObject(SpellEffIndex effIndex)
PreventHitDefaultEffect(effIndex);
if (GameObject* go = GetHitGObj())
{
PreventHitDefaultEffect(effIndex);
if (GameObject* go = GetHitGObj())
go->SetGoState(GO_STATE_READY);
if (Map* map = go->GetMap())
{
go->SetGoState(GO_STATE_READY);
if (Map* map = go->GetMap())
{
Map::PlayerList const& PlayerList = map->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->GetSource())
{
UpdateData data;
WorldPacket pkt;
go->BuildValuesUpdateBlockForPlayer(&data, i->GetSource());
data.BuildPacket(pkt);
i->GetSource()->GetSession()->SendPacket(&pkt);
}
}
Map::PlayerList const& PlayerList = map->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->GetSource())
{
UpdateData data;
WorldPacket pkt;
go->BuildValuesUpdateBlockForPlayer(&data, i->GetSource());
data.BuildPacket(pkt);
i->GetSource()->GetSession()->SendPacket(&pkt);
}
}
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_madrigosa_activate_barrier_SpellScript::HandleActivateObject, EFFECT_0, SPELL_EFFECT_ACTIVATE_OBJECT);
}
};
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_madrigosa_activate_barrier_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_madrigosa_activate_barrier::HandleActivateObject, EFFECT_0, SPELL_EFFECT_ACTIVATE_OBJECT);
}
};
class spell_madrigosa_deactivate_barrier : public SpellScriptLoader
class spell_madrigosa_deactivate_barrier : public SpellScript
{
public:
spell_madrigosa_deactivate_barrier() : SpellScriptLoader("spell_madrigosa_deactivate_barrier") { }
PrepareSpellScript(spell_madrigosa_deactivate_barrier);
class spell_madrigosa_deactivate_barrier_SpellScript : public SpellScript
void HandleActivateObject(SpellEffIndex effIndex)
{
PrepareSpellScript(spell_madrigosa_deactivate_barrier_SpellScript);
void HandleActivateObject(SpellEffIndex effIndex)
PreventHitDefaultEffect(effIndex);
if (GameObject* go = GetHitGObj())
{
PreventHitDefaultEffect(effIndex);
if (GameObject* go = GetHitGObj())
go->SetGoState(GO_STATE_ACTIVE);
if (Map* map = go->GetMap())
{
go->SetGoState(GO_STATE_ACTIVE);
if (Map* map = go->GetMap())
{
Map::PlayerList const& PlayerList = map->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->GetSource())
{
UpdateData data;
WorldPacket pkt;
go->BuildValuesUpdateBlockForPlayer(&data, i->GetSource());
data.BuildPacket(pkt);
i->GetSource()->GetSession()->SendPacket(&pkt);
}
}
Map::PlayerList const& PlayerList = map->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->GetSource())
{
UpdateData data;
WorldPacket pkt;
go->BuildValuesUpdateBlockForPlayer(&data, i->GetSource());
data.BuildPacket(pkt);
i->GetSource()->GetSession()->SendPacket(&pkt);
}
}
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_madrigosa_deactivate_barrier_SpellScript::HandleActivateObject, EFFECT_0, SPELL_EFFECT_ACTIVATE_OBJECT);
}
};
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_madrigosa_deactivate_barrier_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_madrigosa_deactivate_barrier::HandleActivateObject, EFFECT_0, SPELL_EFFECT_ACTIVATE_OBJECT);
}
};
class spell_brutallus_burn : public SpellScriptLoader
class spell_brutallus_burn : public SpellScript
{
public:
spell_brutallus_burn() : SpellScriptLoader("spell_brutallus_burn") { }
PrepareSpellScript(spell_brutallus_burn);
class spell_brutallus_burn_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_brutallus_burn_SpellScript);
return ValidateSpellInfo({ SPELL_BURN_DAMAGE });
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
if (!target->HasAura(SPELL_BURN_DAMAGE))
target->CastSpell(target, SPELL_BURN_DAMAGE, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_brutallus_burn_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
void HandleScriptEffect(SpellEffIndex effIndex)
{
return new spell_brutallus_burn_SpellScript();
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
if (!target->HasAura(SPELL_BURN_DAMAGE))
target->CastSpell(target, SPELL_BURN_DAMAGE, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_brutallus_burn::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -545,9 +517,9 @@ void AddSC_boss_brutallus()
{
new boss_brutallus();
new npc_madrigosa();
new spell_madrigosa_activate_barrier();
new spell_madrigosa_deactivate_barrier();
new spell_brutallus_burn();
RegisterSpellScript(spell_madrigosa_activate_barrier);
RegisterSpellScript(spell_madrigosa_deactivate_barrier);
RegisterSpellScript(spell_brutallus_burn);
new AreaTrigger_at_sunwell_madrigosa();
}

View File

@@ -366,132 +366,108 @@ public:
};
};
class spell_eredar_twins_apply_dark_touched : public SpellScriptLoader
class spell_eredar_twins_apply_dark_touched : public SpellScript
{
public:
spell_eredar_twins_apply_dark_touched() : SpellScriptLoader("spell_eredar_twins_apply_dark_touched") { }
PrepareSpellScript(spell_eredar_twins_apply_dark_touched);
class spell_eredar_twins_apply_dark_touched_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_eredar_twins_apply_dark_touched_SpellScript);
return ValidateSpellInfo({ SPELL_DARK_TOUCHED });
}
void HandleApplyTouch()
{
if (Player* target = GetHitPlayer())
target->CastSpell(target, SPELL_DARK_TOUCHED, true);
}
void Register() override
{
AfterHit += SpellHitFn(spell_eredar_twins_apply_dark_touched_SpellScript::HandleApplyTouch);
}
};
SpellScript* GetSpellScript() const override
void HandleApplyTouch()
{
return new spell_eredar_twins_apply_dark_touched_SpellScript();
if (Player* target = GetHitPlayer())
target->CastSpell(target, SPELL_DARK_TOUCHED, true);
}
void Register() override
{
AfterHit += SpellHitFn(spell_eredar_twins_apply_dark_touched::HandleApplyTouch);
}
};
class spell_eredar_twins_apply_flame_touched : public SpellScriptLoader
class spell_eredar_twins_apply_flame_touched : public SpellScript
{
public:
spell_eredar_twins_apply_flame_touched() : SpellScriptLoader("spell_eredar_twins_apply_flame_touched") { }
PrepareSpellScript(spell_eredar_twins_apply_flame_touched);
class spell_eredar_twins_apply_flame_touched_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_eredar_twins_apply_flame_touched_SpellScript);
return ValidateSpellInfo({ SPELL_FLAME_TOUCHED });
}
void HandleApplyTouch()
{
if (Player* target = GetHitPlayer())
target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
}
void Register() override
{
AfterHit += SpellHitFn(spell_eredar_twins_apply_flame_touched_SpellScript::HandleApplyTouch);
}
};
SpellScript* GetSpellScript() const override
void HandleApplyTouch()
{
return new spell_eredar_twins_apply_flame_touched_SpellScript();
if (Player* target = GetHitPlayer())
target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
}
void Register() override
{
AfterHit += SpellHitFn(spell_eredar_twins_apply_flame_touched::HandleApplyTouch);
}
};
class spell_eredar_twins_handle_touch : public SpellScriptLoader
class spell_eredar_twins_handle_touch : public SpellScript
{
public:
spell_eredar_twins_handle_touch() : SpellScriptLoader("spell_eredar_twins_handle_touch") { }
PrepareSpellScript(spell_eredar_twins_handle_touch);
class spell_eredar_twins_handle_touch_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_eredar_twins_handle_touch_SpellScript);
return ValidateSpellInfo({ SPELL_DARK_FLAME, SPELL_FLAME_TOUCHED, SPELL_DARK_TOUCHED });
}
SpellCastResult CheckCast()
SpellCastResult CheckCast()
{
if (GetCaster()->HasAura(SPELL_DARK_FLAME))
return SPELL_FAILED_DONT_REPORT;
if (GetSpellInfo()->Id == SPELL_DARK_TOUCHED)
{
if (GetCaster()->HasAura(SPELL_DARK_FLAME))
if (GetCaster()->HasAura(SPELL_FLAME_TOUCHED))
{
GetCaster()->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
GetCaster()->CastSpell(GetCaster(), SPELL_DARK_FLAME, true);
return SPELL_FAILED_DONT_REPORT;
if (GetSpellInfo()->Id == SPELL_DARK_TOUCHED)
{
if (GetCaster()->HasAura(SPELL_FLAME_TOUCHED))
{
GetCaster()->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
GetCaster()->CastSpell(GetCaster(), SPELL_DARK_FLAME, true);
return SPELL_FAILED_DONT_REPORT;
}
}
else // if (m_spellInfo->Id == SPELL_FLAME_TOUCHED)
{
if (GetCaster()->HasAura(SPELL_DARK_TOUCHED))
{
GetCaster()->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
GetCaster()->CastSpell(GetCaster(), SPELL_DARK_FLAME, true);
return SPELL_FAILED_DONT_REPORT;
}
}
return SPELL_CAST_OK;
}
void Register() override
else // if (m_spellInfo->Id == SPELL_FLAME_TOUCHED)
{
OnCheckCast += SpellCheckCastFn(spell_eredar_twins_handle_touch_SpellScript::CheckCast);
if (GetCaster()->HasAura(SPELL_DARK_TOUCHED))
{
GetCaster()->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
GetCaster()->CastSpell(GetCaster(), SPELL_DARK_FLAME, true);
return SPELL_FAILED_DONT_REPORT;
}
}
};
return SPELL_CAST_OK;
}
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_eredar_twins_handle_touch_SpellScript();
OnCheckCast += SpellCheckCastFn(spell_eredar_twins_handle_touch::CheckCast);
}
};
class spell_eredar_twins_blaze : public SpellScriptLoader
class spell_eredar_twins_blaze : public SpellScript
{
public:
spell_eredar_twins_blaze() : SpellScriptLoader("spell_eredar_twins_blaze") { }
PrepareSpellScript(spell_eredar_twins_blaze);
class spell_eredar_twins_blaze_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_eredar_twins_blaze_SpellScript);
return ValidateSpellInfo({ SPELL_BLAZE_SUMMON });
}
void HandleScript(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_eredar_twins_blaze_SpellScript::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
void HandleScript(SpellEffIndex effIndex)
{
return new spell_eredar_twins_blaze_SpellScript();
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_eredar_twins_blaze::HandleScript, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -520,10 +496,10 @@ void AddSC_boss_eredar_twins()
{
new boss_sacrolash();
new boss_alythess();
new spell_eredar_twins_apply_dark_touched();
new spell_eredar_twins_apply_flame_touched();
new spell_eredar_twins_handle_touch();
new spell_eredar_twins_blaze();
RegisterSpellScript(spell_eredar_twins_apply_dark_touched);
RegisterSpellScript(spell_eredar_twins_apply_flame_touched);
RegisterSpellScript(spell_eredar_twins_handle_touch);
RegisterSpellScript(spell_eredar_twins_blaze);
new AreaTrigger_at_sunwell_eredar_twins();
}

View File

@@ -476,65 +476,53 @@ public:
};
};
class spell_felmyst_fog_of_corruption : public SpellScriptLoader
class spell_felmyst_fog_of_corruption : public SpellScript
{
public:
spell_felmyst_fog_of_corruption() : SpellScriptLoader("spell_felmyst_fog_of_corruption") { }
PrepareSpellScript(spell_felmyst_fog_of_corruption);
class spell_felmyst_fog_of_corruption_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_felmyst_fog_of_corruption_SpellScript);
return ValidateSpellInfo({ SPELL_FOG_OF_CORRUPTION_CHARM });
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
target->CastSpell(GetCaster(), SPELL_FOG_OF_CORRUPTION_CHARM, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_felmyst_fog_of_corruption_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
void HandleScriptEffect(SpellEffIndex effIndex)
{
return new spell_felmyst_fog_of_corruption_SpellScript();
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
target->CastSpell(GetCaster(), SPELL_FOG_OF_CORRUPTION_CHARM, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_felmyst_fog_of_corruption::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
class spell_felmyst_fog_of_corruption_charm : public SpellScriptLoader
class spell_felmyst_fog_of_corruption_charm_aura : public AuraScript
{
public:
spell_felmyst_fog_of_corruption_charm() : SpellScriptLoader("spell_felmyst_fog_of_corruption_charm") { }
PrepareAuraScript(spell_felmyst_fog_of_corruption_charm_aura);
class spell_felmyst_fog_of_corruption_charm_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_felmyst_fog_of_corruption_charm_AuraScript);
return ValidateSpellInfo({ SPELL_FOG_OF_CORRUPTION_CHARM2, SPELL_FOG_OF_CORRUPTION_CHARM });
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->CastSpell(GetTarget(), SPELL_FOG_OF_CORRUPTION_CHARM2, true);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(SPELL_FOG_OF_CORRUPTION_CHARM);
GetTarget()->RemoveAurasDueToSpell(SPELL_FOG_OF_CORRUPTION_CHARM2);
Unit::Kill(GetCaster(), GetTarget(), false);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_felmyst_fog_of_corruption_charm_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_felmyst_fog_of_corruption_charm_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_felmyst_fog_of_corruption_charm_AuraScript();
GetTarget()->CastSpell(GetTarget(), SPELL_FOG_OF_CORRUPTION_CHARM2, true);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(SPELL_FOG_OF_CORRUPTION_CHARM);
GetTarget()->RemoveAurasDueToSpell(SPELL_FOG_OF_CORRUPTION_CHARM2);
Unit::Kill(GetCaster(), GetTarget(), false);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_felmyst_fog_of_corruption_charm_aura::HandleApply, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_felmyst_fog_of_corruption_charm_aura::HandleRemove, EFFECT_0, SPELL_AURA_AOE_CHARM, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -551,29 +539,18 @@ public:
}
};
class spell_felmyst_open_brutallus_back_doors : public SpellScriptLoader
class spell_felmyst_open_brutallus_back_doors : public SpellScript
{
public:
spell_felmyst_open_brutallus_back_doors() : SpellScriptLoader("spell_felmyst_open_brutallus_back_doors") { }
PrepareSpellScript(spell_felmyst_open_brutallus_back_doors);
class spell_felmyst_open_brutallus_back_doors_SpellScript : public SpellScript
void FilterTargets(std::list<WorldObject*>& unitList)
{
PrepareSpellScript(spell_felmyst_open_brutallus_back_doors_SpellScript);
unitList.remove_if(DoorsGuidCheck());
}
void FilterTargets(std::list<WorldObject*>& unitList)
{
unitList.remove_if(DoorsGuidCheck());
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_felmyst_open_brutallus_back_doors_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_felmyst_open_brutallus_back_doors_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_felmyst_open_brutallus_back_doors::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
}
};
@@ -582,8 +559,8 @@ void AddSC_boss_felmyst()
new boss_felmyst();
new npc_demonic_vapor();
new npc_demonic_vapor_trail();
new spell_felmyst_fog_of_corruption();
new spell_felmyst_fog_of_corruption_charm();
new spell_felmyst_open_brutallus_back_doors();
RegisterSpellScript(spell_felmyst_fog_of_corruption);
RegisterSpellScript(spell_felmyst_fog_of_corruption_charm_aura);
RegisterSpellScript(spell_felmyst_open_brutallus_back_doors);
}

View File

@@ -633,140 +633,116 @@ private:
Unit* _victim;
};
class spell_kalecgos_spectral_blast_dummy : public SpellScriptLoader
class spell_kalecgos_spectral_blast_dummy : public SpellScript
{
public:
spell_kalecgos_spectral_blast_dummy() : SpellScriptLoader("spell_kalecgos_spectral_blast_dummy") { }
PrepareSpellScript(spell_kalecgos_spectral_blast_dummy);
class spell_kalecgos_spectral_blast_dummy_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_kalecgos_spectral_blast_dummy_SpellScript);
return ValidateSpellInfo({ SPELL_SPECTRAL_BLAST_PORTAL, SPELL_SPECTRAL_BLAST_AA, SPELL_TELEPORT_SPECTRAL });
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(SpectralBlastCheck(GetCaster()->GetVictim()));
Acore::Containers::RandomResize(targets, 1);
}
void HandleDummy(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
{
target->CastSpell(target, SPELL_SPECTRAL_BLAST_PORTAL, true);
target->CastSpell(target, SPELL_SPECTRAL_BLAST_AA, true);
target->CastSpell(target, SPELL_TELEPORT_SPECTRAL, true);
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kalecgos_spectral_blast_dummy_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_kalecgos_spectral_blast_dummy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
void FilterTargets(std::list<WorldObject*>& targets)
{
return new spell_kalecgos_spectral_blast_dummy_SpellScript();
targets.remove_if(SpectralBlastCheck(GetCaster()->GetVictim()));
Acore::Containers::RandomResize(targets, 1);
}
void HandleDummy(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
{
target->CastSpell(target, SPELL_SPECTRAL_BLAST_PORTAL, true);
target->CastSpell(target, SPELL_SPECTRAL_BLAST_AA, true);
target->CastSpell(target, SPELL_TELEPORT_SPECTRAL, true);
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kalecgos_spectral_blast_dummy::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_kalecgos_spectral_blast_dummy::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
class spell_kalecgos_curse_of_boundless_agony : public SpellScriptLoader
class spell_kalecgos_curse_of_boundless_agony_aura : public AuraScript
{
public:
spell_kalecgos_curse_of_boundless_agony() : SpellScriptLoader("spell_kalecgos_curse_of_boundless_agony") { }
PrepareAuraScript(spell_kalecgos_curse_of_boundless_agony_aura);
class spell_kalecgos_curse_of_boundless_agony_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_kalecgos_curse_of_boundless_agony_AuraScript);
return ValidateSpellInfo({ SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR });
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (InstanceScript* instance = GetUnitOwner()->GetInstanceScript())
if (instance->IsEncounterInProgress())
GetUnitOwner()->CastCustomSpell(SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR, SPELLVALUE_MAX_TARGETS, 1, GetUnitOwner(), true);
}
void OnPeriodic(AuraEffect const* aurEff)
{
if (aurEff->GetTickNumber() > 1 && aurEff->GetTickNumber() % 5 == 1)
GetAura()->GetEffect(aurEff->GetEffIndex())->SetAmount(aurEff->GetAmount() * 2);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_kalecgos_curse_of_boundless_agony_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kalecgos_curse_of_boundless_agony_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
AuraScript* GetAuraScript() const override
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_kalecgos_curse_of_boundless_agony_AuraScript();
if (InstanceScript* instance = GetUnitOwner()->GetInstanceScript())
if (instance->IsEncounterInProgress())
GetUnitOwner()->CastCustomSpell(SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR, SPELLVALUE_MAX_TARGETS, 1, GetUnitOwner(), true);
}
void OnPeriodic(AuraEffect const* aurEff)
{
if (aurEff->GetTickNumber() > 1 && aurEff->GetTickNumber() % 5 == 1)
GetAura()->GetEffect(aurEff->GetEffIndex())->SetAmount(aurEff->GetAmount() * 2);
}
void Register() override
{
AfterEffectRemove += AuraEffectRemoveFn(spell_kalecgos_curse_of_boundless_agony_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kalecgos_curse_of_boundless_agony_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
}
};
class spell_kalecgos_spectral_realm_dummy : public SpellScriptLoader
class spell_kalecgos_spectral_realm_dummy : public SpellScript
{
public:
spell_kalecgos_spectral_realm_dummy() : SpellScriptLoader("spell_kalecgos_spectral_realm_dummy") { }
PrepareSpellScript(spell_kalecgos_spectral_realm_dummy);
class spell_kalecgos_spectral_realm_dummy_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_kalecgos_spectral_realm_dummy_SpellScript);
return ValidateSpellInfo({ SPELL_SPECTRAL_EXHAUSTION, SPELL_TELEPORT_SPECTRAL });
}
SpellCastResult CheckCast()
{
if (GetCaster()->HasAura(SPELL_SPECTRAL_EXHAUSTION))
return SPELL_FAILED_CASTER_AURASTATE;
return SPELL_CAST_OK;
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetCaster()->CastSpell(GetCaster(), SPELL_TELEPORT_SPECTRAL, true);
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_kalecgos_spectral_realm_dummy_SpellScript::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_kalecgos_spectral_realm_dummy_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
SpellCastResult CheckCast()
{
return new spell_kalecgos_spectral_realm_dummy_SpellScript();
if (GetCaster()->HasAura(SPELL_SPECTRAL_EXHAUSTION))
return SPELL_FAILED_CASTER_AURASTATE;
return SPELL_CAST_OK;
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetCaster()->CastSpell(GetCaster(), SPELL_TELEPORT_SPECTRAL, true);
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_kalecgos_spectral_realm_dummy::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_kalecgos_spectral_realm_dummy::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
class spell_kalecgos_spectral_realm : public SpellScriptLoader
class spell_kalecgos_spectral_realm_aura : public AuraScript
{
public:
spell_kalecgos_spectral_realm() : SpellScriptLoader("spell_kalecgos_spectral_realm") { }
PrepareAuraScript(spell_kalecgos_spectral_realm_aura);
class spell_kalecgos_spectral_realm_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_kalecgos_spectral_realm_AuraScript);
return ValidateSpellInfo({ SPELL_SPECTRAL_EXHAUSTION, SPELL_TELEPORT_NORMAL_REALM });
}
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SPECTRAL_EXHAUSTION, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_TELEPORT_NORMAL_REALM, true);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_kalecgos_spectral_realm_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_kalecgos_spectral_realm_AuraScript();
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SPECTRAL_EXHAUSTION, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_TELEPORT_NORMAL_REALM, true);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_kalecgos_spectral_realm_aura::OnRemove, EFFECT_1, SPELL_AURA_MOD_INVISIBILITY, AURA_EFFECT_HANDLE_REAL);
}
};
@@ -775,9 +751,9 @@ void AddSC_boss_kalecgos()
new boss_kalecgos();
new boss_sathrovarr();
new boss_kalec();
new spell_kalecgos_spectral_blast_dummy();
new spell_kalecgos_curse_of_boundless_agony();
new spell_kalecgos_spectral_realm_dummy();
new spell_kalecgos_spectral_realm();
RegisterSpellScript(spell_kalecgos_spectral_blast_dummy);
RegisterSpellScript(spell_kalecgos_curse_of_boundless_agony_aura);
RegisterSpellScript(spell_kalecgos_spectral_realm_dummy);
RegisterSpellScript(spell_kalecgos_spectral_realm_aura);
}

View File

@@ -1027,304 +1027,219 @@ public:
};
};
class spell_kiljaeden_shadow_spike : public SpellScriptLoader
class spell_kiljaeden_shadow_spike_aura : public AuraScript
{
public:
spell_kiljaeden_shadow_spike() : SpellScriptLoader("spell_kiljaeden_shadow_spike") { }
PrepareAuraScript(spell_kiljaeden_shadow_spike_aura);
class spell_kiljaeden_shadow_spike_AuraScript : public AuraScript
void HandlePeriodic(AuraEffect const* aurEff)
{
PrepareAuraScript(spell_kiljaeden_shadow_spike_AuraScript);
PreventDefaultAction();
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
}
void HandlePeriodic(AuraEffect const* aurEff)
{
PreventDefaultAction();
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kiljaeden_shadow_spike_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
void Register() override
{
return new spell_kiljaeden_shadow_spike_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kiljaeden_shadow_spike_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
class spell_kiljaeden_sinister_reflection : public SpellScriptLoader
class spell_kiljaeden_sinister_reflection : public SpellScript
{
public:
spell_kiljaeden_sinister_reflection() : SpellScriptLoader("spell_kiljaeden_sinister_reflection") { }
PrepareSpellScript(spell_kiljaeden_sinister_reflection);
class spell_kiljaeden_sinister_reflection_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_kiljaeden_sinister_reflection_SpellScript);
return ValidateSpellInfo({ SPELL_SINISTER_REFLECTION_SUMMON, SPELL_SINISTER_REFLECTION_CLONE });
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
{
target->CastSpell(target, SPELL_SINISTER_REFLECTION_SUMMON, true);
//target->CastSpell(target, SPELL_SINISTER_REFLECTION_CLONE, true);
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kiljaeden_sinister_reflection_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_kiljaeden_sinister_reflection_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
void FilterTargets(std::list<WorldObject*>& targets)
{
return new spell_kiljaeden_sinister_reflection_SpellScript();
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
{
target->CastSpell(target, SPELL_SINISTER_REFLECTION_SUMMON, true);
//target->CastSpell(target, SPELL_SINISTER_REFLECTION_CLONE, true);
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kiljaeden_sinister_reflection::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_kiljaeden_sinister_reflection::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
class spell_kiljaeden_sinister_reflection_clone : public SpellScriptLoader
class spell_kiljaeden_sinister_reflection_clone : public SpellScript
{
public:
spell_kiljaeden_sinister_reflection_clone() : SpellScriptLoader("spell_kiljaeden_sinister_reflection_clone") { }
PrepareSpellScript(spell_kiljaeden_sinister_reflection_clone);
class spell_kiljaeden_sinister_reflection_clone_SpellScript : public SpellScript
void FilterTargets(std::list<WorldObject*>& targets)
{
PrepareSpellScript(spell_kiljaeden_sinister_reflection_clone_SpellScript);
targets.sort(Acore::ObjectDistanceOrderPred(GetCaster()));
WorldObject* target = targets.front();
void FilterTargets(std::list<WorldObject*>& targets)
targets.clear();
if (target && target->GetTypeId() == TYPEID_UNIT)
{
targets.sort(Acore::ObjectDistanceOrderPred(GetCaster()));
WorldObject* target = targets.front();
targets.clear();
if (target && target->GetTypeId() == TYPEID_UNIT)
{
target->ToCreature()->AI()->SetData(1, GetCaster()->getClass());
targets.push_back(target);
}
target->ToCreature()->AI()->SetData(1, GetCaster()->getClass());
targets.push_back(target);
}
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kiljaeden_sinister_reflection_clone_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_kiljaeden_sinister_reflection_clone_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kiljaeden_sinister_reflection_clone::FilterTargets, EFFECT_ALL, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
class spell_kiljaeden_flame_dart : public SpellScriptLoader
class spell_kiljaeden_flame_dart : public SpellScript
{
public:
spell_kiljaeden_flame_dart() : SpellScriptLoader("spell_kiljaeden_flame_dart") { }
PrepareSpellScript(spell_kiljaeden_flame_dart);
class spell_kiljaeden_flame_dart_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_kiljaeden_flame_dart_SpellScript);
return ValidateSpellInfo({ SPELL_FLAME_DART_EXPLOSION });
}
void HandleSchoolDamage(SpellEffIndex /*effIndex*/)
{
if (Unit* target = GetHitUnit())
target->CastSpell(target, SPELL_FLAME_DART_EXPLOSION, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_kiljaeden_flame_dart_SpellScript::HandleSchoolDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
SpellScript* GetSpellScript() const override
void HandleSchoolDamage(SpellEffIndex /*effIndex*/)
{
return new spell_kiljaeden_flame_dart_SpellScript();
if (Unit* target = GetHitUnit())
target->CastSpell(target, SPELL_FLAME_DART_EXPLOSION, true);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_kiljaeden_flame_dart::HandleSchoolDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
}
};
class spell_kiljaeden_darkness : public SpellScriptLoader
class spell_kiljaeden_darkness_aura : public AuraScript
{
public:
spell_kiljaeden_darkness() : SpellScriptLoader("spell_kiljaeden_darkness") { }
PrepareAuraScript(spell_kiljaeden_darkness_aura);
class spell_kiljaeden_darkness_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_kiljaeden_darkness_AuraScript);
return ValidateSpellInfo({ SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE });
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
if (GetUnitOwner()->GetTypeId() == TYPEID_UNIT)
GetUnitOwner()->ToCreature()->AI()->DoAction(ACTION_NO_KILL_TALK);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE, true);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_kiljaeden_darkness_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_kiljaeden_darkness_AuraScript();
if (GetUnitOwner()->GetTypeId() == TYPEID_UNIT)
GetUnitOwner()->ToCreature()->AI()->DoAction(ACTION_NO_KILL_TALK);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE, true);
}
void Register() override
{
OnEffectRemove += AuraEffectRemoveFn(spell_kiljaeden_darkness_aura::HandleRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
class spell_kiljaeden_power_of_the_blue_flight : public SpellScriptLoader
class spell_kiljaeden_power_of_the_blue_flight : public SpellScript
{
public:
spell_kiljaeden_power_of_the_blue_flight() : SpellScriptLoader("spell_kiljaeden_power_of_the_blue_flight") { }
PrepareSpellScript(spell_kiljaeden_power_of_the_blue_flight);
class spell_kiljaeden_power_of_the_blue_flight_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_kiljaeden_power_of_the_blue_flight_SpellScript);
return ValidateSpellInfo({ SPELL_SUMMON_BLUE_DRAKE, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT });
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Player* player = GetHitPlayer())
{
player->CastSpell(player, SPELL_SUMMON_BLUE_DRAKE, true);
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_kiljaeden_power_of_the_blue_flight_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
void HandleScriptEffect(SpellEffIndex effIndex)
{
return new spell_kiljaeden_power_of_the_blue_flight_SpellScript();
PreventHitDefaultEffect(effIndex);
if (Player* player = GetHitPlayer())
{
player->CastSpell(player, SPELL_SUMMON_BLUE_DRAKE, true);
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_kiljaeden_power_of_the_blue_flight::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
class spell_kiljaeden_vengeance_of_the_blue_flight : public SpellScriptLoader
class spell_kiljaeden_vengeance_of_the_blue_flight_aura : public AuraScript
{
public:
spell_kiljaeden_vengeance_of_the_blue_flight() : SpellScriptLoader("spell_kiljaeden_vengeance_of_the_blue_flight") { }
PrepareAuraScript(spell_kiljaeden_vengeance_of_the_blue_flight_aura);
class spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript);
return ValidateSpellInfo({ SPELL_POSSESS_DRAKE_IMMUNITY });
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_POSSESS_DRAKE_IMMUNITY, true);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->RemoveAurasDueToSpell(SPELL_POSSESS_DRAKE_IMMUNITY);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_MOD_POSSESS, AURA_EFFECT_HANDLE_REAL);
OnEffectApply += AuraEffectApplyFn(spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript::HandleApply, EFFECT_2, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_MOD_POSSESS, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript::HandleRemove, EFFECT_2, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_kiljaeden_vengeance_of_the_blue_flight_AuraScript();
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_POSSESS_DRAKE_IMMUNITY, true);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->RemoveAurasDueToSpell(SPELL_POSSESS_DRAKE_IMMUNITY);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_kiljaeden_vengeance_of_the_blue_flight_aura::HandleApply, EFFECT_0, SPELL_AURA_MOD_POSSESS, AURA_EFFECT_HANDLE_REAL);
OnEffectApply += AuraEffectApplyFn(spell_kiljaeden_vengeance_of_the_blue_flight_aura::HandleApply, EFFECT_2, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_kiljaeden_vengeance_of_the_blue_flight_aura::HandleRemove, EFFECT_0, SPELL_AURA_MOD_POSSESS, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_kiljaeden_vengeance_of_the_blue_flight_aura::HandleRemove, EFFECT_2, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL);
}
};
class spell_kiljaeden_armageddon_periodic : public SpellScriptLoader
class spell_kiljaeden_armageddon_periodic_aura : public AuraScript
{
public:
spell_kiljaeden_armageddon_periodic() : SpellScriptLoader("spell_kiljaeden_armageddon_periodic") { }
PrepareAuraScript(spell_kiljaeden_armageddon_periodic_aura);
class spell_kiljaeden_armageddon_periodic_AuraScript : public AuraScript
void HandlePeriodic(AuraEffect const* aurEff)
{
PrepareAuraScript(spell_kiljaeden_armageddon_periodic_AuraScript);
PreventDefaultAction();
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
}
void HandlePeriodic(AuraEffect const* aurEff)
{
PreventDefaultAction();
if (Unit* target = GetUnitOwner()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 60.0f, true))
GetUnitOwner()->CastSpell(target, GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kiljaeden_armageddon_periodic_AuraScript::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
void Register() override
{
return new spell_kiljaeden_armageddon_periodic_AuraScript();
OnEffectPeriodic += AuraEffectPeriodicFn(spell_kiljaeden_armageddon_periodic_aura::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
class spell_kiljaeden_armageddon_missile : public SpellScriptLoader
class spell_kiljaeden_armageddon_missile : public SpellScript
{
public:
spell_kiljaeden_armageddon_missile() : SpellScriptLoader("spell_kiljaeden_armageddon_missile") { }
PrepareSpellScript(spell_kiljaeden_armageddon_missile);
class spell_kiljaeden_armageddon_missile_SpellScript : public SpellScript
void SetDest(SpellDestination& dest)
{
PrepareSpellScript(spell_kiljaeden_armageddon_missile_SpellScript);
Position const offset = { 0.0f, 0.0f, -20.0f, 0.0f };
dest.RelocateOffset(offset);
}
void SetDest(SpellDestination& dest)
{
Position const offset = { 0.0f, 0.0f, -20.0f, 0.0f };
dest.RelocateOffset(offset);
}
void Register() override
{
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_kiljaeden_armageddon_missile_SpellScript::SetDest, EFFECT_0, TARGET_DEST_CASTER);
}
};
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_kiljaeden_armageddon_missile_SpellScript();
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_kiljaeden_armageddon_missile::SetDest, EFFECT_0, TARGET_DEST_CASTER);
}
};
class spell_kiljaeden_dragon_breath : public SpellScriptLoader
class spell_kiljaeden_dragon_breath : public SpellScript
{
public:
spell_kiljaeden_dragon_breath() : SpellScriptLoader("spell_kiljaeden_dragon_breath") { }
PrepareSpellScript(spell_kiljaeden_dragon_breath);
class spell_kiljaeden_dragon_breath_SpellScript : public SpellScript
void FilterTargets(std::list<WorldObject*>& targets)
{
PrepareSpellScript(spell_kiljaeden_dragon_breath_SpellScript);
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT));
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kiljaeden_dragon_breath_SpellScript::FilterTargets, EFFECT_ALL, TARGET_UNIT_CONE_ALLY);
}
};
SpellScript* GetSpellScript() const override
void Register() override
{
return new spell_kiljaeden_dragon_breath_SpellScript();
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_kiljaeden_dragon_breath::FilterTargets, EFFECT_ALL, TARGET_UNIT_CONE_ALLY);
}
};
@@ -1333,15 +1248,15 @@ void AddSC_boss_kiljaeden()
new npc_kiljaeden_controller();
new boss_kiljaeden();
new npc_kalecgos_kj();
new spell_kiljaeden_shadow_spike();
new spell_kiljaeden_sinister_reflection();
new spell_kiljaeden_sinister_reflection_clone();
new spell_kiljaeden_flame_dart();
new spell_kiljaeden_darkness();
new spell_kiljaeden_power_of_the_blue_flight();
new spell_kiljaeden_vengeance_of_the_blue_flight();
new spell_kiljaeden_armageddon_periodic();
new spell_kiljaeden_armageddon_missile();
new spell_kiljaeden_dragon_breath();
RegisterSpellScript(spell_kiljaeden_shadow_spike_aura);
RegisterSpellScript(spell_kiljaeden_sinister_reflection);
RegisterSpellScript(spell_kiljaeden_sinister_reflection_clone);
RegisterSpellScript(spell_kiljaeden_flame_dart);
RegisterSpellScript(spell_kiljaeden_darkness_aura);
RegisterSpellScript(spell_kiljaeden_power_of_the_blue_flight);
RegisterSpellScript(spell_kiljaeden_vengeance_of_the_blue_flight_aura);
RegisterSpellScript(spell_kiljaeden_armageddon_periodic_aura);
RegisterSpellScript(spell_kiljaeden_armageddon_missile);
RegisterSpellScript(spell_kiljaeden_dragon_breath);
}

View File

@@ -326,183 +326,148 @@ public:
};
};
class spell_muru_summon_blood_elves_periodic : public SpellScriptLoader
class spell_muru_summon_blood_elves_periodic_aura : public AuraScript
{
public:
spell_muru_summon_blood_elves_periodic() : SpellScriptLoader("spell_muru_summon_blood_elves_periodic") { }
PrepareAuraScript(spell_muru_summon_blood_elves_periodic_aura);
class spell_muru_summon_blood_elves_periodic_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_muru_summon_blood_elves_periodic_AuraScript);
return ValidateSpellInfo({ SPELL_SUMMON_FURY_MAGE1, SPELL_SUMMON_FURY_MAGE2, SPELL_SUMMON_BERSERKER1, SPELL_SUMMON_BERSERKER2 });
}
void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
// first tick after 10 seconds
GetAura()->GetEffect(aurEff->GetEffIndex())->SetPeriodicTimer(10000);
}
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_FURY_MAGE1, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_FURY_MAGE2, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER1, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER2, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER1, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER2, true);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_muru_summon_blood_elves_periodic_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_muru_summon_blood_elves_periodic_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
void HandleApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
{
return new spell_muru_summon_blood_elves_periodic_AuraScript();
// first tick after 10 seconds
GetAura()->GetEffect(aurEff->GetEffIndex())->SetPeriodicTimer(10000);
}
void OnPeriodic(AuraEffect const* /*aurEff*/)
{
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_FURY_MAGE1, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_FURY_MAGE2, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER1, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER2, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER1, true);
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_BERSERKER2, true);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_muru_summon_blood_elves_periodic_aura::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_muru_summon_blood_elves_periodic_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
class spell_muru_darkness : public SpellScriptLoader
class spell_muru_darkness_aura : public AuraScript
{
public:
spell_muru_darkness() : SpellScriptLoader("spell_muru_darkness") { }
PrepareAuraScript(spell_muru_darkness_aura);
class spell_muru_darkness_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_muru_darkness_AuraScript);
return ValidateSpellInfo({ SPELL_SUMMON_DARK_FIEND });
}
void OnPeriodic(AuraEffect const* aurEff)
{
if (aurEff->GetTickNumber() == 3)
for (uint8 i = 0; i < 8; ++i)
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_DARK_FIEND + i, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_muru_darkness_AuraScript::OnPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const override
void OnPeriodic(AuraEffect const* aurEff)
{
return new spell_muru_darkness_AuraScript();
if (aurEff->GetTickNumber() == 3)
for (uint8 i = 0; i < 8; ++i)
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_DARK_FIEND + i, true);
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_muru_darkness_aura::OnPeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
}
};
class spell_entropius_negative_energy : public SpellScriptLoader
class spell_entropius_negative_energy : public SpellScript
{
public:
spell_entropius_negative_energy() : SpellScriptLoader("spell_entropius_negative_energy") { }
PrepareSpellScript(spell_entropius_negative_energy);
class spell_entropius_negative_energy_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_entropius_negative_energy_SpellScript);
return ValidateSpellInfo({ SPELL_NEGATIVE_ENERGY_CHAIN });
}
bool Load() override
{
return GetCaster()->GetTypeId() == TYPEID_UNIT;
}
void FilterTargets(std::list<WorldObject*>& targets)
{
Acore::Containers::RandomResize(targets, GetCaster()->GetAI()->GetData(DATA_NEGATIVE_ENERGY_TARGETS));
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
GetCaster()->CastSpell(target, SPELL_NEGATIVE_ENERGY_CHAIN, true);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_entropius_negative_energy_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_entropius_negative_energy_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
SpellScript* GetSpellScript() const override
bool Load() override
{
return new spell_entropius_negative_energy_SpellScript();
return GetCaster()->GetTypeId() == TYPEID_UNIT;
}
void FilterTargets(std::list<WorldObject*>& targets)
{
Acore::Containers::RandomResize(targets, GetCaster()->GetAI()->GetData(DATA_NEGATIVE_ENERGY_TARGETS));
}
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
if (Unit* target = GetHitUnit())
GetCaster()->CastSpell(target, SPELL_NEGATIVE_ENERGY_CHAIN, true);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_entropius_negative_energy::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_entropius_negative_energy::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
class spell_entropius_void_zone_visual : public SpellScriptLoader
class spell_entropius_void_zone_visual_aura : public AuraScript
{
public:
spell_entropius_void_zone_visual() : SpellScriptLoader("spell_entropius_void_zone_visual") { }
PrepareAuraScript(spell_entropius_void_zone_visual_aura);
class spell_entropius_void_zone_visual_AuraScript : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareAuraScript(spell_entropius_void_zone_visual_AuraScript);
return ValidateSpellInfo({ SPELL_SUMMON_DARK_FIEND_ENTROPIUS });
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
SetDuration(3000);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_DARK_FIEND_ENTROPIUS, true);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_entropius_void_zone_visual_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_entropius_void_zone_visual_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const override
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_entropius_void_zone_visual_AuraScript();
SetDuration(3000);
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetUnitOwner()->CastSpell(GetUnitOwner(), SPELL_SUMMON_DARK_FIEND_ENTROPIUS, true);
}
void Register() override
{
OnEffectApply += AuraEffectApplyFn(spell_entropius_void_zone_visual_aura::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectRemove += AuraEffectRemoveFn(spell_entropius_void_zone_visual_aura::HandleApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
class spell_entropius_black_hole_effect : public SpellScriptLoader
class spell_entropius_black_hole_effect : public SpellScript
{
public:
spell_entropius_black_hole_effect() : SpellScriptLoader("spell_entropius_black_hole_effect") { }
PrepareSpellScript(spell_entropius_black_hole_effect);
class spell_entropius_black_hole_effect_SpellScript : public SpellScript
void HandlePull(SpellEffIndex effIndex)
{
PrepareSpellScript(spell_entropius_black_hole_effect_SpellScript);
PreventHitDefaultEffect(effIndex);
Unit* target = GetHitUnit();
if (!target)
return;
void HandlePull(SpellEffIndex effIndex)
Position pos;
if (target->GetDistance(GetCaster()) < 5.0f)
{
PreventHitDefaultEffect(effIndex);
Unit* target = GetHitUnit();
if (!target)
return;
Position pos;
if (target->GetDistance(GetCaster()) < 5.0f)
{
float o = frand(0, 2 * M_PI);
pos.Relocate(GetCaster()->GetPositionX() + 4.0f * cos(o), GetCaster()->GetPositionY() + 4.0f * std::sin(o), GetCaster()->GetPositionZ() + frand(10.0f, 15.0f));
}
else
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ() + 1.0f);
float speedXY = float(GetSpellInfo()->Effects[effIndex].MiscValue) * 0.1f;
float speedZ = target->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
target->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
float o = frand(0, 2 * M_PI);
pos.Relocate(GetCaster()->GetPositionX() + 4.0f * cos(o), GetCaster()->GetPositionY() + 4.0f * std::sin(o), GetCaster()->GetPositionZ() + frand(10.0f, 15.0f));
}
else
pos.Relocate(GetCaster()->GetPositionX(), GetCaster()->GetPositionY(), GetCaster()->GetPositionZ() + 1.0f);
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_entropius_black_hole_effect_SpellScript::HandlePull, EFFECT_0, SPELL_EFFECT_PULL_TOWARDS_DEST);
}
};
float speedXY = float(GetSpellInfo()->Effects[effIndex].MiscValue) * 0.1f;
float speedZ = target->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
SpellScript* GetSpellScript() const override
target->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);
}
void Register() override
{
return new spell_entropius_black_hole_effect_SpellScript();
OnEffectHitTarget += SpellEffectFn(spell_entropius_black_hole_effect::HandlePull, EFFECT_0, SPELL_EFFECT_PULL_TOWARDS_DEST);
}
};
@@ -512,10 +477,10 @@ void AddSC_boss_muru()
new boss_entropius();
new npc_singularity();
new spell_muru_summon_blood_elves_periodic();
new spell_muru_darkness();
new spell_entropius_negative_energy();
new spell_entropius_void_zone_visual();
new spell_entropius_black_hole_effect();
RegisterSpellScript(spell_muru_summon_blood_elves_periodic_aura);
RegisterSpellScript(spell_muru_darkness_aura);
RegisterSpellScript(spell_entropius_negative_energy);
RegisterSpellScript(spell_entropius_void_zone_visual_aura);
RegisterSpellScript(spell_entropius_black_hole_effect);
}

View File

@@ -271,37 +271,31 @@ enum cataclysmBreath
SPELL_WITHERED_TOUCH = 46300
};
class spell_cataclysm_breath : public SpellScriptLoader
class spell_cataclysm_breath : public SpellScript
{
public:
spell_cataclysm_breath() : SpellScriptLoader("spell_cataclysm_breath") { }
PrepareSpellScript(spell_cataclysm_breath);
class spell_cataclysm_breath_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_cataclysm_breath_SpellScript);
return ValidateSpellInfo({ SPELL_CORROSIVE_POISON, SPELL_FEVERED_FATIGUE, SPELL_HEX, SPELL_NECROTIC_POISON, SPELL_PIERCING_SHADOW, SPELL_SHRINK, SPELL_WAVERING_WILL, SPELL_WITHERED_TOUCH });
}
void HandleAfterCast()
{
if (Unit* target = GetExplTargetUnit())
for (uint8 i = 0; i < 4; ++i)
GetCaster()->CastSpell(target, RAND(SPELL_CORROSIVE_POISON, SPELL_FEVERED_FATIGUE, SPELL_HEX, SPELL_NECROTIC_POISON, SPELL_PIERCING_SHADOW, SPELL_SHRINK, SPELL_WAVERING_WILL, SPELL_WITHERED_TOUCH), true);
}
void Register() override
{
AfterCast += SpellCastFn(spell_cataclysm_breath_SpellScript::HandleAfterCast);
}
};
SpellScript* GetSpellScript() const override
void HandleAfterCast()
{
return new spell_cataclysm_breath_SpellScript();
if (Unit* target = GetExplTargetUnit())
for (uint8 i = 0; i < 4; ++i)
GetCaster()->CastSpell(target, RAND(SPELL_CORROSIVE_POISON, SPELL_FEVERED_FATIGUE, SPELL_HEX, SPELL_NECROTIC_POISON, SPELL_PIERCING_SHADOW, SPELL_SHRINK, SPELL_WAVERING_WILL, SPELL_WITHERED_TOUCH), true);
}
void Register() override
{
AfterCast += SpellCastFn(spell_cataclysm_breath::HandleAfterCast);
}
};
void AddSC_instance_sunwell_plateau()
{
new instance_sunwell_plateau();
new spell_cataclysm_breath();
RegisterSpellScript(spell_cataclysm_breath);
}

View File

@@ -114,27 +114,6 @@ class spell_q10929_fumping_aura : public AuraScript
}
};
class npc_greatfather_aldrimus : public CreatureScript
{
public:
npc_greatfather_aldrimus() : CreatureScript("npc_greatfather_aldrimus") { }
CreatureAI* GetAI(Creature* creature) const override
{
return new npc_greatfather_aldrimusAI(creature);
}
struct npc_greatfather_aldrimusAI : public ScriptedAI
{
npc_greatfather_aldrimusAI(Creature* c) : ScriptedAI(c) {}
bool CanBeSeen(Player const* player) override
{
return player->GetQuestStatus(10253) == QUEST_STATUS_REWARDED;
}
};
};
enum q10036Torgos
{
NPC_TORGOS = 18707
@@ -636,7 +615,6 @@ void AddSC_terokkar_forest()
// Ours
RegisterSpellAndAuraScriptPair(spell_q10930_big_bone_worm, spell_q10930_big_bone_worm_aura);
RegisterSpellAndAuraScriptPair(spell_q10929_fumping, spell_q10929_fumping_aura);
new npc_greatfather_aldrimus();
RegisterSpellScript(spell_q10036_torgos);
RegisterSpellScript(spell_q10923_evil_draws_near_summon);
RegisterSpellScript(spell_q10923_evil_draws_near_periodic_aura);

View File

@@ -3938,6 +3938,58 @@ class spell_item_scroll_of_retribution : public SpellScript
}
};
// 38554 - Absorb Eye of Grillok (Zezzak's Shard)
enum EyeofGrillok
{
SPELL_EYE_OF_GRILLOK = 38495,
NPC_EYE_OF_GRILLOK = 19440
};
class spell_item_eye_of_grillok : public SpellScript
{
PrepareSpellScript(spell_item_eye_of_grillok)
SpellCastResult CheckCast()
{
if (Unit* target = GetExplTargetUnit())
if (target->GetEntry() == NPC_EYE_OF_GRILLOK && !target->isDead())
return SPELL_CAST_OK;
return SPELL_FAILED_BAD_TARGETS;
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_item_eye_of_grillok::CheckCast);
}
};
class spell_item_eye_of_grillok_aura : public AuraScript
{
PrepareAuraScript(spell_item_eye_of_grillok_aura)
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_EYE_OF_GRILLOK });
}
void OnPeriodic(AuraEffect const* aurEff)
{
Unit* caster = GetCaster();
if (!caster || !GetTarget())
return;
caster->CastSpell(caster, SPELL_EYE_OF_GRILLOK, true);
GetTarget()->ToCreature()->DespawnOrUnsummon();
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_item_eye_of_grillok_aura::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
void AddSC_item_spell_scripts()
{
RegisterSpellScript(spell_item_massive_seaforium_charge);
@@ -4059,5 +4111,6 @@ void AddSC_item_spell_scripts()
RegisterSpellScript(spell_item_worn_troll_dice);
RegisterSpellScript(spell_item_venomhide_feed);
RegisterSpellScript(spell_item_scroll_of_retribution);
RegisterSpellAndAuraScriptPair(spell_item_eye_of_grillok, spell_item_eye_of_grillok_aura);
}

View File

@@ -281,135 +281,120 @@ class spell_rog_deadly_poison : public SpellScript
};
// 51690 - Killing Spree
#define KillingSpreeScriptName "spell_rog_killing_spree"
class spell_rog_killing_spree : public SpellScriptLoader
class spell_rog_killing_spree_aura : public AuraScript
{
public:
spell_rog_killing_spree() : SpellScriptLoader(KillingSpreeScriptName) { }
PrepareAuraScript(spell_rog_killing_spree_aura);
class spell_rog_killing_spree_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_rog_killing_spree_SpellScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_ROGUE_KILLING_SPREE });
}
SpellCastResult CheckCast()
{
// Kologarn area, Killing Spree should not work
if (GetCaster()->GetMapId() == 603 /*Ulduar*/ && GetCaster()->GetDistance2d(1766.936f, -24.748f) < 50.0f)
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
return SPELL_CAST_OK;
}
void FilterTargets(std::list<WorldObject*>& targets)
{
if (targets.empty() || GetCaster()->GetVehicleBase() || GetCaster()->HasUnitState(UNIT_STATE_ROOT))
FinishCast(SPELL_FAILED_OUT_OF_RANGE);
else
return ValidateSpellInfo(
{
// Added attribute not breaking stealth, removes auras here
GetCaster()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
GetCaster()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_SPELL_ATTACK);
}
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Aura* aura = GetCaster()->GetAura(SPELL_ROGUE_KILLING_SPREE))
{
if (spell_rog_killing_spree_AuraScript* script = dynamic_cast<spell_rog_killing_spree_AuraScript*>(aura->GetScriptByName(KillingSpreeScriptName)))
script->AddTarget(GetHitUnit());
}
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_rog_killing_spree_SpellScript::CheckCast);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rog_killing_spree_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_rog_killing_spree_SpellScript::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
SpellScript* GetSpellScript() const override
{
return new spell_rog_killing_spree_SpellScript();
SPELL_ROGUE_KILLING_SPREE_TELEPORT,
SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG,
SPELL_ROGUE_KILLING_SPREE_DMG_BUFF
});
}
class spell_rog_killing_spree_AuraScript : public AuraScript
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
PrepareAuraScript(spell_rog_killing_spree_AuraScript);
GetTarget()->CastSpell(GetTarget(), SPELL_ROGUE_KILLING_SPREE_DMG_BUFF, true);
}
bool Validate(SpellInfo const* /*spellInfo*/) override
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
while (!_targets.empty())
{
return ValidateSpellInfo(
{
SPELL_ROGUE_KILLING_SPREE_TELEPORT,
SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG,
SPELL_ROGUE_KILLING_SPREE_DMG_BUFF
});
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->CastSpell(GetTarget(), SPELL_ROGUE_KILLING_SPREE_DMG_BUFF, true);
}
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
{
while (!_targets.empty())
ObjectGuid guid = Acore::Containers::SelectRandomContainerElement(_targets);
if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
{
ObjectGuid guid = Acore::Containers::SelectRandomContainerElement(_targets);
if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
// xinef: target may be no longer valid
if (!GetTarget()->IsValidAttackTarget(target) || target->HasStealthAura() || target->HasInvisibilityAura())
{
// xinef: target may be no longer valid
if (!GetTarget()->IsValidAttackTarget(target) || target->HasStealthAura() || target->HasInvisibilityAura())
{
_targets.remove(guid);
continue;
}
GetTarget()->CastSpell(target, SPELL_ROGUE_KILLING_SPREE_TELEPORT, true);
// xinef: ensure fast coordinates switch, dont wait for client to send opcode
WorldLocation const& dest = GetTarget()->ToPlayer()->GetTeleportDest();
GetTarget()->ToPlayer()->UpdatePosition(dest, true);
GetTarget()->CastSpell(target, SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_DONT_REPORT_CAST_ERROR));
break;
}
else
_targets.remove(guid);
continue;
}
GetTarget()->CastSpell(target, SPELL_ROGUE_KILLING_SPREE_TELEPORT, true);
// xinef: ensure fast coordinates switch, dont wait for client to send opcode
WorldLocation const& dest = GetTarget()->ToPlayer()->GetTeleportDest();
GetTarget()->ToPlayer()->UpdatePosition(dest, true);
GetTarget()->CastSpell(target, SPELL_ROGUE_KILLING_SPREE_WEAPON_DMG, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_DONT_REPORT_CAST_ERROR));
break;
}
else
_targets.remove(guid);
}
}
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->RemoveAurasDueToSpell(SPELL_ROGUE_KILLING_SPREE_DMG_BUFF);
}
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_rog_killing_spree_AuraScript::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_killing_spree_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
AfterEffectRemove += AuraEffectRemoveFn(spell_rog_killing_spree_AuraScript::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
public:
void AddTarget(Unit* target)
{
_targets.push_back(target->GetGUID());
}
private:
GuidList _targets;
};
AuraScript* GetAuraScript() const override
void HandleRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
return new spell_rog_killing_spree_AuraScript();
GetTarget()->RemoveAurasDueToSpell(SPELL_ROGUE_KILLING_SPREE_DMG_BUFF);
}
public:
void AddTarget(Unit* target)
{
_targets.push_back(target->GetGUID());
}
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_rog_killing_spree_aura::HandleApply, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_rog_killing_spree_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
AfterEffectRemove += AuraEffectRemoveFn(spell_rog_killing_spree_aura::HandleRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
private:
GuidList _targets;
};
#define KillingSpreeScriptName "spell_rog_killing_spree"
typedef spell_rog_killing_spree_aura spell_rog_killing_spree_aura_script;
class spell_rog_killing_spree : public SpellScript
{
PrepareSpellScript(spell_rog_killing_spree);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_ROGUE_KILLING_SPREE });
}
SpellCastResult CheckCast()
{
// Kologarn area, Killing Spree should not work
if (GetCaster()->GetMapId() == 603 /*Ulduar*/ && GetCaster()->GetDistance2d(1766.936f, -24.748f) < 50.0f)
return SPELL_FAILED_CANT_DO_THAT_RIGHT_NOW;
return SPELL_CAST_OK;
}
void FilterTargets(std::list<WorldObject*>& targets)
{
if (targets.empty() || GetCaster()->GetVehicleBase() || GetCaster()->HasUnitState(UNIT_STATE_ROOT))
FinishCast(SPELL_FAILED_OUT_OF_RANGE);
else
{
// Added attribute not breaking stealth, removes auras here
GetCaster()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CAST);
GetCaster()->RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_SPELL_ATTACK);
}
}
void HandleDummy(SpellEffIndex /*effIndex*/)
{
if (Aura* aura = GetCaster()->GetAura(SPELL_ROGUE_KILLING_SPREE))
{
if (spell_rog_killing_spree_aura* script = dynamic_cast<spell_rog_killing_spree_aura_script*>(aura->GetScriptByName(KillingSpreeScriptName)))
script->AddTarget(GetHitUnit());
}
}
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_rog_killing_spree::CheckCast);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_rog_killing_spree::FilterTargets, EFFECT_1, TARGET_UNIT_DEST_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_rog_killing_spree::HandleDummy, EFFECT_1, SPELL_EFFECT_DUMMY);
}
};
@@ -774,7 +759,7 @@ void AddSC_rogue_spell_scripts()
RegisterSpellScript(spell_rog_blade_flurry);
RegisterSpellScript(spell_rog_cheat_death);
RegisterSpellScript(spell_rog_deadly_poison);
new spell_rog_killing_spree();
RegisterSpellAndAuraScriptPair(spell_rog_killing_spree, spell_rog_killing_spree_aura);
RegisterSpellScript(spell_rog_nerves_of_steel);
RegisterSpellScript(spell_rog_preparation);
RegisterSpellScript(spell_rog_prey_on_the_weak);

View File

@@ -316,7 +316,7 @@ public:
// Summon druid spirits on 75%, 50% and 25% health
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
if (_stage <= 3 && me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
{
Talk(SAY_YSONDRE_SUMMON_DRUIDS);
@@ -421,7 +421,7 @@ public:
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
if (_stage <= 3 && me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
{
Talk(SAY_LETHON_DRAW_SPIRIT);
DoCast(me, SPELL_DRAW_SPIRIT);
@@ -547,7 +547,7 @@ public:
void DamageTaken(Unit*, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
if (_stage <= 3 && me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
{
Talk(SAY_EMERISS_CAST_CORRUPTION);
DoCast(me, SPELL_CORRUPTION_OF_EARTH, true);
@@ -645,7 +645,7 @@ public:
{
// At 75, 50 or 25 percent health, we need to activate the shades and go "banished"
// Note: _stage holds the amount of times they have been summoned
if (!_banished && me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
if (_stage <= 3 && !_banished && me->HealthBelowPctDamaged(100 - (25 * _stage), damage))
{
_banished = true;
_banishedTimer = 60000;
@@ -736,41 +736,30 @@ public:
* --- Spell: Dream Fog
*/
class spell_dream_fog_sleep : public SpellScriptLoader
class spell_dream_fog_sleep : public SpellScript
{
public:
spell_dream_fog_sleep() : SpellScriptLoader("spell_dream_fog_sleep") { }
PrepareSpellScript(spell_dream_fog_sleep);
class spell_dream_fog_sleep_SpellScript : public SpellScript
void HandleEffect(SpellEffIndex /*effIndex*/)
{
PrepareSpellScript(spell_dream_fog_sleep_SpellScript);
void HandleEffect(SpellEffIndex /*effIndex*/)
if (Unit* caster = GetCaster())
{
if (Unit* caster = GetCaster())
if (Unit* target = GetHitUnit())
{
if (Unit* target = GetHitUnit())
{
caster->GetAI()->SetGUID(target->GetGUID(), GUID_FOG_TARGET);
}
caster->GetAI()->SetGUID(target->GetGUID(), GUID_FOG_TARGET);
}
}
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SLEEP));
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_dream_fog_sleep_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const override
void FilterTargets(std::list<WorldObject*>& targets)
{
return new spell_dream_fog_sleep_SpellScript();
targets.remove_if(Acore::UnitAuraCheck(true, SPELL_SLEEP));
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_dream_fog_sleep::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
}
};
@@ -827,41 +816,30 @@ class spell_shadow_bolt_whirl : public AuraScript
OnEffectPeriodic += AuraEffectPeriodicFn(spell_shadow_bolt_whirl::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
class spell_mark_of_nature : public SpellScriptLoader
class spell_mark_of_nature : public SpellScript
{
public:
spell_mark_of_nature() : SpellScriptLoader("spell_mark_of_nature") { }
PrepareSpellScript(spell_mark_of_nature);
class spell_mark_of_nature_SpellScript : public SpellScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
PrepareSpellScript(spell_mark_of_nature_SpellScript);
return ValidateSpellInfo({ SPELL_MARK_OF_NATURE, SPELL_AURA_OF_NATURE });
}
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_MARK_OF_NATURE, SPELL_AURA_OF_NATURE });
}
void FilterTargets(std::list<WorldObject*>& targets)
{
targets.remove_if(MarkOfNatureTargetSelector());
}
void HandleEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
SpellScript* GetSpellScript() const override
void FilterTargets(std::list<WorldObject*>& targets)
{
return new spell_mark_of_nature_SpellScript();
targets.remove_if(MarkOfNatureTargetSelector());
}
void HandleEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_AURA_OF_NATURE, true);
}
void Register() override
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
}
};
@@ -878,8 +856,8 @@ void AddSC_emerald_dragons()
new boss_lethon();
// dragon spellscripts
new spell_dream_fog_sleep();
new spell_mark_of_nature();
RegisterSpellScript(spell_dream_fog_sleep);
RegisterSpellScript(spell_mark_of_nature);
RegisterSpellScript(spell_shadow_bolt_whirl);
};

View File

@@ -572,6 +572,10 @@ public:
if (!SpawnAssoc)
return;
// check if they're hostile
if (!(me->IsHostileTo(who) || who->IsHostileTo(me)))
return;
if (me->IsValidAttackTarget(who))
{
Player* playerTarget = who->ToPlayer();

View File

@@ -766,7 +766,7 @@ struct CreatureDisplayInfoExtraEntry
{
//uint32 ID; // 0
uint32 DisplayRaceID; // 1
uint32 DisplaySexID; // 2
//uint32 DisplaySexID; // 2
//uint32 SkinID; // 3
//uint32 FaceID; // 4
//uint32 HairStyleID; // 5

View File

@@ -37,7 +37,7 @@ char constexpr ChrRacesEntryfmt[] = "niixiixixxxxixssssssssssssssssxxxxxxxxxxxxx
char constexpr CinematicCameraEntryfmt[] = "nsiffff";
char constexpr CinematicSequencesEntryfmt[] = "nxixxxxxxx";
char constexpr CreatureDisplayInfofmt[] = "nixifxxxxxxxxxxx";
char constexpr CreatureDisplayInfoExtrafmt[] = "diixxxxxxxxxxxxxxxxxx";
char constexpr CreatureDisplayInfoExtrafmt[] = "dixxxxxxxxxxxxxxxxxxx";
char constexpr CreatureFamilyfmt[] = "nfifiiiiixssssssssssssssssxx";
char constexpr CreatureModelDatafmt[] = "nixxfxxxxxxxxxfffxxxxxxxxxxx";
char constexpr CreatureSpellDatafmt[] = "niiiixxxx";