]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Hero.h
moved upgrade process to battle class
[l2e.git] / src / common / Hero.h
index aa12b2559cdfe69aa1221847aded744bfbd8549e..1b4c8d10954c3076007d38730a2a622daf900f3d 100644 (file)
@@ -4,6 +4,7 @@
 namespace common {
        class Item;
        class Spell;
+       class Upgrade;
 }
 namespace graphics {
        class Animation;
@@ -37,6 +38,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; }
@@ -60,6 +74,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;
 
@@ -100,6 +116,7 @@ private:
        int level;
        int experience;
 
+       // TODO: ladder should contain hp, mp, and stats mods.
        int *levelLadder;
        int numLevels;