Core/Spell: Proper SPELL_EFFECT_PULL_TOWARDS_DEST implementation for players

Port From (https://github.com/TrinityCore/TrinityCore/commit/8ec51bf3b69b2d34607b555f2d52b09f8b73c9e3)
This commit is contained in:
hondacrx
2022-01-07 11:16:51 -05:00
parent b30ded6189
commit ddbfe81071
2 changed files with 33 additions and 24 deletions
+4 -1
View File
@@ -395,9 +395,12 @@ namespace Game.Entities
return true;
}
public void JumpTo(float speedXY, float speedZ, bool forward)
public void JumpTo(float speedXY, float speedZ, bool forward, Position dest = null)
{
float angle = forward ? 0 : MathFunctions.PI;
if (dest != null)
angle += GetRelativeAngle(dest);
if (IsTypeId(TypeId.Unit))
GetMotionMaster().MoveJumpTo(angle, speedXY, speedZ);
else