]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Hero.h
feed victory messages from upgrade
[l2e.git] / src / common / Hero.h
index 7014331b844b6cad7586edf7cc9bc1c5c7b08464..2016396a4458d605c58c0d7fc77919c17f407791 100644 (file)
@@ -37,6 +37,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 +73,14 @@ public:
        int Experience() const { return experience; }
        int NextLevel() const;
 
+       struct UpgradeInfo {
+               UpgradeType type;
+               int amount;
+               UpgradeInfo(UpgradeType t, int a = 0)
+               : type(t), amount(a) { }
+       };
+       void AddExperience(int, std::vector<UpgradeInfo> &);
+
        bool CanEquip(const Item &) const;
        bool CanInvoke(const Spell &) const;
 
@@ -83,8 +104,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:
@@ -99,6 +121,7 @@ private:
        int level;
        int experience;
 
+       // TODO: ladder should contain hp, mp, and stats mods.
        int *levelLadder;
        int numLevels;
 
@@ -120,4 +143,4 @@ private:
 
 }
 
-#endif /* COMMON_HERO_H_ */
+#endif