diff options
author | joschiwald <joschiwald.trinity@gmail.com> | 2015-08-23 14:43:11 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2015-08-23 14:43:11 +0200 |
commit | df21162fe44d2ff29c201a9004586f560789c38b (patch) | |
tree | 5ba7d971af1c49ddbb6be895e8eab460d6188a14 /src/server/game/Movement/MotionMaster.cpp | |
parent | 68e6c95f16dc978066bb957407a1c3bfd4cb8505 (diff) |
Scripts/VioletHold: rewrote the whole instance
thanks @MitchesD for help
Diffstat (limited to 'src/server/game/Movement/MotionMaster.cpp')
-rw-r--r-- | src/server/game/Movement/MotionMaster.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/server/game/Movement/MotionMaster.cpp b/src/server/game/Movement/MotionMaster.cpp index 2b323e196a7..b69322f5720 100644 --- a/src/server/game/Movement/MotionMaster.cpp +++ b/src/server/game/Movement/MotionMaster.cpp @@ -423,6 +423,24 @@ void MotionMaster::MoveCirclePath(float x, float y, float z, float radius, bool init.Launch(); } +void MotionMaster::MoveSmoothPath(uint32 pointId, G3D::Vector3 const* pathPoints, size_t pathSize, bool walk) +{ + Movement::PointsArray path(pathPoints, pathPoints + pathSize); + + Movement::MoveSplineInit init(_owner); + init.MovebyPath(path); + init.SetSmooth(); + init.SetWalk(walk); + init.Launch(); + + // This code is not correct + // EffectMovementGenerator does not affect UNIT_STATE_ROAMING | UNIT_STATE_ROAMING_MOVE + // need to call PointMovementGenerator with various pointIds + Mutate(new EffectMovementGenerator(pointId), MOTION_SLOT_ACTIVE); + //Position pos(pathPoints[pathSize - 1].x, pathPoints[pathSize - 1].y, pathPoints[pathSize - 1].z); + //MovePoint(EVENT_CHARGE_PREPATH, pos, false); +} + void MotionMaster::MoveFall(uint32 id /*=0*/) { // use larger distance for vmap height search than in most other cases |