aboutsummaryrefslogtreecommitdiff
path: root/src/game/PointMovementGenerator.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:51:44 -0700
committermaximius <none@none>2009-10-17 15:51:44 -0700
commite585187b248f48b3c6e9247b49fa07c6565d65e5 (patch)
tree637c5b7ddacf41040bef4ea4f75a97da64c6a9bc /src/game/PointMovementGenerator.h
parent26b5e033ffde3d161382fc9addbfa99738379641 (diff)
*Backed out changeset 3be01fb200a5
--HG-- branch : trunk
Diffstat (limited to 'src/game/PointMovementGenerator.h')
-rw-r--r--src/game/PointMovementGenerator.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/PointMovementGenerator.h b/src/game/PointMovementGenerator.h
index 1c07d580600..baeb8b26dbd 100644
--- a/src/game/PointMovementGenerator.h
+++ b/src/game/PointMovementGenerator.h
@@ -17,12 +17,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+
#ifndef TRINITY_POINTMOVEMENTGENERATOR_H
#define TRINITY_POINTMOVEMENTGENERATOR_H
+
#include "MovementGenerator.h"
#include "DestinationHolder.h"
#include "Traveller.h"
#include "FollowerReference.h"
+
template<class T>
class TRINITY_DLL_SPEC PointMovementGenerator
: public MovementGeneratorMedium< T, PointMovementGenerator<T> >
@@ -30,12 +33,16 @@ class TRINITY_DLL_SPEC PointMovementGenerator
public:
PointMovementGenerator(uint32 _id, float _x, float _y, float _z) : id(_id),
i_x(_x), i_y(_y), i_z(_z), i_nextMoveTime(0), arrived(false) {}
+
void Initialize(T &);
void Finalize(T &unit);
void Reset(T &unit){unit.StopMoving();}
bool Update(T &, const uint32 &diff);
+
void MovementInform(T &);
+
MovementGeneratorType GetMovementGeneratorType() { return POINT_MOTION_TYPE; }
+
bool GetDestination(float& x, float& y, float& z) const { x=i_x; y=i_y; z=i_z; return true; }
private:
uint32 id;
@@ -44,14 +51,17 @@ class TRINITY_DLL_SPEC PointMovementGenerator
DestinationHolder< Traveller<T> > i_destinationHolder;
bool arrived;
};
+
class MANGOS_DLL_SPEC AssistanceMovementGenerator
: public PointMovementGenerator<Creature>
{
public:
AssistanceMovementGenerator(float _x, float _y, float _z) :
PointMovementGenerator<Creature>(0, _x, _y, _z) {}
+
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_MOTION_TYPE; }
void Finalize(Unit &);
};
+
#endif