mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user