]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Inventory.h
converted equipment from explicit members to array
[l2e.git] / src / common / Inventory.h
index f60b9abecb49e71817e5c3fe7a4b74fe3d011f3d..aaf315cc6bd7cd4608706bb3e99e1a36984f60bd 100644 (file)
@@ -22,17 +22,22 @@ public:
 public:
        bool Add(const Item *, int count = 1);
        void Remove(const Item *, int count = 1);
+       void RemoveAll(const Item *);
 
        int MaxItems() const { return 96; }
 
        const Item *ItemAt(int offset) const { return entries[offset].item; }
        int ItemCountAt(int offset) const { return entries[offset].count; }
 
+       void Sort();
+       void SwapEntriesAt(int lhs, int rhs);
+
 private:
        struct Entry {
                Entry() : item(0), count(0) { }
                const Item *item;
                Uint8 count;
+               static bool Less(const Entry &, const Entry &);
        };
 
 private: