mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Spells: Implement demon hunter talent "Glaive Tempest" (#30551)
This commit is contained in:
7
sql/updates/world/master/2025_01_17_02_world.sql
Normal file
7
sql/updates/world/master/2025_01_17_02_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `areatrigger_template` WHERE (`Id`=26042 AND `IsCustom`=0);
|
||||
INSERT INTO `areatrigger_template` (`Id`, `IsCustom`, `Flags`, `VerifiedBuild`) VALUES
|
||||
(26042, 0, 0, 58187);
|
||||
|
||||
DELETE FROM `areatrigger_create_properties` WHERE (`Id`=21832 AND `IsCustom`=0);
|
||||
INSERT INTO `areatrigger_create_properties` (`Id`, `IsCustom`, `AreaTriggerId`, `IsAreatriggerCustom`, `Flags`, `MoveCurveId`, `ScaleCurveId`, `MorphCurveId`, `FacingCurveId`, `AnimId`, `AnimKitId`, `DecalPropertiesId`, `SpellForVisuals`, `TimeToTargetScale`, `Shape`, `ShapeData0`, `ShapeData1`, `ShapeData2`, `ShapeData3`, `ShapeData4`, `ShapeData5`, `ShapeData6`, `ShapeData7`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(21832, 0, 26042, 0, 0, 21753, 0, 0, 0, -1, 0, 0, NULL, 2452, 4, 6, 6, 4, 4, 0.3, 0.3, 0, 0, 'at_dh_glaive_tempest', 58187); -- Spell: 342817 (Glaive Tempest)
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "SpellHistory.h"
|
||||
#include "SpellMgr.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TaskScheduler.h"
|
||||
#include "Unit.h"
|
||||
|
||||
enum DemonHunterSpells
|
||||
@@ -126,6 +127,7 @@ enum DemonHunterSpells
|
||||
SPELL_DH_FURIOUS_GAZE = 343311,
|
||||
SPELL_DH_FURIOUS_GAZE_BUFF = 343312,
|
||||
SPELL_DH_FURIOUS_THROWS = 393029,
|
||||
SPELL_DH_GLAIVE_TEMPEST = 342857,
|
||||
SPELL_DH_GLIDE = 131347,
|
||||
SPELL_DH_GLIDE_DURATION = 197154,
|
||||
SPELL_DH_GLIDE_KNOCKBACK = 196353,
|
||||
@@ -931,6 +933,36 @@ class spell_dh_furious_gaze : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 342817 - Glaive Tempest
|
||||
// ID - 21832
|
||||
struct at_dh_glaive_tempest : AreaTriggerAI
|
||||
{
|
||||
using AreaTriggerAI::AreaTriggerAI;
|
||||
|
||||
void OnCreate(Spell const* /*creatingSpell*/) override
|
||||
{
|
||||
_scheduler.Schedule(0ms, [this](TaskContext task)
|
||||
{
|
||||
std::chrono::duration<float> period = 500ms; // 500ms, affected by haste
|
||||
if (Unit* caster = at->GetCaster())
|
||||
{
|
||||
period *= *caster->m_unitData->ModHaste;
|
||||
caster->CastSpell(at->GetPosition(), SPELL_DH_GLAIVE_TEMPEST, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
caster->CastSpell(at->GetPosition(), SPELL_DH_GLAIVE_TEMPEST, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
|
||||
}
|
||||
task.Repeat(duration_cast<Milliseconds>(period));
|
||||
});
|
||||
}
|
||||
|
||||
void OnUpdate(uint32 diff) override
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
|
||||
// Called by 162264 - Metamorphosis
|
||||
class spell_dh_inner_demon : public AuraScript
|
||||
{
|
||||
@@ -1465,6 +1497,7 @@ void AddSC_demon_hunter_spell_scripts()
|
||||
RegisterSpellScript(spell_dh_felblade_cooldown_reset_proc);
|
||||
RegisterSpellScript(spell_dh_fiery_brand);
|
||||
RegisterSpellScript(spell_dh_furious_gaze);
|
||||
RegisterAreaTriggerAI(at_dh_glaive_tempest);
|
||||
RegisterSpellScript(spell_dh_inner_demon);
|
||||
RegisterAreaTriggerAI(at_dh_inner_demon);
|
||||
RegisterSpellScript(spell_dh_know_your_enemy);
|
||||
|
||||
Reference in New Issue
Block a user