]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Hero.h
renamed BattleState's background functions
[l2e.git] / src / battle / Hero.h
index 60bca6dd544d009462d492ed7f0da9caf53a8327..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 {
 
@@ -41,7 +44,7 @@ public:
        int RelativeMana(int max) const { return MaxMana() == 0 ? 0 : Mana() * max / MaxMana(); }
        bool CanUseMagic() const { return MaxMana() > 0; }
 
-       Uint8 MaxIP() const { return 100; }
+       Uint8 MaxIP() const { return 255; }
        Uint8 IP() const { return ip; }
        int RelativeIP(int max) const { return IP() * max / MaxIP(); }
 
@@ -66,6 +69,11 @@ public:
        bool HasRing() const { return ring; }
        bool HasJewel() const { return jewel; }
 
+       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:
        void SetName(const char *n) { name = n; }
@@ -87,6 +95,9 @@ public:
 
        void AddSpell(const common::Spell *s) { spells.push_back(s); }
 
+       void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
+       void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; }
+
 private:
        const char *name;
        graphics::Sprite *sprite;
@@ -98,9 +109,11 @@ 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;
-       // TODO: equipment list
 
        Uint16 maxHealth, health;
        Uint16 maxMana, mana;