diff options
| author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2025-11-14 19:44:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-14 19:44:17 +0100 |
| commit | 083a86646909e6fb7d69e72822e9ea8f672ec9e3 (patch) | |
| tree | ff813608ef3d6d683598455d6f56210e260aaef4 | |
| parent | 66f5a282b76a55417c4a13884845f1dab8c2f9c2 (diff) | |
Core/Spells: Implement demon hunter passive Shattered Souls (#31376)
| -rw-r--r-- | sql/updates/world/master/2025_11_14_01_world.sql | 16 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_dh.cpp | 70 |
2 files changed, 86 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_11_14_01_world.sql b/sql/updates/world/master/2025_11_14_01_world.sql new file mode 100644 index 00000000000..1c816d49677 --- /dev/null +++ b/sql/updates/world/master/2025_11_14_01_world.sql @@ -0,0 +1,16 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dh_shattered_souls_havoc', 'spell_dh_shattered_souls_havoc_trigger'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(178940, 'spell_dh_shattered_souls_havoc'), +(209651, 'spell_dh_shattered_souls_havoc_trigger'); + +DELETE FROM `areatrigger_create_properties` WHERE (`IsCustom`=0 AND `Id` IN (3680, 6659)); +INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `SpellForVisuals`, `TimeToTargetScale`, `Speed`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `ScriptName`, `VerifiedBuild`) VALUES +(3680, 0, 8352, 0, 0, 0, 0, 0, 0, -1, 0, 0, NULL, 30000, 0, 0, 8, 8, 0, 0, 0, 0, 0, 0, 'at_dh_shattered_souls_havoc_shattered', 60822), -- Spell: 209693 (Shattered Souls) +(6659, 0, 11231, 0, 0, 0, 0, 0, 0, -1, 0, 0, NULL, 30000, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 'at_dh_shattered_souls_havoc_demon', 60822); -- Spell: 209788 (Shattered Souls) + +UPDATE `areatrigger_template` SET `ActionSetFlags`=1,`VerifiedBuild`=60822 WHERE `Id` IN (8352,11231) AND `IsCustom`=0; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=28 AND `SourceGroup` IN (8352,11231) AND `SourceEntry`=0; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `ConditionStringValue1`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(28, 8352, 0, 0, 0, 1, 0, 221461, 0, 0, '', 1, 0, 0, '', 'Only trigger Consume Soul without aura 221461'), +(28, 11231, 0, 0, 0, 1, 0, 221461, 0, 0, '', 1, 0, 0, '', 'Only trigger Consume Soul without aura 221461'); diff --git a/src/server/scripts/Spells/spell_dh.cpp b/src/server/scripts/Spells/spell_dh.cpp index 956892463a2..9772d0637cc 100644 --- a/src/server/scripts/Spells/spell_dh.cpp +++ b/src/server/scripts/Spells/spell_dh.cpp @@ -183,6 +183,10 @@ enum DemonHunterSpells SPELL_DH_SHATTERED_SOUL = 226258, SPELL_DH_SHATTERED_SOUL_LESSER_RIGHT = 228533, SPELL_DH_SHATTERED_SOUL_LESSER_LEFT = 237867, + SPELL_DH_SHATTERED_SOULS_HAVOC = 209651, + SPELL_DH_SHATTERED_SOULS_HAVOC_DEMON_TRIGGER = 226370, + SPELL_DH_SHATTERED_SOULS_HAVOC_SHATTERED_TRIGGER = 209687, + SPELL_DH_SHATTERED_SOULS_MARKER = 221461, SPELL_DH_SHEAR = 203782, SPELL_DH_SIGIL_OF_CHAINS_AREA_SELECTOR = 204834, SPELL_DH_SIGIL_OF_CHAINS_GRIP = 208674, @@ -1594,6 +1598,68 @@ private: int32 _furySpent = 0; }; +// 178940 - Shattered Souls +class spell_dh_shattered_souls_havoc : public AuraScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_DH_SHATTERED_SOULS_HAVOC }); + } + + static void HandleProc(AuraScript const&, AuraEffect const* /*aurEff*/, ProcEventInfo const& eventInfo) + { + Unit* caster = eventInfo.GetActor(); + Unit* target = eventInfo.GetProcTarget(); + + if (!caster || !target) + return; + + target->CastSpell(caster, SPELL_DH_SHATTERED_SOULS_HAVOC, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR); + } + + void Register() override + { + OnEffectProc += AuraEffectProcFn(spell_dh_shattered_souls_havoc::HandleProc, EFFECT_0, SPELL_AURA_DUMMY); + } +}; + +// 209651 - Shattered Souls +class spell_dh_shattered_souls_havoc_trigger : public SpellScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_DH_SHATTERED_SOULS_HAVOC_DEMON_TRIGGER, SPELL_DH_SHATTERED_SOULS_HAVOC_SHATTERED_TRIGGER }); + } + + void HandleSoulFragment(SpellEffIndex /*effIndex*/) const + { + if (Unit* target = GetExplTargetUnit()) + target->CastSpell(GetHitDest()->GetPosition(), GetCaster()->GetCreatureType() == CREATURE_TYPE_DEMON ? SPELL_DH_SHATTERED_SOULS_HAVOC_DEMON_TRIGGER : SPELL_DH_SHATTERED_SOULS_HAVOC_SHATTERED_TRIGGER, CastSpellExtraArgsInit{ + .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR, + .TriggeringSpell = GetSpell() + }); + } + + void Register() override + { + OnEffectLaunch += SpellEffectFn(spell_dh_shattered_souls_havoc_trigger::HandleSoulFragment, EFFECT_1, SPELL_EFFECT_DUMMY); + } +}; + +// 209693 - Shattered Souls and 209788 - Shattered Souls +// Id - 3680 and 6659 +template<uint32 SpellId> +struct at_dh_shattered_souls : public AreaTriggerAI +{ + using AreaTriggerAI::AreaTriggerAI; + + void OnUnitEnter(Unit* unit) override + { + unit->CastSpell(at->GetPosition(), SpellId, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR); + at->Remove(); + } +}; + // 391166 - Soul Furnace class spell_dh_soul_furnace : public AuraScript { @@ -1852,6 +1918,10 @@ void AddSC_demon_hunter_spell_scripts() RegisterSpellScript(spell_dh_repeat_decree_conduit); RegisterSpellScript(spell_dh_restless_hunter); RegisterSpellScript(spell_dh_shattered_destiny); + RegisterSpellScript(spell_dh_shattered_souls_havoc); + RegisterSpellScript(spell_dh_shattered_souls_havoc_trigger); + new GenericAreaTriggerEntityScript<at_dh_shattered_souls<SPELL_DH_CONSUME_SOUL_HAVOC_SHATTERED>>("at_dh_shattered_souls_havoc_shattered"); + new GenericAreaTriggerEntityScript<at_dh_shattered_souls<SPELL_DH_CONSUME_SOUL_HAVOC_DEMON>>("at_dh_shattered_souls_havoc_demon"); RegisterSpellScript(spell_dh_sigil_of_chains); RegisterSpellScriptWithArgs(spell_dh_elysian_decree, "spell_dh_sigil_of_spite", SPELL_DH_SIGIL_OF_SPITE); RegisterSpellScript(spell_dh_student_of_suffering); |
