]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Capsule.h
moved upgrade process to battle class
[l2e.git] / src / common / Capsule.h
index bf99cfa1ad376660c322c97640515ec9b71f4dce..1e2a6311f07fe1f27ad871a527f24567f575fa21 100644 (file)
@@ -3,6 +3,7 @@
 
 namespace common {
        class Item;
+       class Upgrade;
 }
 namespace graphics {
        class Animation;
@@ -10,8 +11,9 @@ namespace graphics {
 }
 
 #include "../common/Stats.h"
-#include "../geometry/Vector.h"
+#include "../math/Vector.h"
 
+#include <vector>
 #include <SDL.h>
 
 namespace common {
@@ -39,7 +41,7 @@ public:
        int MaxClass() const { return maxClass; }
        int CurrentClass() const { return curClass; }
 
-       const geometry::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
+       const math::Vector<int> &AlignmentOffset() const { return alignmentCursor; }
        const graphics::Sprite *AlignmentSprite() const { return alignmentSprite; }
 
        void UpgradeClass();
@@ -65,6 +67,8 @@ public:
        int Experience() const { return experience; }
        int NextLevel() const;
 
+       void AddExperience(int, std::vector<Upgrade> &);
+
        graphics::Sprite *BattleSprite();
        const graphics::Sprite *BattleSprite() const;
        graphics::Animation *MeleeAnimation();
@@ -106,7 +110,7 @@ private:
        const char *name;
        const char *alignment;
 
-       geometry::Vector<int> alignmentCursor;
+       math::Vector<int> alignmentCursor;
        const graphics::Sprite *alignmentSprite;
 
        int maxHealth;
@@ -126,4 +130,4 @@ private:
 
 }
 
-#endif /* COMMON_CAPSULE_H_ */
+#endif