*Backed out changeset 3be01fb200a5

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-17 15:51:44 -07:00
parent 26b5e033ff
commit e585187b24
2257 changed files with 103863 additions and 761 deletions
+14
View File
@@ -17,51 +17,65 @@
* 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_IDLEMOVEMENTGENERATOR_H
#define TRINITY_IDLEMOVEMENTGENERATOR_H
#include "MovementGenerator.h"
class TRINITY_DLL_SPEC IdleMovementGenerator : public MovementGenerator
{
public:
void Initialize(Unit &);
void Finalize(Unit &) { }
void Reset(Unit &);
bool Update(Unit &, const uint32 &) { return true; }
MovementGeneratorType GetMovementGeneratorType() { return IDLE_MOTION_TYPE; }
};
extern IdleMovementGenerator si_idleMovement;
class TRINITY_DLL_SPEC RotateMovementGenerator : public MovementGenerator
{
public:
explicit RotateMovementGenerator(uint32 time, RotateDirection direction) : m_duration(time), m_maxDuration(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, m_maxDuration;
RotateDirection m_direction;
};
class TRINITY_DLL_SPEC DistractMovementGenerator : public MovementGenerator
{
public:
explicit DistractMovementGenerator(uint32 timer) : m_timer(timer) {}
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 DISTRACT_MOTION_TYPE; }
private:
uint32 m_timer;
};
class MANGOS_DLL_SPEC AssistanceDistractMovementGenerator : public DistractMovementGenerator
{
public:
AssistanceDistractMovementGenerator(uint32 timer) :
DistractMovementGenerator(timer) {}
MovementGeneratorType GetMovementGeneratorType() { return ASSISTANCE_DISTRACT_MOTION_TYPE; }
void Finalize(Unit& unit);
};
#endif