]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Item.h
implemented inventory item swapping
[l2e.git] / src / common / Item.h
index eb60891636e9cb22acd87d5867b372d17afc0db8..7e757ff245095e8f55e81b8c4f86d5b32595b450 100644 (file)
@@ -19,6 +19,9 @@ namespace common {
 
 class Item {
 
+public:
+       static const int TYPE_ID = 303;
+
 public:
        Item();
 
@@ -26,7 +29,7 @@ public:
        const char *Name() const { return name; }
 
        bool IsMostUseful() const { return mostUseful; }
-       bool IsEquipable() const { return equipable; }
+       bool IsEquipable() const { return equipability; }
        bool IsCursed() const { return cursed; }
        bool IsFruit() const { return fruit; }
        bool IsScenario() const { return scenario; }
@@ -75,6 +78,8 @@ public:
        bool HasBattleAnimation() const { return properties & PROPERTY_HAS_BATTLE_ANIMATION; }
        bool HasIkariEffect() const { return properties & PROPERTY_HAS_IKARI_EFFECT; }
 
+       static bool Less(const Item &, const Item &);
+
 // temporary setters
 public:
        void SetName(const char *n) { name = n; }
@@ -126,12 +131,11 @@ private:
        Uint16 properties;
 
        TargetingMode targettingMode;
-       Uint8 equipability;
+       int equipability;
        HeroGroup equipableBy;
 
        // TODO: turn these back into bits as soon as fields are implemented in the loader
        bool mostUseful;
-       bool equipable;
        bool cursed;
        bool fruit;
        bool scenario;