aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2025-01-14 15:03:51 +0100
committerGitHub <noreply@github.com>2025-01-14 15:03:51 +0100
commit15387c6b356132c59529b54fb8952add72674f49 (patch)
tree089334ab26ffed5d2ed8bb9bbe8eed113a62840e
parent1366ab9445206532dfea1154ebd4c2466ff65100 (diff)
Scripts/Spells: Implement demon hunter hero talent "Student of Suffering" (#30568)
-rw-r--r--sql/updates/world/master/2025_01_14_04_world.sql3
-rw-r--r--src/server/scripts/Spells/spell_dh.cpp27
2 files changed, 30 insertions, 0 deletions
diff --git a/sql/updates/world/master/2025_01_14_04_world.sql b/sql/updates/world/master/2025_01_14_04_world.sql
new file mode 100644
index 00000000000..735d8240501
--- /dev/null
+++ b/sql/updates/world/master/2025_01_14_04_world.sql
@@ -0,0 +1,3 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dh_student_of_suffering';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
+(204598, 'spell_dh_student_of_suffering');
diff --git a/src/server/scripts/Spells/spell_dh.cpp b/src/server/scripts/Spells/spell_dh.cpp
index be74f96ced7..71742561a35 100644
--- a/src/server/scripts/Spells/spell_dh.cpp
+++ b/src/server/scripts/Spells/spell_dh.cpp
@@ -188,6 +188,8 @@ enum DemonHunterSpells
SPELL_DH_SPIRIT_BOMB_DAMAGE = 218677,
SPELL_DH_SPIRIT_BOMB_HEAL = 227255,
SPELL_DH_SPIRIT_BOMB_VISUAL = 218678,
+ SPELL_DH_STUDENT_OF_SUFFERING_TALENT = 452412,
+ SPELL_DH_STUDENT_OF_SUFFERING_AURA = 453239,
SPELL_DH_TACTICAL_RETREAT_ENERGIZE = 389890,
SPELL_DH_TACTICAL_RETREAT_TALENT = 389688,
SPELL_DH_THROW_GLAIVE = 185123,
@@ -1168,6 +1170,30 @@ struct areatrigger_dh_sigil_of_chains : AreaTriggerAI
}
};
+// Called by 204598 - Sigil of Flame
+class spell_dh_student_of_suffering : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_DH_STUDENT_OF_SUFFERING_TALENT, SPELL_DH_STUDENT_OF_SUFFERING_AURA });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_DH_STUDENT_OF_SUFFERING_TALENT);
+ }
+
+ void HandleStudentOfSuffering() const
+ {
+ GetCaster()->CastSpell(GetCaster(), SPELL_DH_STUDENT_OF_SUFFERING_AURA, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_dh_student_of_suffering::HandleStudentOfSuffering);
+ }
+};
+
// Called by 198793 - Vengeful Retreat
class spell_dh_tactical_retreat : public SpellScript
{
@@ -1241,6 +1267,7 @@ void AddSC_demon_hunter_spell_scripts()
RegisterSpellScript(spell_dh_restless_hunter);
RegisterSpellScript(spell_dh_shattered_destiny);
RegisterSpellScript(spell_dh_sigil_of_chains);
+ RegisterSpellScript(spell_dh_student_of_suffering);
RegisterSpellScript(spell_dh_tactical_retreat);
RegisterSpellScript(spell_dh_vengeful_retreat_damage);