]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Item.h
added sword attack animation
[l2e.git] / src / common / Item.h
index 6ae374b9e4244a3cc58edcf80482326992c21cd5..1d9d51c56baa8260779f6b3115d876bc8d4a964d 100644 (file)
 
 #include <SDL.h>
 
-namespace graphics { class Sprite; }
+namespace graphics {
+       class Animation;
+       class Sprite;
+}
 
 namespace common {
 
@@ -48,6 +51,9 @@ public:
        bool HasIkari() const { return ikari; }
        const Ikari *GetIkari() const { return ikari; }
 
+       graphics::Animation *AttackAnimation() { return attackAnimation; }
+       const graphics::Animation *AttackAnimation() const { return attackAnimation; }
+
        Uint16 Value() const { return value; }
 
        bool CanEquipWeapon() const { return equipable & EQUIPPABLE_WEAPON; }
@@ -80,6 +86,7 @@ public:
        void SetMenuIcon(const graphics::Sprite *icon) { menuIcon = icon; }
        void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
        void SetIkari(const Ikari *i) { ikari = i; }
+       void SetAttackAnimation(graphics::Animation *a) { attackAnimation = a; }
 
 private:
        enum Usability {
@@ -125,6 +132,7 @@ private:
        const graphics::Sprite *menuIcon;
        const graphics::Sprite *chestIcon;
        const Ikari *ikari;
+       graphics::Animation *attackAnimation;
 
        Uint16 value;
        Uint16 properties;