Core/Spell: Proper SPELL_EFFECT_PULL_TOWARDS_DEST implementation for players
* Core/Spell: SPELL_EFFECT_PULL_TOWARDS correction
This commit is contained in:
1 parent
18605adf68
commit
b2af17eb4a
5 files changed
+42
-23
No files matched your search
@@ -13274,15 +13274,18 @@ uint32 Unit::GetModelForTotem(PlayerTotemType totemType)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Unit::JumpTo(float speedXY, float speedZ, bool forward)
|
||||
void Unit::JumpTo(float speedXY, float speedZ, bool forward, Optional<Position> dest)
|
||||
{
|
||||
float angle = forward ? 0 : float(M_PI);
|
||||
if (dest)
|
||||
angle += GetRelativeAngle(*dest);
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT)
|
||||
GetMotionMaster()->MoveJumpTo(angle, speedXY, speedZ);
|
||||
else
|
||||
{
|
||||
float vcos = std::cos(angle+GetOrientation());
|
||||
float vsin = std::sin(angle+GetOrientation());
|
||||
float vcos = std::cos(angle + GetOrientation());
|
||||
float vsin = std::sin(angle + GetOrientation());
|
||||
SendMoveKnockBack(ToPlayer(), speedXY, -speedZ, vcos, vsin);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user