]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Item.h
added item target selection
[l2e.git] / src / common / Item.h
index cdb106daa95ff33b57af77404e3ca9fdb4b9e4f3..1dde8878f7c0d4f2dfe79fcd80e516ec150f4edd 100644 (file)
@@ -20,6 +20,8 @@ public:
        Item();
 
 public:
+       const char *Name() const { return name; }
+
        bool IsMostUseful() const { return usability & USABILITY_MOST_USEFUL; }
        bool IsEquipable() const { return usability & USABILITY_EQUIPABLE; }
        bool IsCursed() const { return usability & USABILITY_CURSED; }
@@ -72,7 +74,14 @@ public:
        bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; }
        bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; }
 
-private:
+// temporary setters
+public:
+       void SetName(const char *n) { name = n; }
+       void SetMenuIcon(const graphics::Sprite *icon) { menuIcon = icon; }
+       void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
+       void SetTargettingMode(int m) { targettingMode = m; }
+
+public:
        enum Usability {
                USABILITY_MOST_USEFUL = 1,
                USABILITY_EQUIPABLE = 2,
@@ -131,8 +140,9 @@ private:
        };
 
 private:
-       graphics::Sprite *menuIcon;
-       graphics::Sprite *chestIcon;
+       const char *name;
+       const graphics::Sprite *menuIcon;
+       const graphics::Sprite *chestIcon;
 
        Uint16 value;
        Uint16 properties;