aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2025-08-31 16:01:13 +0200
committerGitHub <noreply@github.com>2025-08-31 16:01:13 +0200
commit0da55e78271b1e14cc4c8780ff71f4f449659e25 (patch)
tree138d33aed9b6cce9e58899fb97a595a1d537fe2f
parent9c89fc957ce8e6d0fc6a7da0352f153a3a3261ec (diff)
Scripts/Spells: Implement hunter talent Entrapment (#31072)
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 5e3d9a6a8cf..72126d29702 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -45,6 +45,8 @@ enum HunterSpells
SPELL_HUNTER_CONCUSSIVE_SHOT = 5116,
SPELL_HUNTER_EMERGENCY_SALVE_TALENT = 459517,
SPELL_HUNTER_EMERGENCY_SALVE_DISPEL = 459521,
+ SPELL_HUNTER_ENTRAPMENT_TALENT = 393344,
+ SPELL_HUNTER_ENTRAPMENT_ROOT = 393456,
SPELL_HUNTER_EXHILARATION = 109304,
SPELL_HUNTER_EXHILARATION_PET = 128594,
SPELL_HUNTER_EXHILARATION_R2 = 231546,
@@ -1162,11 +1164,22 @@ struct areatrigger_hun_tar_trap : AreaTriggerAI
{
using AreaTriggerAI::AreaTriggerAI;
+ void OnCreate(Spell const* /*creatingSpell*/) override
+ {
+ if (Unit* caster = at->GetCaster())
+ {
+ if (caster->HasAura(SPELL_HUNTER_ENTRAPMENT_TALENT))
+ caster->CastSpell(at->GetPosition(), SPELL_HUNTER_ENTRAPMENT_ROOT, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
+ }
+
void OnUnitEnter(Unit* unit) override
{
if (Unit* caster = at->GetCaster())
+ {
if (caster->IsValidAttackTarget(unit))
caster->CastSpell(unit, SPELL_HUNTER_TAR_TRAP_SLOW, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ }
}
void OnUnitExit(Unit* unit) override