]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Hero.h
changed battle positions from bottom-center to center
[l2e.git] / src / battle / Hero.h
index 499239d961beefa21410a3464d4e147eb2c86565..e200838487a177cef24e2ea0b200d1a35a99867f 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,6 +69,13 @@ public:
        bool HasRing() const { return ring; }
        bool HasJewel() const { return jewel; }
 
+       graphics::Animation *MeleeAnimation() { return meleeAnimation; }
+       const graphics::Animation *MeleeAnimation() const { return meleeAnimation; }
+       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 +97,10 @@ public:
 
        void AddSpell(const common::Spell *s) { spells.push_back(s); }
 
+       void SetMeleeAnimation(graphics::Animation *a) { meleeAnimation = a; }
+       void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
+       void SetSpellAnimation(graphics::Animation *a) { spellAnimation = a; }
+
 private:
        const char *name;
        graphics::Sprite *sprite;
@@ -98,9 +112,12 @@ private:
        const common::Item *ring;
        const common::Item *jewel;
 
+       graphics::Animation *meleeAnimation;
+       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;