aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Movement/MotionMaster.h
diff options
context:
space:
mode:
authorccrs <ccrs@users.noreply.github.com>2018-04-23 20:33:14 +0200
committerShauren <shauren.trinity@gmail.com>2021-09-26 14:19:36 +0200
commitd59a6af9c694713fd868db4bae09df3f8b9e041e (patch)
treebb02da6ae140f6e0b80f53bb2179e0a01a021bc9 /src/server/game/Movement/MotionMaster.h
parent334b02e1daeac7be31ed3ce855a5ff221add80aa (diff)
Core/Movement: move MoveSplineInit (#21857)
The number of edge cases in which weirdness is seen on "effect movements" will be kinda reduced, plus consistency, plus movementInform on custom movement spline initalizations. (cherry picked from commit 2a45418032233bc8779cdb44f9be6057c4b417c5)
Diffstat (limited to 'src/server/game/Movement/MotionMaster.h')
-rw-r--r--src/server/game/Movement/MotionMaster.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/server/game/Movement/MotionMaster.h b/src/server/game/Movement/MotionMaster.h
index 92098b90d27..5d78c875c7f 100644
--- a/src/server/game/Movement/MotionMaster.h
+++ b/src/server/game/Movement/MotionMaster.h
@@ -34,6 +34,7 @@ struct WaypointPath;
namespace Movement
{
+ class MoveSplineInit;
struct SpellEffectExtraData;
}
@@ -81,17 +82,14 @@ class TC_GAME_API MotionMaster
void MoveFleeing(Unit* enemy, uint32 time = 0);
void MovePoint(uint32 id, Position const& pos, bool generatePath = true, Optional<float> finalOrient = {});
void MovePoint(uint32 id, float x, float y, float z, bool generatePath = true, Optional<float> finalOrient = {});
-
/* Makes the unit move toward the target until it is at a certain distance from it. The unit then stops.
Only works in 2D.
This method doesn't account for any movement done by the target. in other words, it only works if the target is stationary.
*/
void MoveCloserAndStop(uint32 id, Unit* target, float distance);
-
// These two movement types should only be used with creatures having landing/takeoff animations
void MoveLand(uint32 id, Position const& pos);
void MoveTakeoff(uint32 id, Position const& pos);
-
void MoveCharge(float x, float y, float z, float speed = SPEED_CHARGE, uint32 id = EVENT_CHARGE, bool generatePath = false, Unit const* target = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
void MoveCharge(PathGenerator const& path, float speed = SPEED_CHARGE, Unit const* target = nullptr, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ, Movement::SpellEffectExtraData const* spellEffectExtraData = nullptr);
@@ -105,7 +103,6 @@ class TC_GAME_API MotionMaster
void MoveAlongSplineChain(uint32 pointId, std::vector<SplineChainLink> const& chain, bool walk);
void ResumeSplineChain(SplineChainResumeInfo const& info);
void MoveFall(uint32 id = 0);
-
void MoveSeekAssistance(float x, float y, float z);
void MoveSeekAssistanceDistract(uint32 timer);
void MoveTaxiFlight(uint32 path, uint32 pathnode);
@@ -113,9 +110,9 @@ class TC_GAME_API MotionMaster
void MovePath(uint32 pathId, bool repeatable);
void MovePath(WaypointPath& path, bool repeatable);
void MoveRotate(uint32 time, RotateDirection direction);
-
void MoveFormation(uint32 id, Position destination, uint32 moveType, bool forceRun = false, bool forceOrientation = false);
+ void LaunchMoveSpline(Movement::MoveSplineInit&& init, uint32 id = 0, MovementSlot slot = MOTION_SLOT_ACTIVE, MovementGeneratorType type = EFFECT_MOTION_TYPE);
private:
typedef std::vector<MovementGenerator*> MovementList;