]> git.localhorst.tv Git - l2e.git/blobdiff - src/common/Inventory.cpp
implemented item equipping
[l2e.git] / src / common / Inventory.cpp
index 6a6af81f3b52fe3dd0f94875cde38f00689f016b..d8ba20c08af5a35c0af1d1311ab2474259634449 100644 (file)
@@ -53,6 +53,10 @@ void Inventory::Remove(const Item *item, int count) {
        }
 }
 
+void Inventory::RemoveAll(const Item *item) {
+       Remove(item, 255);
+}
+
 Inventory::Entry *Inventory::FindItem(const Item *item) {
        for (int i(0); i < MaxItems(); ++i) {
                if (item == ItemAt(i)) {
@@ -83,4 +87,8 @@ bool Inventory::Entry::Less(const Entry &lhs, const Entry &rhs) {
        }
 }
 
+void Inventory::SwapEntriesAt(int lhs, int rhs) {
+       std::swap(entries[lhs], entries[rhs]);
+}
+
 }