]> git.localhorst.tv Git - l2e.git/blobdiff - src/battle/Hero.h
added spells
[l2e.git] / src / battle / Hero.h
index 69db286c74d32fb69fa64a8ffe575439e90c0d4b..03f909519400ffac8685e92b9b97301fd29425ae 100644 (file)
@@ -8,8 +8,10 @@
 #ifndef BATTLE_HERO_H_
 #define BATTLE_HERO_H_
 
+#include <vector>
 #include <SDL.h>
 
+namespace common { class Spell; }
 namespace graphics { class Sprite; }
 
 namespace battle {
@@ -25,6 +27,8 @@ public:
        Uint8 Level() const { return level; }
        const graphics::Sprite *Sprite() const { return sprite; }
 
+       const std::vector<const common::Spell *> &Spells() const { return spells; }
+
        Uint16 MaxHealth() const { return maxHealth; }
        Uint16 Health() const { return health; }
        int RelativeHealth(int max) const { return health * max / maxHealth; }
@@ -56,10 +60,15 @@ public:
        void SetMana(Uint16 m) { mana = m; }
        void SetIP(Uint8 i) { ip = i; }
 
+       void AddSpell(const common::Spell *s) { spells.push_back(s); }
+
 private:
        const char *name;
        graphics::Sprite *sprite;
-       // TODO: equipment and spells lists
+
+       // 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;