aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-06-06 00:20:31 +0200
committerShauren <shauren.trinity@gmail.com>2025-06-06 00:20:31 +0200
commit1e23aed35d5d7f763705271c40b7ba9008501cf3 (patch)
treecddc0418ef77d64cfde76b8707dba225b3edc0fd
parentec08da5b04ef7447a8453b4950e494a1017660aa (diff)
Scripts/Spells: Improved Glyph of the Blazing Trail visual
-rw-r--r--src/server/scripts/Spells/spell_warrior.cpp17
1 files changed, 12 insertions, 5 deletions
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);
}
}
}