summaryrefslogtreecommitdiffstats
path: root/src/Item.cpp
diff options
context:
space:
mode:
authorGargaj <gargaj@conspiracy.hu>2015-11-14 16:42:26 +0100
committerGargaj <gargaj@conspiracy.hu>2015-11-23 22:20:31 +0100
commit853e6e6882969f24547d782d42a3c19df4395064 (patch)
tree5ebe9e808e82c22a427429881526fb0ce390deb4 /src/Item.cpp
parentFixed display of helpmessage (diff)
downloadcuberite-853e6e6882969f24547d782d42a3c19df4395064.tar
cuberite-853e6e6882969f24547d782d42a3c19df4395064.tar.gz
cuberite-853e6e6882969f24547d782d42a3c19df4395064.tar.bz2
cuberite-853e6e6882969f24547d782d42a3c19df4395064.tar.lz
cuberite-853e6e6882969f24547d782d42a3c19df4395064.tar.xz
cuberite-853e6e6882969f24547d782d42a3c19df4395064.tar.zst
cuberite-853e6e6882969f24547d782d42a3c19df4395064.zip
Diffstat (limited to 'src/Item.cpp')
-rw-r--r--src/Item.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Item.cpp b/src/Item.cpp
index 97cda0b95..2eb009d4a 100644
--- a/src/Item.cpp
+++ b/src/Item.cpp
@@ -459,3 +459,33 @@ void cItems::Set(int a_Idx, short a_ItemType, char a_ItemCount, short a_ItemDama
+
+bool cItems::Contains(const cItem & a_Item)
+{
+ for (auto itr : *this)
+ {
+ if (a_Item.IsEqual(itr))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+
+
+bool cItems::ContainsType(const cItem & a_Item)
+{
+ for (auto itr : *this)
+ {
+ if (a_Item.IsSameType(itr))
+ {
+ return true;
+ }
+ }
+ return false;
+}
+
+