aboutsummaryrefslogtreecommitdiff
path: root/src/game/MovementGenerator.h
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-17 15:35:07 -0700
committermaximius <none@none>2009-10-17 15:35:07 -0700
commit26b5e033ffde3d161382fc9addbfa99738379641 (patch)
treea344f369ca32945f787a02dee35c3dbe342bed7e /src/game/MovementGenerator.h
parentf21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff)
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
Diffstat (limited to 'src/game/MovementGenerator.h')
-rw-r--r--src/game/MovementGenerator.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/game/MovementGenerator.h b/src/game/MovementGenerator.h
index cb352b7f1c6..270479bfa29 100644
--- a/src/game/MovementGenerator.h
+++ b/src/game/MovementGenerator.h
@@ -17,38 +17,27 @@
* 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_MOVEMENTGENERATOR_H
#define TRINITY_MOVEMENTGENERATOR_H
-
#include "Platform/Define.h"
#include "Policies/Singleton.h"
#include "Dynamic/ObjectRegistry.h"
#include "Dynamic/FactoryHolder.h"
#include "Common.h"
#include "MotionMaster.h"
-
class Unit;
-
class TRINITY_DLL_SPEC MovementGenerator
{
public:
virtual ~MovementGenerator();
-
virtual void Initialize(Unit &) = 0;
virtual void Finalize(Unit &) = 0;
-
virtual void Reset(Unit &) = 0;
-
virtual bool Update(Unit &, const uint32 &time_diff) = 0;
-
virtual MovementGeneratorType GetMovementGeneratorType() = 0;
-
virtual void unitSpeedChanged() { }
-
virtual bool GetDestination(float& /*x*/, float& /*y*/, float& /*z*/) const { return false; }
};
-
template<class T, class D>
class TRINITY_DLL_SPEC MovementGeneratorMedium : public MovementGenerator
{
@@ -80,20 +69,16 @@ class TRINITY_DLL_SPEC MovementGeneratorMedium : public MovementGenerator
void Reset(T &u);
bool Update(T &u, const uint32 &time_diff);
};
-
struct SelectableMovement : public FactoryHolder<MovementGenerator,MovementGeneratorType>
{
SelectableMovement(MovementGeneratorType mgt) : FactoryHolder<MovementGenerator,MovementGeneratorType>(mgt) {}
};
-
template<class REAL_MOVEMENT>
struct MovementGeneratorFactory : public SelectableMovement
{
MovementGeneratorFactory(MovementGeneratorType mgt) : SelectableMovement(mgt) {}
-
MovementGenerator* Create(void *) const;
};
-
typedef FactoryHolder<MovementGenerator,MovementGeneratorType> MovementGeneratorCreator;
typedef FactoryHolder<MovementGenerator,MovementGeneratorType>::FactoryHolderRegistry MovementGeneratorRegistry;
typedef FactoryHolder<MovementGenerator,MovementGeneratorType>::FactoryHolderRepository MovementGeneratorRepository;