*Handle creature rotation using movement generator. Please tell me if this breaks any script.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-29 17:14:47 -05:00
parent 13eda038fd
commit 69c487abe5
8 changed files with 97 additions and 85 deletions
+16
View File
@@ -36,6 +36,22 @@ class TRINITY_DLL_SPEC IdleMovementGenerator : public MovementGenerator
extern IdleMovementGenerator si_idleMovement;
class TRINITY_DLL_SPEC RotateMovementGenerator : public MovementGenerator
{
public:
explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_direction(direction) {}
void Initialize(Unit& owner);
void Finalize(Unit& owner);
void Reset(Unit& owner) { Initialize(owner); }
bool Update(Unit& owner, const uint32& time_diff);
MovementGeneratorType GetMovementGeneratorType() { return ROTATE_MOTION_TYPE; }
private:
uint32 m_duration;
RotateDirection m_direction;
};
class TRINITY_DLL_SPEC DistractMovementGenerator : public MovementGenerator
{
public: