X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FHero.h;h=b12e8f5b50c8e3ae719814d42c638f08ed057c0d;hb=7651db1476453d8d4162e8708265a36c1a3c0441;hp=d78d14958f37344de310847c8be5f3145cb073e9;hpb=06b6411e5dc8fc6b905530f7adbde8bd0c2bb0ea;p=l2e.git diff --git a/src/common/Hero.h b/src/common/Hero.h index d78d149..b12e8f5 100644 --- a/src/common/Hero.h +++ b/src/common/Hero.h @@ -11,6 +11,7 @@ #include "fwd.h" #include "Stats.h" #include "../graphics/fwd.h" +#include "../map/Entity.h" #include @@ -18,6 +19,9 @@ namespace common { class Hero { +public: + static const int TYPE_ID = 301; + public: Hero(); ~Hero() { } @@ -68,11 +72,13 @@ public: const std::vector &Spells() const { return spells; } graphics::Sprite *BattleSprite() { return battleSprite; } + const graphics::Sprite *BattleSprite() const { return battleSprite; } graphics::Animation *MeleeAnimation() { return meleeAnimation; } 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 +120,7 @@ private: graphics::Animation *attackAnimation; graphics::Animation *spellAnimation; - graphics::Sprite *mapSprite; + map::Entity mapEntity; };