From f84ca3d6d728f61c2c739f8c12e77daec0fab03b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Thu, 17 Feb 2022 13:33:30 -0500 Subject: [PATCH] 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) --- Source/Game/Spells/SpellEffects.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index e21d45a87..846c5945b 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -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);