]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Hero.h
added clear timer function
[l2e.git] / src / battle / Hero.h
index 3274fe21b64d7a2cb373d9a12bce7c061a77abff..97a21c23377d177d855db1bbdcda0194266bbf24 100644 (file)
@@ -15,7 +15,10 @@ namespace common {
        class Item;
        class Spell;
 }
-namespace graphics { class Sprite; }
+namespace graphics {
+       class Animation;
+       class Sprite;
+}
 
 namespace battle {
 
@@ -66,8 +69,10 @@ public:
        bool HasRing() const { return ring; }
        bool HasJewel() const { return jewel; }
 
-       int AttackFrames() const { return attackFrames; }
-       int SpellFrames() const { return spellFrames; }
+       graphics::Animation *AttackAnimation() { return attackAnimation; }
+       const graphics::Animation *AttackAnimation() const { return attackAnimation; }
+       graphics::Animation *SpellAnimation() { return spellAnimation; }
+       const graphics::Animation *SpellAnimation() const { return spellAnimation; }
 
 // temporary setters until loader is implemented
 public:
@@ -90,8 +95,8 @@ public:
 
        void AddSpell(const common::Spell *s) { spells.push_back(s); }
 
-       void SetAttackFrames(int num) { attackFrames = num; }
-       void SetSpellFrames(int num) { spellFrames = num; }
+       void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
+       void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; }
 
 private:
        const char *name;
@@ -104,12 +109,12 @@ private:
        const common::Item *ring;
        const common::Item *jewel;
 
+       graphics::Animation *attackAnimation;
+       graphics::Animation *spellAnimation;
+
        // TODO: vector does not seem to be a good choice
        std::vector<const common::Spell *> spells;
 
-       int attackFrames;
-       int spellFrames;
-
        Uint16 maxHealth, health;
        Uint16 maxMana, mana;