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:
hondacrx
2022-02-17 13:33:30 -05:00
parent ea2ea83ee9
commit f84ca3d6d7
+1 -1
View File
@@ -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);