X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcommon%2FHero.h;h=6c03eee0ae4cc7f06adb9b251979599b342354da;hb=ec0841bce8db9b1419dfbbb03ceff9c8502ab755;hp=d78d14958f37344de310847c8be5f3145cb073e9;hpb=06b6411e5dc8fc6b905530f7adbde8bd0c2bb0ea;p=l2e.git diff --git a/src/common/Hero.h b/src/common/Hero.h index d78d149..6c03eee 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() { } @@ -43,6 +47,7 @@ public: const Stats &GetStats() const { return stats; } Uint8 Level() const { return level; } + int Experience() const { return experience; } Item *Weapon() { return weapon; } Item *Armor() { return armor; } @@ -68,11 +73,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 *); @@ -98,6 +105,7 @@ private: Stats stats; int level; + int experience; Item *weapon; Item *armor; @@ -114,7 +122,7 @@ private: graphics::Animation *attackAnimation; graphics::Animation *spellAnimation; - graphics::Sprite *mapSprite; + map::Entity mapEntity; };