Core/Movement: Use MotionMaster::MoveKnockbackFrom for creatures hit by SPELL_EFFECT_LEAP_BACK, SPELL_EFFECT_PULL_TOWARDS and SPELL_EFFECT_PULL_TOWARDS_DEST

This commit is contained in:
Shauren
2025-11-18 18:05:33 +01:00
parent 71ebbc60cc
commit 7c5e6f695d
5 changed files with 12 additions and 45 deletions

View File

@@ -4072,8 +4072,9 @@ void Spell::EffectLeapBack()
float speedxy = effectInfo->MiscValue / 10.f;
float speedz = damage / 10.f;
// Disengage
unitTarget->JumpTo(speedxy, speedz, effectInfo->PositionFacing);
unitTarget->KnockbackFrom(unitTarget->GetPosition(), speedxy, speedz, effectInfo->PositionFacing);
// changes fall time
if (m_caster->GetTypeId() == TYPEID_PLAYER)
@@ -4162,7 +4163,7 @@ void Spell::EffectPullTowards()
return;
}
unitTarget->JumpTo(speedXY, speedZ, 0.0f, pos);
unitTarget->KnockbackFrom(unitTarget->GetPosition(), speedXY, speedZ, unitTarget->GetRelativeAngle(pos));
}
void Spell::EffectPullTowardsDest()
@@ -4198,7 +4199,7 @@ void Spell::EffectPullTowardsDest()
return;
}
unitTarget->JumpTo(speedXY, speedZ, 0.0f, *pos);
unitTarget->KnockbackFrom(unitTarget->GetPosition(), speedXY, speedZ, unitTarget->GetRelativeAngle(pos));
}
void Spell::EffectChangeRaidMarker()