Core/Spells: fixed a possible client crash when casting pull towards dest spells with misc value 0
Port From (https://github.com/TrinityCore/TrinityCore/commit/fb7a60d49d1b545e09274e396e3f740359295c23)
This commit is contained in:
@@ -3790,7 +3790,7 @@ namespace Game.Spells
|
||||
float distXY = unitTarget.GetExactDist(pos);
|
||||
float distZ = pos.GetPositionZ() - unitTarget.GetPositionZ();
|
||||
|
||||
float speedXY = effectInfo.MiscValue / 10.0f;
|
||||
float speedXY = effectInfo.MiscValue != 0 ? effectInfo.MiscValue / 10.0f : 30.0f;
|
||||
float speedZ = (float)((2 * speedXY * speedXY * distZ + MotionMaster.gravity * distXY * distXY) / (2 * speedXY * distXY));
|
||||
|
||||
unitTarget.JumpTo(speedXY, speedZ, true, pos);
|
||||
|
||||
Reference in New Issue
Block a user