+
+
+itemContainer::itemContainer()
+{
+ myuses = 0;
+ myitem = NULL;
+}
+
+itemContainer::itemContainer(item *i){
+ myuses = i->uses();
+ myitem = i;
+}
+itemContainer::itemContainer(const itemContainer &right)
+{
+ myuses = right.myuses;
+ myitem = right.myitem;
+}
+itemContainer::~itemContainer()
+{
+ myuses = 0;
+ myitem = NULL;
+}
+
+itemContainer &itemContainer::operator--()
+{
+ --myuses;
+ return *this;
+}
+
+itemContainer itemContainer::operator--(int)
+{
+ itemContainer oldValue = *this;
+
+ operator--();
+
+ return oldValue;
+}
+
+itemContainer &itemContainer::operator++()
+{
+ ++myuses;
+
+ return *this;
+}
+
+itemContainer itemContainer::operator++(int)
+{
+ itemContainer oldValue = *this;
+
+ operator++();
+
+ return oldValue;
+}
+
+void itemContainer::setItem(item *i)
+{
+ myitem = i;
+}
+
+bool itemContainer::operator<(const itemContainer &right) const
+{
+ return (*myitem < *right.myitem);
+}
+
+bool itemContainer::operator>(const itemContainer &right) const
+{
+ return (*myitem > *right.myitem);
+}
+
+bool itemContainer::operator==(const itemContainer &right) const
+{
+ return (*myitem == *right.myitem);
+}
+
+bool itemContainer::operator!=(const itemContainer &right) const
+{
+ return (*myitem == *right.myitem);
+}
+
+void itemContainer::setUses(int uses)
+{
+ myuses = uses;
+}
+
+tavernItem::tavernItem()
+{
+ myItem = NULL;
+ myLevel = 1;
+}
+
+tavernItem::tavernItem(item *i, int l)
+{
+ setItem(i);
+ setLevel(l);
+}
+
+void tavernItem::setItem(item *i)
+{
+ myItem = i;
+}
+
+void tavernItem::setLevel(int l)
+{
+ myLevel = l;
+}
+
+bool tavernItem::visible(Player *p)
+{
+ return (p != NULL && p->level >= myLevel);
+}