Scripts/Spells: Improved Glyph of the Blazing Trail visual

This commit is contained in:
Shauren
2025-06-06 00:20:31 +02:00
parent ec08da5b04
commit 1e23aed35d

View File

@@ -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);
}
}
}