]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Hero.h
put stat increments in level ladder
[l2e.git] / src / common / Hero.h
index 623e2c4965fabbaaadc45efb3dbd3e47a7dd6149..a0f1da47fc0af02833cc10f6bb00033d9de89afa 100644 (file)
@@ -1,9 +1,18 @@
 #ifndef COMMON_HERO_H_
 #define COMMON_HERO_H_
 
-#include "fwd.h"
+namespace common {
+       class Item;
+       class LevelUp;
+       class Spell;
+       class Upgrade;
+}
+namespace graphics {
+       class Animation;
+       class Sprite;
+}
+
 #include "Stats.h"
-#include "../graphics/fwd.h"
 #include "../map/Entity.h"
 
 #include <vector>
@@ -30,6 +39,19 @@ public:
                EQUIP_COUNT,
        };
 
+       enum UpgradeType {
+               UPGRADE_LVL,
+               UPGRADE_MHP,
+               UPGRADE_MMP,
+               UPGRADE_ATK,
+               UPGRADE_DFP,
+               UPGRADE_STR,
+               UPGRADE_AGL,
+               UPGRADE_INT,
+               UPGRADE_GUT,
+               UPGRADE_MGR,
+       };
+
        const char *Name() const { return name; }
 
        Uint16 MaxHealth() const { return maxHealth; }
@@ -53,6 +75,8 @@ public:
        int Experience() const { return experience; }
        int NextLevel() const;
 
+       void AddExperience(int, std::vector<Upgrade> &);
+
        bool CanEquip(const Item &) const;
        bool CanInvoke(const Spell &) const;
 
@@ -76,8 +100,9 @@ public:
        static void CreateTypeDescription();
        static void Construct(void *);
 
-// temporary setters
 public:
+       void SetMaxHealth(int h) { maxHealth = h; }
+       void SetHealth(int h) { health = h; }
        void AddSpell(Spell *s) { spells.push_back(s); }
 
 private:
@@ -92,7 +117,7 @@ private:
        int level;
        int experience;
 
-       int *levelLadder;
+       LevelUp *levelLadder;
        int numLevels;
 
        int useMask;
@@ -113,4 +138,4 @@ private:
 
 }
 
-#endif /* COMMON_HERO_H_ */
+#endif