mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-03 15:47:04 +01:00
Core/Spell: SPELL_EFFECT_PULL_TOWARDS correction (#24251)
* SPELL_EFFECT_PULL_TOWARDS correction
* Hi Appveyor
(cherry picked from commit b88881f8ad)
This commit is contained in:
@@ -4002,12 +4002,15 @@ void Spell::EffectPullTowards()
|
||||
if (!unitTarget)
|
||||
return;
|
||||
|
||||
float speedXY = effectInfo->MiscValue / 10.0f;
|
||||
float speedZ = damage / 10.0f;
|
||||
Position pos;
|
||||
pos.Relocate(m_caster);
|
||||
Position pos = m_caster->GetFirstCollisionPosition(m_caster->GetCombatReach(), m_caster->GetRelativeAngle(unitTarget));
|
||||
|
||||
unitTarget->GetMotionMaster()->MoveJump(pos, speedXY, speedZ);
|
||||
// This is a blizzlike mistake: this should be 2D distance according to projectile motion formulas, but Blizzard erroneously used 3D distance.
|
||||
float distXY = unitTarget->GetExactDist(pos);
|
||||
float distZ = pos.GetPositionZ() - unitTarget->GetPositionZ();
|
||||
float speedXY = effectInfo->MiscValue ? effectInfo->MiscValue / 10.0f : 30.0f;
|
||||
float speedZ = (2 * speedXY * speedXY * distZ + Movement::gravity * distXY * distXY) / (2 * speedXY * distXY);
|
||||
|
||||
unitTarget->JumpTo(speedXY, speedZ, true, pos);
|
||||
}
|
||||
|
||||
void Spell::EffectPullTowardsDest()
|
||||
|
||||
Reference in New Issue
Block a user