From 1e23aed35d5d7f763705271c40b7ba9008501cf3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 6 Jun 2025 00:20:31 +0200 Subject: Scripts/Spells: Improved Glyph of the Blazing Trail visual --- src/server/scripts/Spells/spell_warrior.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index b4cedfca9d3..fcdb4adf218 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -177,13 +177,20 @@ class spell_warr_charge_drop_fire_periodic : public AuraScript void DropFireVisual(AuraEffect const* aurEff) { PreventDefaultAction(); - if (GetTarget()->IsSplineEnabled()) + + Unit* target = GetTarget(); + if (target->IsSplineEnabled()) { - for (uint32 i = 0; i < 5; ++i) + Movement::Location from = target->movespline->ComputePosition(); + Movement::Location to = target->movespline->ComputePosition(aurEff->GetPeriod()); + + int32 fireCount = std::lround((to - from).length()); + + for (int32 i = 0; i < fireCount; ++i) { - int32 timeOffset = 6 * i * aurEff->GetPeriod() / 25; - Movement::Location loc = GetTarget()->movespline->ComputePosition(timeOffset); - GetTarget()->SendPlaySpellVisual(Position(loc.x, loc.y, loc.z), SPELL_VISUAL_BLAZING_CHARGE, 0, 0, 1.f, true); + int32 timeOffset = i * aurEff->GetPeriod() / fireCount; + Movement::Location loc = target->movespline->ComputePosition(timeOffset); + target->SendPlaySpellVisual(Position(loc.x, loc.y, loc.z), SPELL_VISUAL_BLAZING_CHARGE, 0, 0, 1.f, true); } } } -- cgit v1.2.3