]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Hero.h
switched to static type IDs
[l2e.git] / src / common / Hero.h
index d78d14958f37344de310847c8be5f3145cb073e9..ca4651c947d66003583879145d4b44b4c304b9c7 100644 (file)
@@ -11,6 +11,7 @@
 #include "fwd.h"
 #include "Stats.h"
 #include "../graphics/fwd.h"
+#include "../map/Entity.h"
 
 #include <vector>
 
@@ -18,6 +19,9 @@ namespace common {
 
 class Hero {
 
+public:
+       static const int TYPE_ID = 301;
+
 public:
        Hero();
        ~Hero() { }
@@ -72,7 +76,8 @@ public:
        graphics::Animation *AttackAnimation() { return attackAnimation; }
        graphics::Animation *SpellAnimation() { return spellAnimation; }
 
-       graphics::Sprite *MapSprite() { return mapSprite; }
+       map::Entity &MapEntity() { return mapEntity; }
+       const map::Entity &MapEntity() const { return mapEntity; }
 
        static void CreateTypeDescription();
        static void Construct(void *);
@@ -114,7 +119,7 @@ private:
        graphics::Animation *attackAnimation;
        graphics::Animation *spellAnimation;
 
-       graphics::Sprite *mapSprite;
+       map::Entity mapEntity;
 
 };