diff options
| author | Shauren <shauren.trinity@gmail.com> | 2025-01-10 21:22:28 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2025-01-10 21:22:28 +0100 |
| commit | 069771e22ef29e47298c62e6cb9d7dce72375348 (patch) | |
| tree | 4cfd5dbb536d04831f5e3c6ad8f8ec763dc38125 /src/server/scripts/Shadowlands | |
| parent | 84b0eca4476faa68d9cf06431bc60c9a61c6152f (diff) | |
Core/AreaTriggers: Replace fixed movement times in database for areatriggers with speed
Diffstat (limited to 'src/server/scripts/Shadowlands')
| -rw-r--r-- | src/server/scripts/Shadowlands/SepulcherOfTheFirstOnes/boss_anduin_wrynn.cpp | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/server/scripts/Shadowlands/SepulcherOfTheFirstOnes/boss_anduin_wrynn.cpp b/src/server/scripts/Shadowlands/SepulcherOfTheFirstOnes/boss_anduin_wrynn.cpp index 871c4d33bef..8ec595ede47 100644 --- a/src/server/scripts/Shadowlands/SepulcherOfTheFirstOnes/boss_anduin_wrynn.cpp +++ b/src/server/scripts/Shadowlands/SepulcherOfTheFirstOnes/boss_anduin_wrynn.cpp @@ -2922,24 +2922,13 @@ class spell_anduin_wrynn_wicked_star_selector_AuraScript : public AuraScript } }; +// 365017 - Wicked Star CreatePropertiesId: 24322 +// 365017 - Wicked Star CreatePropertiesId: 24740 // 365017 - Wicked Star CreatePropertiesId: 24741 struct at_anduin_wrynn_wicked_star : AreaTriggerAI { at_anduin_wrynn_wicked_star(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) { } - static constexpr float GetWickedStarSpeed(Difficulty difficulty) - { - // in yards per second - switch (difficulty) - { - case DIFFICULTY_HEROIC_RAID: - case DIFFICULTY_MYTHIC_RAID: - return 18.0f; - default: // LFR + Normal - return 15.0f; - } - } - void OnInitialize() override { if (Unit* caster = at->GetCaster()) @@ -2951,13 +2940,10 @@ struct at_anduin_wrynn_wicked_star : AreaTriggerAI std::vector<G3D::Vector3> splinePoints; splinePoints.push_back(PositionToVector3(at->GetPosition())); - splinePoints.push_back(PositionToVector3(at->GetPosition())); splinePoints.push_back(PositionToVector3(destPos)); splinePoints.push_back(PositionToVector3(at->GetPosition())); - splinePoints.push_back(PositionToVector3(at->GetPosition())); - float timeToTarget = at->GetDistance(destPos.GetPositionX(), destPos.GetPositionY(), destPos.GetPositionZ()) * 2 / GetWickedStarSpeed(at->GetMap()->GetDifficultyID()) * 1000; - at->InitSplines(splinePoints, timeToTarget); + at->InitSplines(splinePoints); } } @@ -2972,9 +2958,9 @@ struct at_anduin_wrynn_wicked_star : AreaTriggerAI return; if (caster->IsValidAttackTarget(unit)) - caster->CastSpell(unit, SPELL_WICKED_STAR_DAMAGE_SILENCE, CastSpellExtraArgs(TriggerCastFlags(TRIGGERED_IGNORE_GCD | TRIGGERED_IGNORE_CAST_IN_PROGRESS))); + caster->CastSpell(unit, SPELL_WICKED_STAR_DAMAGE_SILENCE, TRIGGERED_IGNORE_GCD | TRIGGERED_IGNORE_CAST_IN_PROGRESS); else if (caster->IsValidAssistTarget(unit)) - caster->CastSpell(unit, SPELL_WICKED_STAR_EMPOWERMENT, CastSpellExtraArgs(TriggerCastFlags(TRIGGERED_IGNORE_GCD | TRIGGERED_IGNORE_CAST_IN_PROGRESS))); + caster->CastSpell(unit, SPELL_WICKED_STAR_EMPOWERMENT, TRIGGERED_IGNORE_GCD | TRIGGERED_IGNORE_CAST_IN_PROGRESS); } void OnDestinationReached() override @@ -3002,8 +2988,6 @@ struct at_anduin_wrynn_empowered_wicked_star : public at_anduin_wrynn_wicked_sta { at_anduin_wrynn_empowered_wicked_star(AreaTrigger* areatrigger) : at_anduin_wrynn_wicked_star(areatrigger) { } - static float constexpr EMPOWERED_WICKED_STAR_SPEED = 14.0f; // in yards per second - void HandleMovement(float angle) const { Unit* caster = at->GetCaster(); @@ -3016,12 +3000,9 @@ struct at_anduin_wrynn_empowered_wicked_star : public at_anduin_wrynn_wicked_sta std::vector<G3D::Vector3> splinePoints; splinePoints.push_back(PositionToVector3(at)); - splinePoints.push_back(PositionToVector3(at)); - splinePoints.push_back(PositionToVector3(destPos)); splinePoints.push_back(PositionToVector3(destPos)); - float timeToTarget = at->GetDistance(destPos.GetPositionX(), destPos.GetPositionY(), destPos.GetPositionZ()) / EMPOWERED_WICKED_STAR_SPEED * 1000; - at->InitSplines(splinePoints, timeToTarget); + at->InitSplines(splinePoints); } void OnInitialize() override |
